XCloner – Backup and Restore - Version 3.0.2

Version Description

Download this release

Release Info

Developer xcloner
Plugin Icon 128x128 XCloner – Backup and Restore
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0 to 3.0.2

admin.cloner.html.php CHANGED
@@ -1128,6 +1128,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1128
  $( "#cron_file_delete_act" ).button();
1129
  $( "#cron_sql_drop" ).button();
1130
  $( "#cron_amazon_active" ).button();
 
1131
  $( "#cron_ftp_delb" ).button();
1132
  $( "#checkmysqldump" ).button();
1133
  });
@@ -1202,18 +1203,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1202
  </td>
1203
  </tr>
1204
 
1205
- <tr>
1206
- <td>
1207
- <?php echo LM_CRON_COMPRESS?>
1208
- </td>
1209
- <td>
1210
- <div id="radiog2">
1211
- <label for="radiog21"><?php echo LM_YES?></label> <input id="radiog21" type=radio size=50 value=1 name='backup_compress' <?php if($_CONFIG[backup_compress]==1) echo 'checked';?>>
1212
- <label for="radiog22"><?php echo LM_NO?></label> <input id="radiog22" type=radio size=50 value=0 name='backup_compress' <?php if($_CONFIG[backup_compress]==0) echo 'checked';?>>
1213
- <br /> <small>set it to Yes in order to compress the files into smaller backups</small>
1214
- </div>
1215
- </td>
1216
- </tr>
1217
 
1218
  <tr>
1219
  <td>
@@ -1574,6 +1564,19 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1574
  <input type=text size=20 name='refresh_time' value=<?php echo $_CONFIG[refresh_time];?>> miliseconds
1575
 
1576
  </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
1577
 
1578
  <tr><td>
1579
  <?php echo LM_REFRESH_MODE?>
@@ -1787,6 +1790,9 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1787
  <td>
1788
  <label for="cron_amazon_active"><?php echo LM_AMAZON_S3_ACTIVATE?></label>
1789
  <input id="cron_amazon_active" type=checkbox name='cron_amazon_active' <?php if($_CONFIG[cron_amazon_active]==1) echo "checked";?> value='1'>
 
 
 
1790
  </td>
1791
  </tr>
1792
 
@@ -1807,7 +1813,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1807
  <input type=text size=50 name='cron_amazon_awsSecretKey' value="<?php echo $_CONFIG['cron_amazon_awsSecretKey'];?>">
1808
  </td>
1809
  </tr>
1810
-
1811
  <tr>
1812
  <td width='200'>
1813
  <?php echo LM_AMAZON_S3_BUCKET;?>
1128
  $( "#cron_file_delete_act" ).button();
1129
  $( "#cron_sql_drop" ).button();
1130
  $( "#cron_amazon_active" ).button();
1131
+ $( "#cron_amazon_ssl" ).button();
1132
  $( "#cron_ftp_delb" ).button();
1133
  $( "#checkmysqldump" ).button();
1134
  });
1203
  </td>
1204
  </tr>
1205
 
1206
+
 
 
 
 
 
 
 
 
 
 
 
1207
 
1208
  <tr>
1209
  <td>
1564
  <input type=text size=20 name='refresh_time' value=<?php echo $_CONFIG[refresh_time];?>> miliseconds
1565
 
1566
  </td></tr>
1567
+
1568
+ <tr>
1569
+ <td>
1570
+ <?php echo LM_CRON_COMPRESS?>
1571
+ </td>
1572
+ <td>
1573
+ <div id="radiog2">
1574
+ <label for="radiog21"><?php echo LM_YES?></label> <input id="radiog21" type=radio size=50 value=1 name='backup_compress' <?php if($_CONFIG[backup_compress]==1) echo 'checked';?>>
1575
+ <label for="radiog22"><?php echo LM_NO?></label> <input id="radiog22" type=radio size=50 value=0 name='backup_compress' <?php if($_CONFIG[backup_compress]==0) echo 'checked';?>>
1576
+ <br /> <small>Note: this option might break your backup process if the Manual backup option is also enabled</small>
1577
+ </div>
1578
+ </td>
1579
+ </tr>
1580
 
1581
  <tr><td>
1582
  <?php echo LM_REFRESH_MODE?>
1790
  <td>
1791
  <label for="cron_amazon_active"><?php echo LM_AMAZON_S3_ACTIVATE?></label>
1792
  <input id="cron_amazon_active" type=checkbox name='cron_amazon_active' <?php if($_CONFIG[cron_amazon_active]==1) echo "checked";?> value='1'>
1793
+
1794
+ <label for="cron_amazon_ssl"><?php echo LM_AMAZON_S3_SSL?></label>
1795
+ <input id="cron_amazon_ssl" type=checkbox name='cron_amazon_ssl' <?php if($_CONFIG[cron_amazon_ssl]==1) echo "checked";?> value='1'>
1796
  </td>
1797
  </tr>
1798
 
1813
  <input type=text size=50 name='cron_amazon_awsSecretKey' value="<?php echo $_CONFIG['cron_amazon_awsSecretKey'];?>">
1814
  </td>
1815
  </tr>
1816
+
1817
  <tr>
1818
  <td width='200'>
1819
  <?php echo LM_AMAZON_S3_BUCKET;?>
admin.cloner.php CHANGED
@@ -35,6 +35,8 @@
35
  require_once("admin.cloner.html.php");
36
  require_once("common.php");
37
 
 
 
38
  //Doing some basic authentification
39
  if ((!isset($_SESSION['clone'])) && ($task != 'dologin')) {
40
  $task = 'login';
35
  require_once("admin.cloner.html.php");
36
  require_once("common.php");
37
 
38
+ $option = "xcloner";
39
+
40
  //Doing some basic authentification
41
  if ((!isset($_SESSION['clone'])) && ($task != 'dologin')) {
42
  $task = 'login';
cloner.cron.php CHANGED
@@ -26,10 +26,10 @@ $ip_list[] = $_SERVER['SERVER_ADDR'];
26
  $curent_ip = $_SERVER["REMOTE_ADDR"];
27
 
28
  if(!in_array($curent_ip, $ip_list)){
29
-
30
  echo "Access Denied for ip $curent_ip!";
31
  exit;
32
-
33
  }
34
  #########################
35
 
@@ -38,33 +38,36 @@ if(!in_array($curent_ip, $ip_list)){
38
 
39
  $script_dir = str_replace("\\","/",dirname(__FILE__));
40
  if(is_dir($script_dir)){
41
-
42
  chdir($script_dir);
43
 
44
  }
45
 
46
  if($_REQUEST['config'] == ""){
47
-
48
  if($argv[1] != ""){
49
-
50
- $_REQUEST['config'] = $argv[1];
51
-
52
  }
53
 
54
 
55
  }
56
 
57
- if($_REQUEST['config'] != ""){
 
58
 
 
 
59
  require_once( './configs/'.$_REQUEST['config'] );
60
-
61
  $smsg = "Using configs/".$_REQUEST['config']." as configuration file";
62
-
63
  }
64
  else{
65
 
66
  @require_once( './cloner.config.php' );
67
-
68
  $smsg = "Using default configuration file";
69
 
70
  }
@@ -91,7 +94,7 @@ if($_CONFIG['select_lang']!="")
91
  if (file_exists( "language/".$mosConfig_lang.".php" )) {
92
  include_once( "language/".$mosConfig_lang.".php" );
93
  @include_once( "language/english.php" );
94
- }
95
  else{
96
  include_once( "language/english.php" );
97
  }
@@ -104,10 +107,10 @@ $ip_list[] = $_SERVER['SERVER_ADDR'];
104
  $curent_ip = $_SERVER["REMOTE_ADDR"];
105
 
106
  if(!in_array($curent_ip, $ip_list)){
107
-
108
  echo "Access Denied for ip $curent_ip!";
109
  exit;
110
-
111
  }*/
112
  #########################
113
 
@@ -121,14 +124,14 @@ $_REQUEST['databases_incl'] = @explode(",",$_CONFIG[databases_incl_list]);
121
 
122
  if($_CONFIG[cron_bname]!="")
123
  $_REQUEST['bname'] = $_CONFIG[cron_bname];
124
-
125
-
126
  function logxx($string = ""){
127
-
128
- global $mail_log;
129
 
130
  $return = "<b>$string</b><br />\r\n";
131
-
132
  $mail_log .= $return;
133
 
134
  echo $return;
@@ -148,8 +151,8 @@ logxx("Starting XCloner for site $mosConfig_live_site at ".date("Y-m-d H:i"));
148
  #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludefolders, '');
149
  #$excludedFolders = confirmBackup('nohtml');
150
  #logxx("Done");
151
-
152
-
153
 
154
  if($_CONFIG['cron_btype']==0){
155
  $_REQUEST[dbbackup] = 1;
@@ -171,7 +174,7 @@ if($_CONFIG['cron_btype']==2){
171
  $GLOBALS['_CONFIG'] = $_CONFIG;
172
  $_REQUEST[cron_dbonly] = 1;
173
  #}
174
-
175
  logxx("Creating an sql only backup");
176
  $msg = "database backup";
177
  }
@@ -200,7 +203,7 @@ $destination_files[] = $_CONFIG[cron_ftp_path]."/".$file;
200
  list($fhost, $fport) = explode(":",$_CONFIG[cron_ftp_server]);
201
  if($fport == "")
202
  $fport = '21';
203
-
204
  $ftp_timeout = '3600';
205
 
206
  // set up basic connection
@@ -265,7 +268,7 @@ if($_CONFIG[cron_ftp_delb]==1){
265
  @unlink($source_file);
266
  logxx("Backup succesfully deleted from the original server!");
267
  }
268
-
269
  ##############################################################################
270
  }
271
  elseif($_CONFIG['cron_send']==2){
@@ -279,19 +282,19 @@ elseif($_CONFIG['cron_send']==2){
279
  Attached is the backup generated on $date
280
  Source Filename: $source_file
281
  Server: $mosConfig_live_site
282
-
283
  Powered by http://www.xcloner.com - XCloner - Backup and Restore made easy!
284
  </pre>
285
 
286
  ";
287
-
288
  $ok = send_mail($mosConfig_mailfrom, "XCloner $msg", $message, $_CONFIG['cron_email_address'], $source_file);
289
-
290
  #echo mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $_CONFIG['cron_email_address'], "XCloner $msg", $message, $mode, '', '' );
291
  if($ok)
292
  logxx("Mail sent to ".$_CONFIG['cron_email_address']);
293
  else
294
- logxx("There was an error in sending the mail cron to ".$_CONFIG['cron_email_address']);
295
 
296
  ##############################################################################
297
  }
@@ -305,9 +308,14 @@ include_once("classes/S3.php");
305
 
306
  logxx();
307
 
308
- $s3 = new S3($_CONFIG['cron_amazon_awsAccessKey'], $_CONFIG['cron_amazon_awsSecretKey']);
 
 
 
 
 
309
 
310
- logxx("AMAZON S3: Starting communication with the Amazon S3 server...");
311
 
312
  $buckets = $s3->listBuckets();
313
 
@@ -349,27 +357,27 @@ delete_older_backups($clonerPath);
349
 
350
  $logemail = explode(";", $_CONFIG['cron_logemail']);
351
  if(sizeof($logemail)>0){
352
-
353
  for($i=0; $i<sizeof($logemail);$i++){
354
-
355
  $email = trim($logemail[$i]);
356
  if($email != ""){
357
-
358
  $email_subject = "cron log ".time();
359
-
360
  $headers ="From: \"Cronlog XCloner\" <nobody@noreply.com>\n";
361
 
362
  if(mail($email, $email_subject, strip_tags($mail_log), $headers)){
363
-
364
  logxx ("Notification Mail was sent to $email");
365
-
366
  }
367
-
368
-
369
  }
370
-
371
  }
372
-
373
  }
374
 
375
  logxx("<br />\n\nALL DONE! I will exit now from cron.");
@@ -391,78 +399,78 @@ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
391
  if(is_array($f_arr))
392
  foreach($f_arr as $file)
393
  if(($file!='.')&&($file != '..')){
394
-
395
  #logxx("Processing backup file $file");
396
  $cfile = $_CONFIG['clonerPath']."/".$file;
397
-
398
  $filemtime = filemtime($cfile) ;
399
-
400
  $ftime= $filemtime + $_CONFIG['cron_file_delete']*24*60*60;
401
-
402
  $ctime = time();
403
-
404
  if($ftime < $ctime){
405
-
406
  if(unlink($cfile))
407
  logxx("Deleted backup file $file created on ".date("Y-m-d", $filemtime));
408
  else
409
  logxx("Could not delete backup file $file, please delete it manually");
410
-
411
  }
412
-
413
  }
414
 
415
  }
416
 
417
  function send_mail($email_from, $email_subject, $email_txt, $email_to, $fileatt){
418
- $fileatt_type = "application/octet-stream"; // File Type
419
- $fileatt_name = basename($fileatt); // Filename that will be used for the file as the attachment
420
  $data = "";
421
 
422
- $headers = "From: \"Cronbackup XCloner\" <".$email_from.">";
423
 
424
  if($fileatt != ""){
425
-
426
  if($file = @fopen($fileatt,'rb')){
427
-
428
  $data = fread($file,filesize($fileatt));
429
-
430
  fclose($file);
431
 
432
- }
433
  else{
434
  logxx("Unable to open file $fileatt");
435
  }
436
 
437
  }
438
 
439
- $semi_rand = md5(time());
440
- $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
441
-
442
- $headers .= "\nMIME-Version: 1.0\n" .
443
- "Content-Type: multipart/mixed;\n" .
444
- " boundary=\"{$mime_boundary}\"";
445
 
446
- $email_message .= "This is a multi-part message in MIME format.\n\n" .
447
- "--{$mime_boundary}\n" .
448
- "Content-Type:text/html; charset=\"iso-8859-1\"\n" .
449
- "Content-Transfer-Encoding: 7bit\n\n" .
450
- $email_txt . "\n\n";
451
 
452
- $data = chunk_split(base64_encode($data));
453
 
454
- $email_message .= "--{$mime_boundary}\n" .
455
- "Content-Type: {$fileatt_type};\n" .
456
- " name=\"{$fileatt_name}\"\n" .
457
- //"Content-Disposition: attachment;\n" .
458
- //" filename=\"{$fileatt_name}\"\n" .
459
- "Content-Transfer-Encoding: base64\n\n" .
460
- $data . "\n\n" .
461
- "--{$mime_boundary}--\n";
462
 
463
- $ok = mail($email_to, $email_subject, $email_message, $headers);
464
 
465
  return $ok;
466
 
467
  }
468
- ?>
26
  $curent_ip = $_SERVER["REMOTE_ADDR"];
27
 
28
  if(!in_array($curent_ip, $ip_list)){
29
+
30
  echo "Access Denied for ip $curent_ip!";
31
  exit;
32
+
33
  }
34
  #########################
35
 
38
 
39
  $script_dir = str_replace("\\","/",dirname(__FILE__));
40
  if(is_dir($script_dir)){
41
+
42
  chdir($script_dir);
43
 
44
  }
45
 
46
  if($_REQUEST['config'] == ""){
47
+
48
  if($argv[1] != ""){
49
+
50
+ $_REQUEST['config'] = $argv[1];
51
+
52
  }
53
 
54
 
55
  }
56
 
57
+ //filter the config request path
58
+ $_REQUEST['config'] = str_replace(array("..","/","\\"), array("","",""), trim($_REQUEST['config']));
59
 
60
+ if($_REQUEST['config'] != ""){
61
+
62
  require_once( './configs/'.$_REQUEST['config'] );
63
+
64
  $smsg = "Using configs/".$_REQUEST['config']." as configuration file";
65
+
66
  }
67
  else{
68
 
69
  @require_once( './cloner.config.php' );
70
+
71
  $smsg = "Using default configuration file";
72
 
73
  }
94
  if (file_exists( "language/".$mosConfig_lang.".php" )) {
95
  include_once( "language/".$mosConfig_lang.".php" );
96
  @include_once( "language/english.php" );
97
+ }
98
  else{
99
  include_once( "language/english.php" );
100
  }
107
  $curent_ip = $_SERVER["REMOTE_ADDR"];
108
 
109
  if(!in_array($curent_ip, $ip_list)){
110
+
111
  echo "Access Denied for ip $curent_ip!";
112
  exit;
113
+
114
  }*/
115
  #########################
116
 
124
 
125
  if($_CONFIG[cron_bname]!="")
126
  $_REQUEST['bname'] = $_CONFIG[cron_bname];
127
+
128
+
129
  function logxx($string = ""){
130
+
131
+ global $mail_log;
132
 
133
  $return = "<b>$string</b><br />\r\n";
134
+
135
  $mail_log .= $return;
136
 
137
  echo $return;
151
  #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludefolders, '');
152
  #$excludedFolders = confirmBackup('nohtml');
153
  #logxx("Done");
154
+
155
+
156
 
157
  if($_CONFIG['cron_btype']==0){
158
  $_REQUEST[dbbackup] = 1;
174
  $GLOBALS['_CONFIG'] = $_CONFIG;
175
  $_REQUEST[cron_dbonly] = 1;
176
  #}
177
+
178
  logxx("Creating an sql only backup");
179
  $msg = "database backup";
180
  }
203
  list($fhost, $fport) = explode(":",$_CONFIG[cron_ftp_server]);
204
  if($fport == "")
205
  $fport = '21';
206
+
207
  $ftp_timeout = '3600';
208
 
209
  // set up basic connection
268
  @unlink($source_file);
269
  logxx("Backup succesfully deleted from the original server!");
270
  }
271
+
272
  ##############################################################################
273
  }
274
  elseif($_CONFIG['cron_send']==2){
282
  Attached is the backup generated on $date
283
  Source Filename: $source_file
284
  Server: $mosConfig_live_site
285
+
286
  Powered by http://www.xcloner.com - XCloner - Backup and Restore made easy!
287
  </pre>
288
 
289
  ";
290
+
291
  $ok = send_mail($mosConfig_mailfrom, "XCloner $msg", $message, $_CONFIG['cron_email_address'], $source_file);
292
+
293
  #echo mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $_CONFIG['cron_email_address'], "XCloner $msg", $message, $mode, '', '' );
294
  if($ok)
295
  logxx("Mail sent to ".$_CONFIG['cron_email_address']);
296
  else
297
+ logxx("There was an error in sending the mail cron to ".$_CONFIG['cron_email_address']);
298
 
299
  ##############################################################################
300
  }
308
 
309
  logxx();
310
 
311
+ if(!$_CONFIG['cron_amazon_ssl'])
312
+ $amazon_ssl = false;
313
+ else
314
+ $amazon_ssl = true;
315
+
316
+ $s3 = new S3($_CONFIG['cron_amazon_awsAccessKey'], $_CONFIG['cron_amazon_awsSecretKey'], $amazon_ssl);
317
 
318
+ logxx("AMAZON S3: Starting communication with the Amazon S3 server...ssl mode ".$amazon_ssl);
319
 
320
  $buckets = $s3->listBuckets();
321
 
357
 
358
  $logemail = explode(";", $_CONFIG['cron_logemail']);
359
  if(sizeof($logemail)>0){
360
+
361
  for($i=0; $i<sizeof($logemail);$i++){
362
+
363
  $email = trim($logemail[$i]);
364
  if($email != ""){
365
+
366
  $email_subject = "cron log ".time();
367
+
368
  $headers ="From: \"Cronlog XCloner\" <nobody@noreply.com>\n";
369
 
370
  if(mail($email, $email_subject, strip_tags($mail_log), $headers)){
371
+
372
  logxx ("Notification Mail was sent to $email");
373
+
374
  }
375
+
376
+
377
  }
378
+
379
  }
380
+
381
  }
382
 
383
  logxx("<br />\n\nALL DONE! I will exit now from cron.");
399
  if(is_array($f_arr))
400
  foreach($f_arr as $file)
401
  if(($file!='.')&&($file != '..')){
402
+
403
  #logxx("Processing backup file $file");
404
  $cfile = $_CONFIG['clonerPath']."/".$file;
405
+
406
  $filemtime = filemtime($cfile) ;
407
+
408
  $ftime= $filemtime + $_CONFIG['cron_file_delete']*24*60*60;
409
+
410
  $ctime = time();
411
+
412
  if($ftime < $ctime){
413
+
414
  if(unlink($cfile))
415
  logxx("Deleted backup file $file created on ".date("Y-m-d", $filemtime));
416
  else
417
  logxx("Could not delete backup file $file, please delete it manually");
418
+
419
  }
420
+
421
  }
422
 
423
  }
424
 
425
  function send_mail($email_from, $email_subject, $email_txt, $email_to, $fileatt){
426
+ $fileatt_type = "application/octet-stream"; // File Type
427
+ $fileatt_name = basename($fileatt); // Filename that will be used for the file as the attachment
428
  $data = "";
429
 
430
+ $headers = "From: \"Cronbackup XCloner\" <".$email_from.">";
431
 
432
  if($fileatt != ""){
433
+
434
  if($file = @fopen($fileatt,'rb')){
435
+
436
  $data = fread($file,filesize($fileatt));
437
+
438
  fclose($file);
439
 
440
+ }
441
  else{
442
  logxx("Unable to open file $fileatt");
443
  }
444
 
445
  }
446
 
447
+ $semi_rand = md5(time());
448
+ $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
449
+
450
+ $headers .= "\nMIME-Version: 1.0\n" .
451
+ "Content-Type: multipart/mixed;\n" .
452
+ " boundary=\"{$mime_boundary}\"";
453
 
454
+ $email_message .= "This is a multi-part message in MIME format.\n\n" .
455
+ "--{$mime_boundary}\n" .
456
+ "Content-Type:text/html; charset=\"iso-8859-1\"\n" .
457
+ "Content-Transfer-Encoding: 7bit\n\n" .
458
+ $email_txt . "\n\n";
459
 
460
+ $data = chunk_split(base64_encode($data));
461
 
462
+ $email_message .= "--{$mime_boundary}\n" .
463
+ "Content-Type: {$fileatt_type};\n" .
464
+ " name=\"{$fileatt_name}\"\n" .
465
+ //"Content-Disposition: attachment;\n" .
466
+ //" filename=\"{$fileatt_name}\"\n" .
467
+ "Content-Transfer-Encoding: base64\n\n" .
468
+ $data . "\n\n" .
469
+ "--{$mime_boundary}--\n";
470
 
471
+ $ok = mail($email_to, $email_subject, $email_message, $headers);
472
 
473
  return $ok;
474
 
475
  }
476
+ ?>
cloner.functions.php CHANGED
@@ -252,6 +252,8 @@
252
  $cfg .= '$_CONFIG[\'cron_amazon_bucket\']=\'' . $_REQUEST[cron_amazon_bucket] . '\';' . "\n";
253
 
254
  $cfg .= '$_CONFIG[\'cron_amazon_dirname\']=\'' . $_REQUEST[cron_amazon_dirname] . '\';' . "\n";
 
 
255
 
256
  $cfg .= '$_CONFIG[\'debug\']="' . $_REQUEST[debug] . '";' . "\n";
257
 
252
  $cfg .= '$_CONFIG[\'cron_amazon_bucket\']=\'' . $_REQUEST[cron_amazon_bucket] . '\';' . "\n";
253
 
254
  $cfg .= '$_CONFIG[\'cron_amazon_dirname\']=\'' . $_REQUEST[cron_amazon_dirname] . '\';' . "\n";
255
+
256
+ $cfg .= '$_CONFIG[\'cron_amazon_ssl\']=\'' . $_REQUEST[cron_amazon_ssl] . '\';' . "\n";
257
 
258
  $cfg .= '$_CONFIG[\'debug\']="' . $_REQUEST[debug] . '";' . "\n";
259
 
language/english.php CHANGED
@@ -17,7 +17,7 @@ define("LM_FRONT_FTP_DIR","<b>Ftp directory:</b>");
17
  define("LM_FRONT_FTP_DIR_SUB","<small>Please provide the ftp directory of where you would like to install Joomla, example public_html/Joomla/ or htdocs/Joomla/ and make sure it has write permissions for everybody</small>");
18
  define("LM_TRANSFER_FTP_INCT","Incremental transfer: ");
19
  define("LM_TRANSFER_FTP_INCT_SUB","will attempt to transfer the files over ftp in an incremental mode to avoid any blank pages or timeouts ");
20
- define("LM_FRONT_BOTTOM","Didn't worked for you? Please tell us what happened -> <a href='http://www.xcloner.com/contact/'>Contact page</a><br />
21
  Powered by <a href='http://www.xcloner.com'>XCloner</a>");
22
  define("LM_FRONT_MSG_OK","We have uploaded the Package Restore Utility on your ftp site, to continue click here");
23
  define("LM_NOPAKCAGE_ERROR","There is no package selected, aborting...!");
@@ -31,26 +31,27 @@ define("LM_AMAZON_S3_AWSACCESSKEY", "AWS Access Key:");
31
  define("LM_AMAZON_S3_AWSSECRETKEY", "AWS Secret Key:");
32
  define("LM_AMAZON_S3_BUCKET", "Bucket name:");
33
  define("LM_AMAZON_S3_DIRNAME", "Upload Directory:");
 
34
 
35
 
36
  define("LM_DATABASE_EXCLUDE_TABLES","Select tables to exclude from backup:");
37
  define("LM_CONFIG_SYSTEM_FOLDER","Folders display:");
38
  define("LM_CONFIG_SYSTEM_FOLDER_SUB","please select the mode you would like to select the exclude folders from 'Generate Backup' section");
39
  define("LM_CONFIG_SYSTEM_LANG","System Language:");
40
- define("LM_CONFIG_SYSTEM_LANG_SUB","configures the XCloner language, if set to default it will display the default language of Joomla is avalaible");
41
  define("LM_CONFIG_SYSTEM_LANG_DEFAULT","System Default");
42
  define("LM_CONFIG_SYSTEM_DOWNLOAD","Enable Direct Download link:");
43
  define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","if this is checked, in the 'View Backups' screen, the download link will be a direct link from your server to download the package, please note that the backup path must be within the Joomla root path");
44
  define("LM_CONFIG_DISPLAY","Display Settings");
45
  define("LM_CONFIG_SYSTEM","System Settings");
46
- define("LM_CONFIG_SYSTEM_FTP","Ftp Transfer Mode");
47
  define("LM_CONFIG_SYSTEM_FTP_SUB","select how the files will be transfered from server to server when using ftp protocol");
48
  define("LM_CONFIG_MEM","Backup using Server Functions");
49
  define("LM_CONFIG_MEM_SUB","<small>If set to Active, you will be required to have on your server support for <b>zip or tar</b> and/or <b>mysqldump</b> commands and specify their paths, and also <b>exec()</b> access in your php</small>");
50
  define("LM_CRON_DB_BACKUP","Enable Database backup:");
51
- define("LM_CRON_DB_BACKUP_SUB","<small>check Yes if you would like to backup the mysql data</small>");
52
  define("LM_CONFIG_SYSTEM_MBACKUP","Include backups directory in clone:");
53
- define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>If set to Yes, the created backup will also contain previous backups files, increasing each time it's size</small>");
54
 
55
  define("LM_TAB_MYSQL","MYSQL");
56
  define("LM_CONFIG_MYSQL","MYSQL Connection Settings:");
@@ -83,36 +84,36 @@ define("LM_MYSQLDUMP_PATH","Mysqldump path or command: (required if Active box
83
  // --- CONFIG ---//
84
  define("LM_CONFIG_MANUAL","Backup Manual Process");
85
  define("LM_CONFIG_MANUAL_BACKUP","Manual backup:");
86
- define("LM_CONFIG_MANUAL_BACKUP_SUB","This option is indicated if you have php time execution limitations on your server, this will require javascript activated on your browser");
87
  define("LM_CONFIG_MANUAL_FILES","Files to process per request:");
88
  define("LM_CONFIG_DB_RECORDS", "Database records per request");
89
  define("LM_CONFIG_MANUAL_REFRESH","Time between requests:");
90
  define("LM_CONFIG_SYSTEM_MDATABASES","Backup Multiple Databases:");
91
- define("LM_CONFIG_SYSTEM_MDATABASES_SUB","this option controls wheteher XCloner may backup multiple databases");
92
  define("LM_CONFIG_EXCLUDE_FILES_SIZE","Exclude files larger than:");
93
 
94
  define("LM_CONFIG_CRON_LOCAL","Local server*");
95
  define("LM_CONFIG_CRON_REMOTE","Remote ftp account");
96
  define("LM_CONFIG_CRON_EMAIL","Email**");
97
- define("LM_CONFIG_CRON_FULL","Full(files + database)");
98
  define("LM_CONFIG_CRON_FILES","Files only");
99
  define("LM_CONFIG_CRON_DATABASE","Database only");
100
 
101
- define("LM_CONFIG_EDIT","Editing config file");
102
  define("LM_CONFIG_BSETTINGS","Backup Path Settings");
103
  define("LM_CONFIG_BSETTINGS_OPTIONS","Backup Generator Options");
104
  define("LM_CONFIG_BSETTINGS_SERVER","Server Use Options");
105
  define("LM_CONFIG_BPATH","Backup Store Path:");
106
  define("LM_CONFIG_UBPATH","Backup Start Path:");
107
  define("LM_CONFIG_BPATH_SUB","<small>this is the path where all backups will be stored</small>");
108
- define("LM_CONFIG_UBPATH_SUB","<small>input here the initial backup path from where XCloner will start all the processes</small>");
109
  define("LM_CRON_EXCLUDE","Excluded Directories");
110
  define("LM_CRON_EXCLUDE_DIR","Excluded directories list one per line:<br>please use full path of the server directory");
111
  define("LM_CRON_BNAME","Backup Name:");
112
  define("LM_CRON_BNAME_SUB","<small>if left blank we will generate a name by default each time a new cron backup is made</small>");
113
  define("LM_CRON_IP","Cron Allowed IP's:");
114
  define("LM_CRON_IP_SUB","<small>by default, only the local server will have access to the cron job, but you may enter also other IP's one per line</small>");
115
- define("LM_CRON_DELETE_FILES","Delete Older Backups");
116
  define("LM_CRON_DELETE_FILES_SUB","Delete backups older than: ");
117
  define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Activate");
118
  define("LM_CRON_SEMAIL","Email cron log to: ");
@@ -151,7 +152,7 @@ define("LM_MAIN_Help","Help");
151
  define("LM_FTP_TRANSFER_MORE","FTP Connection Mode");
152
  define("LM_REFRESH_MODE","Backup Refresh Mode");
153
  define("LM_DEBUG_MODE","Enable log:");
154
- define("LM_REFRESH_ERROR","There was an error retreiving the JSON data from the server, try again or contact the developers!");
155
 
156
 
157
  // --- LANGUAGE --//
@@ -174,7 +175,7 @@ define("LM_TAB_G_COMMENTS","Backup Comments");
174
  define("LM_G_EXCLUDE_COMMENT","<br>Please enter here the excluded folders, each one per line!
175
  <br><b>you may want to disable the cache feature when doing a backup, or if not exlude the cache folder from the backup</b>");
176
  define("LM_TAB_G_COMMENTS_H2", "Enter below any additional comments to archive:");
177
- define("LM_TAB_G_COMMENTS_NOTE","Please note, the comments are store inside the archive, file <b>administrator/backups/.comments</b>");
178
 
179
  // --- MESSAGES --//
180
  // front end
@@ -188,8 +189,8 @@ define("LM_MSG_FRONT_6","for user");
188
  //backend
189
  define("LM_MSG_BACK_1","Config succesfully updated...");
190
  define("LM_MSG_BACK_2","FTP connection has failed!");
191
- define("LM_MSG_BACK_3","Backup move DONE! The select backup should now be avalaible on the provided location!");
192
- define("LM_MSG_BACK_4","Moving done, starting the clone process on the remote host");
193
  define("LM_MSG_BACK_5","Succesfully unpublished from frontend");
194
  define("LM_MSG_BACK_6","Unpublishing failed! Please check your paths!");
195
  define("LM_MSG_BACK_7","Succesfully published to frontend");
@@ -197,8 +198,8 @@ define("LM_MSG_BACK_8","Publishing failed! Please check your paths!");
197
  define("LM_MSG_BACK_9","Clones succesfully renamed!");
198
  define("LM_MSG_BACK_10","The Joomla path is not within your backup path! Could not use the direct download mode! You should edit your Configuration->System Tab and set 'Direct Download link' to No");
199
  define("LM_MSG_BACK_11","All done! Manual Backup process finished! <a href='index2.php?option=com_cloner&task=view'>Click here to continue</a>");
200
- define("LM_MSG_BACK_12","<h2>Backup failed! Please check that you have support for the zip utility(/usr/bin/zip or /usr/local/bin/zip) on your server and the path you set it's corect in Configuration, or choose the Tar archive type! </h2>");
201
- define("LM_MSG_BACK_13","<h2>Backup failed! Please check that you have support for the tar utility(/usr/bin/tar or /usr/local/bin/tar) on your server and the path you set it's corect in Configuration, or choose the Zip archive type! </h2>");
202
  define("LM_MSG_BACK_14","<font color='red'>There was a problem in generating the database backup, please check your mysqldump server path!</font>");
203
 
204
 
@@ -207,7 +208,7 @@ define("LM_CRON_TOP","Cron Command Setup");
207
  define("LM_CRON_SUB","<b>Using the cron function you can setup an automated backup generator for your website!</b>
208
  <br />To set it up, you need to add in your control panel crontab one of the following commands:");
209
  define("LM_CRON_HELP","Notes:
210
- - if you php location is diferent than /usr/bin/php please use that one, format /$"."php_path/php
211
 
212
 
213
  For more info on how to setup a cron for
@@ -220,11 +221,11 @@ If you need help setting up your cron job, please visit our forums <a href='http
220
  define("LM_CRON_SETTINGS","Cron settings");
221
  define("LM_CRON_MODE","Backup store mode:");
222
  define("LM_CRON_MODE_INFO"," <br />
223
- <small> please note:* if local server is choosed we will use the default backup path from General section to store the backup</small>
224
  <br />
225
- <small> please note:** if email mode is used, we do no guarantee that the backup will reach the mail account due to provider limitation</small>
226
  ");
227
- define("LM_CRON_TYPE_INFO","<small><br /> please choose your backup type you would like to create</small>");
228
  define("LM_CRON_MYSQL_DETAILS","Mysql Options");
229
  define("LM_CRON_MYSQL_DROP","Add Mysql Drop");
230
  define("LM_CRON_TYPE","Backup type:");
@@ -262,14 +263,14 @@ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","the path <i>[Backup Start Path/admini
262
  define("LM_CONFIG_INFO","This tab will show general system info and paths");
263
  define("LM_CONFIG_INFO_PATHS","General paths info:");
264
  define("LM_CONFIG_INFO_PHP","Php Configuration Information:");
265
- define("LM_CONFIG_INFO_TIME","<small>This controls the maximum time your script is allowed to run on server in seconds</small>");
266
- define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
267
  define("LM_CONFIG_INFO_BASEDIR","<small>This controls the paths your script is allowed to access, no value means it can access any path </small>");
268
  define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
269
  define("LM_CONFIG_INFO_VERSION","<small>PHP >=5.2.3 is required to enjoy all features</small>");
270
- define("LM_CONFIG_INFO_TAR","<small>If the script is unable to determine the tar path automatically, you might need to uncheck the 'Active' checkbox near TAR line in General Tab</small>");
271
- define("LM_CONFIG_INFO_ZIP","<small>If the script is unable to determine the zip path automatically, you might need to uncheck the 'Active' checkbox near ZIP line in General Tab</small>");
272
- define("LM_CONFIG_INFO_MSQL","<small>If the script is unable to determine the mysqldump path automatically, you might need to uncheck the 'Active' checkbox near MYSQLDUMP line in General Tabn</small>");
273
  define("LM_CONFIG_INFO_EXEC","<small>If this function is disabled, you might want to uncheck Both 'Active' checkboxes from the General Tab</small>");
274
  define("LM_CONFIG_INFO_BPATH","<small>needs to be writeable in order for XCloner to archive backups</small>");
275
 
@@ -277,7 +278,7 @@ define("LM_CONFIG_INFO_BPATH","<small>needs to be writeable in order for XCloner
277
  // --- TRANSFER DETAILS---//
278
 
279
  define("LM_TRANSFER_URL","Website Url:");
280
- define("LM_TRANSFER_URL_SUB","<small>Please provide the website url where backup will be moved, example http://www.sitename.com/, we need this because we will direct you there to access the restore script</small>");
281
  define("LM_TRANSFER_FTP_HOST","Ftp hostname:");
282
  define("LM_TRANSFER_FTP_HOST_SUB","example ftp.sitename.com");
283
  define("LM_TRANSFER_FTP_USER","Ftp username:");
@@ -285,7 +286,7 @@ define("LM_TRANSFER_FTP_USER_SUB","example 'john'");
285
  define("LM_TRANSFER_FTP_PASS","Ftp password:");
286
  define("LM_TRANSFER_FTP_PASS_SUB","example 'johnpass'");
287
  define("LM_TRANSFER_FTP_DIR","Ftp directory:");
288
- define("LM_TRANSFER_FTP_DIR_SUB","Please provide the ftp directory of where you would like to move the backup , example public_html/ or htdocs/ and make sure it has write permissions for everybody");
289
 
290
 
291
  // --- GENERATE BACKUP---//
@@ -295,30 +296,30 @@ define("LM_BACKUP_NAME_SUB","<small>if left blank we will generate a name by def
295
 
296
 
297
  // -- General --//
298
- define("LM_COM_TITLE" , "XCloner Manager - ");
299
- define("LM_COM_TITLE_CONFIRM" , "Confirm Folder Selection");
300
 
301
- define("LM_COL_FILENAME" , "Backup Set");
302
- define("LM_COL_DOWNLOAD" , "Download");
303
  define("LM_COL_AVALAIBLE","Frontend Package");
304
- define("LM_COL_SIZE" , "Size of Set");
305
- define("LM_COL_DATE" , "Date of Backup");
306
- define("LM_COL_FOLDER" , "<b>Excluded Folders and/or files</b>");
307
 
308
  define("LM_DELETE_FILE_SUCCESS", "Files Deleted");
309
  define("LM_DOWNLOAD_TITLE", "Download");
310
 
311
 
312
- define("LM_ARCHIVE_NAME" , "Archive Name");
313
- define("LM_NUMBER_FOLDERS" , "Number of Folders");
314
- define("LM_NUMBER_FILES" , "Number of Files");
315
- define("LM_SIZE_ORIGINAL" , "Size of Original File");
316
- define("LM_SIZE_ARCHIVE" , "Size of Archive");
317
- define("LM_DATABASE_ARCHIVE" , "Database Backup");
318
 
319
- define("LM_CONFIRM_INSTRUCTIONS" , "<b>Please select the folders you wish to exclude from archive</b> <br />
320
- - by default all folders are included, if you wish to exlude a folder and it's subfolders just check the box next to it");
321
- define("LM_CONFIRM_DATABASE" , "Backup Database");
322
 
323
 
324
  define("LM_DATABASE_EXCLUDED", "Excluded");
@@ -337,20 +338,19 @@ define("LM_RENAME_TO"," to ");
337
 
338
  define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations INFO!</h2><br />
339
  <pre>
340
- Restoring your backups has never been more easier!
341
  With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
342
- you will be able to move your website backup anywhere on the Internet.
343
 
344
  Here is what you have to do:
345
 
346
- <b>Step1 - move your backup to the restore host</b>
347
 
348
  - go into the XCloner 'View Backups' area
349
  - after you have selected your backup click on the 'Clone it' button
350
  - enter the ftp details of where you would like to Clone the backup
351
- - after hitting submit the backup and the restore script will be transfered on the new host and you
352
- will be given a url to access the next step based on the url you provided for the remote location
353
- - after you click the provided link you will be taken to the new location, sample url <b>http://my_restore_site.com/XCloner.php</b>
354
 
355
  <b>Note:</b> if this process fails for any reason, you need to do this:
356
  1. Download the backup on your computer
@@ -361,15 +361,14 @@ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations I
361
  <b>Step 2 - the XCloner.php restore screen:</b>
362
 
363
  <b>XCloner.php - the restore script</b>
364
- - at this step you have in place the backup you created and the Restore script
365
- - enter you new mysql details, this includes your new mysql hostname, user and pass, and a new database
366
- different from the original one
367
- - enter you new location Url and pass
368
  - to restore the files you have <b>2 options:</b>
369
 
370
  - 1. restore the files through ftp, the script will simulate a ftp upload process on your server, this will
371
  fix the permissions problem from step 2.
372
- - 2. restore the files directly, this will unarchive the files on your server, will work fast but it might
373
  result in some permission problems if you use your ftp a lot to make changes to the site
374
 
375
  - after you hit submit the script will attempt to move the files to the new path, directly or using ftp and
@@ -414,10 +413,9 @@ define("LM_LOGIN_TEXT","
414
  <pre>
415
  <b>Notes:</b>
416
  1. If you are on this screen for the first time, your default
417
- username is '<i>admin</i>' and password '<i>admin</i>', you will need
418
- to change them after login
419
 
420
- 2. if you forgot your password, to reset it you need to add
421
  this code:
422
 
423
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
17
  define("LM_FRONT_FTP_DIR_SUB","<small>Please provide the ftp directory of where you would like to install Joomla, example public_html/Joomla/ or htdocs/Joomla/ and make sure it has write permissions for everybody</small>");
18
  define("LM_TRANSFER_FTP_INCT","Incremental transfer: ");
19
  define("LM_TRANSFER_FTP_INCT_SUB","will attempt to transfer the files over ftp in an incremental mode to avoid any blank pages or timeouts ");
20
+ define("LM_FRONT_BOTTOM","Didn't work for you? Please tell us what happened -> <a href='http://www.xcloner.com/contact/'>Contact page</a><br />
21
  Powered by <a href='http://www.xcloner.com'>XCloner</a>");
22
  define("LM_FRONT_MSG_OK","We have uploaded the Package Restore Utility on your ftp site, to continue click here");
23
  define("LM_NOPAKCAGE_ERROR","There is no package selected, aborting...!");
31
  define("LM_AMAZON_S3_AWSSECRETKEY", "AWS Secret Key:");
32
  define("LM_AMAZON_S3_BUCKET", "Bucket name:");
33
  define("LM_AMAZON_S3_DIRNAME", "Upload Directory:");
34
+ define("LM_AMAZON_S3_SSL","Enable SSL transfer");
35
 
36
 
37
  define("LM_DATABASE_EXCLUDE_TABLES","Select tables to exclude from backup:");
38
  define("LM_CONFIG_SYSTEM_FOLDER","Folders display:");
39
  define("LM_CONFIG_SYSTEM_FOLDER_SUB","please select the mode you would like to select the exclude folders from 'Generate Backup' section");
40
  define("LM_CONFIG_SYSTEM_LANG","System Language:");
41
+ define("LM_CONFIG_SYSTEM_LANG_SUB","configures the XCloner language, if set to default it will display the default language of Joomla if available");
42
  define("LM_CONFIG_SYSTEM_LANG_DEFAULT","System Default");
43
  define("LM_CONFIG_SYSTEM_DOWNLOAD","Enable Direct Download link:");
44
  define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","if this is checked, in the 'View Backups' screen, the download link will be a direct link from your server to download the package, please note that the backup path must be within the Joomla root path");
45
  define("LM_CONFIG_DISPLAY","Display Settings");
46
  define("LM_CONFIG_SYSTEM","System Settings");
47
+ define("LM_CONFIG_SYSTEM_FTP","FTP Transfer Mode");
48
  define("LM_CONFIG_SYSTEM_FTP_SUB","select how the files will be transfered from server to server when using ftp protocol");
49
  define("LM_CONFIG_MEM","Backup using Server Functions");
50
  define("LM_CONFIG_MEM_SUB","<small>If set to Active, you will be required to have on your server support for <b>zip or tar</b> and/or <b>mysqldump</b> commands and specify their paths, and also <b>exec()</b> access in your php</small>");
51
  define("LM_CRON_DB_BACKUP","Enable Database backup:");
52
+ define("LM_CRON_DB_BACKUP_SUB","<small>Select this option to include mysql data in the backup.</small>");
53
  define("LM_CONFIG_SYSTEM_MBACKUP","Include backups directory in clone:");
54
+ define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>If selected, each backup will also include the previous backup files, hence increasing its size each time.</small>");
55
 
56
  define("LM_TAB_MYSQL","MYSQL");
57
  define("LM_CONFIG_MYSQL","MYSQL Connection Settings:");
84
  // --- CONFIG ---//
85
  define("LM_CONFIG_MANUAL","Backup Manual Process");
86
  define("LM_CONFIG_MANUAL_BACKUP","Manual backup:");
87
+ define("LM_CONFIG_MANUAL_BACKUP_SUB","Select this option if you have php time execution limitations on your server. This will require javascript activated in your browser");
88
  define("LM_CONFIG_MANUAL_FILES","Files to process per request:");
89
  define("LM_CONFIG_DB_RECORDS", "Database records per request");
90
  define("LM_CONFIG_MANUAL_REFRESH","Time between requests:");
91
  define("LM_CONFIG_SYSTEM_MDATABASES","Backup Multiple Databases:");
92
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","this option controls whether XCloner may backup multiple databases");
93
  define("LM_CONFIG_EXCLUDE_FILES_SIZE","Exclude files larger than:");
94
 
95
  define("LM_CONFIG_CRON_LOCAL","Local server*");
96
  define("LM_CONFIG_CRON_REMOTE","Remote ftp account");
97
  define("LM_CONFIG_CRON_EMAIL","Email**");
98
+ define("LM_CONFIG_CRON_FULL","Full (files + database)");
99
  define("LM_CONFIG_CRON_FILES","Files only");
100
  define("LM_CONFIG_CRON_DATABASE","Database only");
101
 
102
+ define("LM_CONFIG_EDIT","Editing config file:");
103
  define("LM_CONFIG_BSETTINGS","Backup Path Settings");
104
  define("LM_CONFIG_BSETTINGS_OPTIONS","Backup Generator Options");
105
  define("LM_CONFIG_BSETTINGS_SERVER","Server Use Options");
106
  define("LM_CONFIG_BPATH","Backup Store Path:");
107
  define("LM_CONFIG_UBPATH","Backup Start Path:");
108
  define("LM_CONFIG_BPATH_SUB","<small>this is the path where all backups will be stored</small>");
109
+ define("LM_CONFIG_UBPATH_SUB","<small>this is the base path that XCloner will use to select the backup files and directories</small>");
110
  define("LM_CRON_EXCLUDE","Excluded Directories");
111
  define("LM_CRON_EXCLUDE_DIR","Excluded directories list one per line:<br>please use full path of the server directory");
112
  define("LM_CRON_BNAME","Backup Name:");
113
  define("LM_CRON_BNAME_SUB","<small>if left blank we will generate a name by default each time a new cron backup is made</small>");
114
  define("LM_CRON_IP","Cron Allowed IP's:");
115
  define("LM_CRON_IP_SUB","<small>by default, only the local server will have access to the cron job, but you may enter also other IP's one per line</small>");
116
+ define("LM_CRON_DELETE_FILES","Delete Old Backups");
117
  define("LM_CRON_DELETE_FILES_SUB","Delete backups older than: ");
118
  define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Activate");
119
  define("LM_CRON_SEMAIL","Email cron log to: ");
152
  define("LM_FTP_TRANSFER_MORE","FTP Connection Mode");
153
  define("LM_REFRESH_MODE","Backup Refresh Mode");
154
  define("LM_DEBUG_MODE","Enable log:");
155
+ define("LM_REFRESH_ERROR","There was an error retrieving the JSON data from the server, try again or contact the developers!");
156
 
157
 
158
  // --- LANGUAGE --//
175
  define("LM_G_EXCLUDE_COMMENT","<br>Please enter here the excluded folders, each one per line!
176
  <br><b>you may want to disable the cache feature when doing a backup, or if not exlude the cache folder from the backup</b>");
177
  define("LM_TAB_G_COMMENTS_H2", "Enter below any additional comments to archive:");
178
+ define("LM_TAB_G_COMMENTS_NOTE","Please note, the comments are stored inside the archive, file <b>administrator/backups/.comments</b>");
179
 
180
  // --- MESSAGES --//
181
  // front end
189
  //backend
190
  define("LM_MSG_BACK_1","Config succesfully updated...");
191
  define("LM_MSG_BACK_2","FTP connection has failed!");
192
+ define("LM_MSG_BACK_3","Backup move DONE! The select backup should now be available on the provided location!");
193
+ define("LM_MSG_BACK_4","Moving done, starting the Clone process on the remote host");
194
  define("LM_MSG_BACK_5","Succesfully unpublished from frontend");
195
  define("LM_MSG_BACK_6","Unpublishing failed! Please check your paths!");
196
  define("LM_MSG_BACK_7","Succesfully published to frontend");
198
  define("LM_MSG_BACK_9","Clones succesfully renamed!");
199
  define("LM_MSG_BACK_10","The Joomla path is not within your backup path! Could not use the direct download mode! You should edit your Configuration->System Tab and set 'Direct Download link' to No");
200
  define("LM_MSG_BACK_11","All done! Manual Backup process finished! <a href='index2.php?option=com_cloner&task=view'>Click here to continue</a>");
201
+ define("LM_MSG_BACK_12","<h2>Backup failed! Please check that you have support for the zip utility(/usr/bin/zip or /usr/local/bin/zip) on your server and the path you set it's corect in Configuration, or choose the Tar archive type!</h2>");
202
+ define("LM_MSG_BACK_13","<h2>Backup failed! Please check that you have support for the tar utility(/usr/bin/tar or /usr/local/bin/tar) on your server and the path you set it's corect in Configuration, or choose the Zip archive type!</h2>");
203
  define("LM_MSG_BACK_14","<font color='red'>There was a problem in generating the database backup, please check your mysqldump server path!</font>");
204
 
205
 
208
  define("LM_CRON_SUB","<b>Using the cron function you can setup an automated backup generator for your website!</b>
209
  <br />To set it up, you need to add in your control panel crontab one of the following commands:");
210
  define("LM_CRON_HELP","Notes:
211
+ - if your php location is diferent than /usr/bin/php, please use that one, format /$"."php_path/php
212
 
213
 
214
  For more info on how to setup a cron for
221
  define("LM_CRON_SETTINGS","Cron settings");
222
  define("LM_CRON_MODE","Backup store mode:");
223
  define("LM_CRON_MODE_INFO"," <br />
224
+ <small> please note:* if local server is chosen, we will use the default backup path from the General section to store the backup</small>
225
  <br />
226
+ <small> please note:** if email mode is used, we do not guarantee that the backup will reach the mail account due to provider limitations</small>
227
  ");
228
+ define("LM_CRON_TYPE_INFO","<small><br /> please choose the backup type you would like to create</small>");
229
  define("LM_CRON_MYSQL_DETAILS","Mysql Options");
230
  define("LM_CRON_MYSQL_DROP","Add Mysql Drop");
231
  define("LM_CRON_TYPE","Backup type:");
263
  define("LM_CONFIG_INFO","This tab will show general system info and paths");
264
  define("LM_CONFIG_INFO_PATHS","General paths info:");
265
  define("LM_CONFIG_INFO_PHP","Php Configuration Information:");
266
+ define("LM_CONFIG_INFO_TIME","<small>This controls the maximum time (in seconds) your script is allowed to run on server</small>");
267
+ define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
268
  define("LM_CONFIG_INFO_BASEDIR","<small>This controls the paths your script is allowed to access, no value means it can access any path </small>");
269
  define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
270
  define("LM_CONFIG_INFO_VERSION","<small>PHP >=5.2.3 is required to enjoy all features</small>");
271
+ define("LM_CONFIG_INFO_TAR","<small>If the script is unable to determine the tar path automatically, you might need to uncheck the 'Active' checkbox near TAR line in General Tab</small>");
272
+ define("LM_CONFIG_INFO_ZIP","<small>If the script is unable to determine the zip path automatically, you might need to uncheck the 'Active' checkbox near ZIP line in General Tab</small>");
273
+ define("LM_CONFIG_INFO_MSQL","<small>If the script is unable to determine the mysqldump path automatically, you might need to uncheck the 'Active' checkbox near MYSQLDUMP line in General Tab</small>");
274
  define("LM_CONFIG_INFO_EXEC","<small>If this function is disabled, you might want to uncheck Both 'Active' checkboxes from the General Tab</small>");
275
  define("LM_CONFIG_INFO_BPATH","<small>needs to be writeable in order for XCloner to archive backups</small>");
276
 
278
  // --- TRANSFER DETAILS---//
279
 
280
  define("LM_TRANSFER_URL","Website Url:");
281
+ define("LM_TRANSFER_URL_SUB","<small>Please provide the website url to where backup will be moved, example http://www.sitename.com/, we need this because we will direct you there to access the restore script</small>");
282
  define("LM_TRANSFER_FTP_HOST","Ftp hostname:");
283
  define("LM_TRANSFER_FTP_HOST_SUB","example ftp.sitename.com");
284
  define("LM_TRANSFER_FTP_USER","Ftp username:");
286
  define("LM_TRANSFER_FTP_PASS","Ftp password:");
287
  define("LM_TRANSFER_FTP_PASS_SUB","example 'johnpass'");
288
  define("LM_TRANSFER_FTP_DIR","Ftp directory:");
289
+ define("LM_TRANSFER_FTP_DIR_SUB","Please provide the ftp directory of where you would like to move the backup, example public_html/ or htdocs/ and make sure it has write permissions for everybody");
290
 
291
 
292
  // --- GENERATE BACKUP---//
296
 
297
 
298
  // -- General --//
299
+ define("LM_COM_TITLE","XCloner Manager - ");
300
+ define("LM_COM_TITLE_CONFIRM","Confirm Folder Selection");
301
 
302
+ define("LM_COL_FILENAME","Backup Set");
303
+ define("LM_COL_DOWNLOAD","Download");
304
  define("LM_COL_AVALAIBLE","Frontend Package");
305
+ define("LM_COL_SIZE","Size of Set");
306
+ define("LM_COL_DATE","Date of Backup");
307
+ define("LM_COL_FOLDER","<b>Excluded Folders and/or files</b>");
308
 
309
  define("LM_DELETE_FILE_SUCCESS", "Files Deleted");
310
  define("LM_DOWNLOAD_TITLE", "Download");
311
 
312
 
313
+ define("LM_ARCHIVE_NAME","Archive Name");
314
+ define("LM_NUMBER_FOLDERS","Number of Folders");
315
+ define("LM_NUMBER_FILES","Number of Files");
316
+ define("LM_SIZE_ORIGINAL","Size of Original File");
317
+ define("LM_SIZE_ARCHIVE","Size of Archive");
318
+ define("LM_DATABASE_ARCHIVE","Database Backup");
319
 
320
+ define("LM_CONFIRM_INSTRUCTIONS","<b>Please select the folders you wish to exclude from the archive</b>
321
+ <br />- by default all folders are included, if you wish to exclude a folder and it's subfolders just check the box next to it");
322
+ define("LM_CONFIRM_DATABASE","Backup Database");
323
 
324
 
325
  define("LM_DATABASE_EXCLUDED", "Excluded");
338
 
339
  define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations INFO!</h2><br />
340
  <pre>
341
+ Restoring your backups has never been easier!
342
  With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
343
+ you will be able to move your website backup to anywhere on the Internet.
344
 
345
  Here is what you have to do:
346
 
347
+ <b>Step 1 - move your backup to the restore host</b>
348
 
349
  - go into the XCloner 'View Backups' area
350
  - after you have selected your backup click on the 'Clone it' button
351
  - enter the ftp details of where you would like to Clone the backup
352
+ - after hitting submit the backup and the restore script will be transfered to the new host and you will be given a url to access the next step based on the url you provided for the remote location
353
+ - after you click on the provided link you will be taken to the new location, sample url <b>http://my_restore_site.com/XCloner.php</b>
 
354
 
355
  <b>Note:</b> if this process fails for any reason, you need to do this:
356
  1. Download the backup on your computer
361
  <b>Step 2 - the XCloner.php restore screen:</b>
362
 
363
  <b>XCloner.php - the restore script</b>
364
+ - at this step you already should have in place the backup you created and the Restore script
365
+ - enter your new mysql access details, this includes your new mysql hostname, user and password, and a new database if different from the original one
366
+ - enter your new location Url and password
 
367
  - to restore the files you have <b>2 options:</b>
368
 
369
  - 1. restore the files through ftp, the script will simulate a ftp upload process on your server, this will
370
  fix the permissions problem from step 2.
371
+ - 2. restore the files directly, this will unarchive the files on your server, will work faster but it might
372
  result in some permission problems if you use your ftp a lot to make changes to the site
373
 
374
  - after you hit submit the script will attempt to move the files to the new path, directly or using ftp and
413
  <pre>
414
  <b>Notes:</b>
415
  1. If you are on this screen for the first time, your default
416
+ username is '<i>admin</i>' and password '<i>admin</i>', you should change them after login
 
417
 
418
+ 2. if you forget your password, to reset it you need to add
419
  this code:
420
 
421
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
language/francais.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // --- FRONT AREA---//
4
+ define("LM_FRONT_CHOOSE_PACKAGE","<b>Choisissez votre installation: </b>");
5
+ define("LM_FRONT_CHOOSE_PACKAGE_SUB","<small>S'il vous pla�t choisissez votre version de joomla ou de wordpress que vous souhaitez installer </small>");
6
+ define("LM_FRONT_TOP","<span colspan='2' class='contentheading'> Installez le Logiciel en ligne</span>");
7
+ define("LM_FRONT_TOP_FTP_DETAILS","<h2>Fournissez vos d�tails ftp ci-dessous: </h2>");
8
+ define("LM_FRONT_WEBSITE_URL","<b>Url de votre site</b>");
9
+ define("LM_FRONT_WEBSITE_URL_SUB","<small>S'il vous pla�t fournissez l'url du site Web Joomla ou wordpress sera install�, exemple http://www.sitename.com/Joomla ou Wordpress </small>");
10
+ define("LM_FRONT_FTP_HOST","<b>Nom du ftp:</b>");
11
+ define("LM_FRONT_FTP_HOST_SUB","<small>exemple ftp://123456878.fr</small>");
12
+ define("LM_FRONT_FTP_USER","<b>Login Ftp:</b>");
13
+ define("LM_FRONT_FTP_USER_SUB","<small>exmple 12345</small>");
14
+ define("LM_FRONT_FTP_PASS","<b>Mot de passe Ftp:</b>");
15
+ define("LM_FRONT_FTP_PASS_SUB","<small>exemple 5412</small>");
16
+ define("LM_FRONT_FTP_DIR","<b>R�pertoire Ftp</b>");
17
+ define("LM_FRONT_FTP_DIR_SUB","<small>S'il vous pla�t indiquer le r�pertoire du ftp o� vous aimeriez installer Joomla ou wordpress, exemple public_html / Joomla ou wordpress / ou htdocs / Joomla ou wordpress / et assurer vous d'avoir donn� les autorisations n�c�ssaires CHMOD</small>");
18
+ define("LM_TRANSFER_FTP_INCT","transfert Croissant:");
19
+ define("LM_TRANSFER_FTP_INCT_SUB","Transfert des fichiers par FTP en mode incr�mental afin d'�viter toute pages blanches ou des d�lais d'expiration");
20
+ define("LM_FRONT_BOTTOM","une erreur <a href='http://www.xcloner.com/contact/'>Page de Contact</a><br/>Propos� par <a href='http://www.xcloner.com'>XCloner</a>");
21
+ define("LM_FRONT_MSG_OK","Nous avons transf�r� la sauvegarde sur votre site ftp, pour continuer cliquez ici");
22
+ define("LM_NOPAKCAGE_ERROR","il n'y a aucun paquet s�lectionn�, erreur...");
23
+
24
+ // --- BACKEND AREA---//
25
+
26
+ //Amazon S3
27
+ define("LM_AMAZON_S3","Amazon S3");
28
+ define("LM_AMAZON_S3_ACTIVATE","Activer");
29
+ define("LM_AMAZON_S3_AWSACCESSKEY","Clef de l'Acc�s:");
30
+ define("LM_AMAZON_S3_AWSSECRETKEY","AWS Clef Secr�te:");
31
+ define("LM_AMAZON_S3_BUCKET","nom Bucket:");
32
+ define("LM_AMAZON_S3_DIRNAME","T�l�charger le R�pertoire:");
33
+
34
+
35
+ define("LM_DATABASE_EXCLUDE_TABLES","S�lectionner les tables � exclure de la sauvegarde");
36
+ define("LM_CONFIG_SYSTEM_FOLDER","Afficher les dossiers:");
37
+ define("LM_CONFIG_SYSTEM_FOLDER_SUB","s'il vous pla�t s�lectionner les dossiers � exclure de votre sauvegarde");
38
+ define("LM_CONFIG_SYSTEM_LANG","Langue du syst�me:");
39
+ define("LM_CONFIG_SYSTEM_LANG_SUB","Configurer la langue pour XCloner,par d�faut cela sera celle de Joomla ou wordpress si elle est disponible");
40
+ define("LM_CONFIG_SYSTEM_LANG_DEFAULT","Syst�me par d�faut");
41
+ define("LM_CONFIG_SYSTEM_DOWNLOAD","Activer lien de t�l�chargement direct:");
42
+ define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","si cette case est coch�e, l'�cran 'View Backups',le lien de t�l�chargement sera un lien direct � partir de votre serveur afin de t�l�charger l'ensemble, s'il vous pla�t noter que le chemin de sauvegarde doit �tre dans le chemin d'acc�s racine de Joomla ou wordpress");
43
+ define("LM_CONFIG_DISPLAY","Param�tres d'affichage");
44
+ define("LM_CONFIG_SYSTEM","Param�tres syst�me");
45
+ define("LM_CONFIG_SYSTEM_FTP","Mode de transfert FTP");
46
+ define("LM_CONFIG_SYSTEM_FTP_SUB","Choisir comment les fichiers seront transf�r�s de serveur � serveur lorsque vous utilisez le protocole FTP");
47
+ define("LM_CONFIG_MEM","Sauvegarde en utilisant les fonctions du Serveur");
48
+ define("LM_CONFIG_MEM_SUB","<small>Si la valeur est active, il vous sera demand� d'avoir sur votre support pour serveur l'utilisation <b> pour zip ou tar </b>et / ou <b> mysqldump</b> en commandes et de pr�ciser leurs chemins, et aussi <b > exec () </b> l'acc�s dans votre PHP</small>");
49
+ define("LM_CRON_DB_BACKUP","Activer la sauvegarde de base de donn�es:");
50
+ define("LM_CRON_DB_BACKUP_SUB","<small>cochez <b>Oui</b> si vous voulez sauvegarder les donn�es mysql</small>");
51
+ define("LM_CONFIG_SYSTEM_MBACKUP","Inclure les sauvegardes dans le r�pertoire clone:");
52
+ define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>Si r�gl� sur <b>Oui</b>, la sauvegarde cr�e contiendra �galement des fichiers des sauvegardes pr�c�dentes, ce qui augmente � chaque fois sa taille</small>");
53
+
54
+ define("LM_TAB_MYSQL","MYSQL ou MYSQLI");
55
+ define("LM_CONFIG_MYSQL","Param�tres de connexion MySQL:");
56
+ define("LM_CONFIG_MYSQLH","Nom d'h�te Mysql:");
57
+ define("LM_CONFIG_MYSQLU","Nom d'utilisateur MySQL:");
58
+ define("LM_CONFIG_MYSQLP","Mot de passe Mysql:");
59
+ define("LM_CONFIG_MYSQLD","Base de donn�es Mysql:");
60
+
61
+ define("LM_TAB_AUTH","Authentification");
62
+ define("LM_CONFIG_AUTH","Espace d'authentification de l'utilisateur");
63
+ define("LM_CONFIG_AUTH_USER","Utilisateur:");
64
+ define("LM_CONFIG_AUTH_PASS","Mot de passe:");
65
+ define("LM_CONFIG_AUTH_USER_SUB","Votre login utilisateur par d�faut � XCloner");
66
+ define("LM_CONFIG_AUTH_PASS_SUB","votre mot de passe de connexion par d�faut, laissez en blanc si vous ne voulez pas le changer");
67
+
68
+ define("LM_YES","Oui");
69
+ define("LM_NO","Non");
70
+ define("LM_ACTIVE","Activer");
71
+ define("LM_TAR_PATH","Chemin path ou commande:");
72
+ define("LM_TAR_PATH_SUB","(obligatoire si le type d'archive est TAR et la case coch�e est activ�e)");
73
+ define("LM_ZIP_PATH","Chemin du Zip ou de la commande:");
74
+ define("LM_ZIP_PATH_SUB","(obligatoire si le type d'archive est ZIP et la case coch�e est activ�e)");
75
+ define("LM_MYSQLDUMP_PATH","Chemin de mysqldump ou de commande: (obligatoire si la case Active est coch�e) <br/> Pour les grands dumps mysql s'il vous pla�t utiliser
76
+ <br/> <b> <small> mysqldump - quote-names - rapide - single-transaction - skip-comment </b> </small>");
77
+
78
+ // --- CONFIG ---//
79
+ define("LM_CONFIG_MANUAL","Processus de sauvegarde manuelle");
80
+ define("LM_CONFIG_MANUAL_BACKUP","Sauvegarde manuelle:");
81
+ define("LM_CONFIG_MANUAL_BACKUP_SUB","Cette option est indiqu�e si vous avez dans php des limitations de temps d'ex�cution sur votre serveur, il faudra javascript activ� sur votre navigateur");
82
+ define("LM_CONFIG_MANUAL_FILES","Fichiers � traiter par la requ�te:");
83
+ define("LM_CONFIG_DB_RECORDS","Enregistrements de base de donn�es selon la requ�te");
84
+ define("LM_CONFIG_MANUAL_REFRESH","Temps entre les requ�tes:");
85
+ define("LM_CONFIG_SYSTEM_MDATABASES","Sauvegarde des bases de donn�es multiples:");
86
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","Cette option activ� XCloner peut sauvegarder plusieurs bases de donn�es");
87
+ define("LM_CONFIG_EXCLUDE_FILES_SIZE","Exclure les fichiers de plus de:");
88
+
89
+ define("LM_CONFIG_CRON_LOCAL","Serveur local*");
90
+ define("LM_CONFIG_CRON_REMOTE","Compte ftp � distance");
91
+ define("LM_CONFIG_CRON_EMAIL","Courrier �lectronique**");
92
+ define("LM_CONFIG_CRON_FULL","Int�gral (fichiers + base de donn�es)");
93
+ define("LM_CONFIG_CRON_FILES","Uniquement les fichiers");
94
+ define("LM_CONFIG_CRON_DATABASE","Base de donn�es uniquement");
95
+
96
+ define("LM_CONFIG_EDIT","Modification du fichier de configuration");
97
+ define("LM_CONFIG_BSETTINGS","Param�tres du chemin de sauvegarde");
98
+ define("LM_CONFIG_BSETTINGS_OPTIONS","Options g�n�ral de sauvegarde");
99
+ define("LM_CONFIG_BSETTINGS_SERVER","Utiliser les options serveur");
100
+ define("LM_CONFIG_BPATH","Chemin de sauvegarde:");
101
+ define("LM_CONFIG_UBPATH","D�marrer la sauvegarde:");
102
+ define("LM_CONFIG_BPATH_SUB","<small>Chemin o� toutes les sauvegardes seront stock�es</small>");
103
+ define("LM_CONFIG_UBPATH_SUB","<small>d�signer un chemin pour la sauvegarde initiale, d'o� XCloner va commencer tous les processus</small>");
104
+ define("LM_CRON_EXCLUDE","R�pertoires exclus");
105
+ define("LM_CRON_EXCLUDE_DIR","Exclure la liste des r�pertoires un par ligne: <br> s'il vous pla�t utiliser le chemin complet du r�pertoire du serveur");
106
+ define("LM_CRON_BNAME","Nom de la sauvegarde:");
107
+ define("LM_CRON_BNAME_SUB","<small>S'il est laiss� en blanc, cela va g�n�rer automatiquement un nom par d�faut � chaque nouvelle sauvegarde</small>");
108
+ define("LM_CRON_IP","Cron admis IP's:");
109
+ define("LM_CRON_IP_SUB","<small>Par d�faut, seul le serveur local aura acc�s � la t�che CRON, mais vous pouvez entrer aussi une autre adresse IP, une par ligne</small>");
110
+ define("LM_CRON_DELETE_FILES","Supprimer sauvegardes les plus anciennes");
111
+ define("LM_CRON_DELETE_FILES_SUB","Supprimer des sauvegardes anciennes de:");
112
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE","Activer");
113
+ define("LM_CRON_SEMAIL","Email journal de cron �:");
114
+ define("LM_CRON_SEMAIL_SUB","Si une adresse e-mail est inscrite, apr�s l'ex�cution d'une t�che cron, le journal sera envoy� � cette adresse, des adresses multiples peuvent �tre ajout�s en les s�parants par <b>;</b>");
115
+ define("LM_CRON_MCRON","Nom de la configuration:");
116
+ define("LM_CRON_MCRON_AVAIL","Configurations disponibles:");
117
+ define("LM_CRON_MCRON_R","s'il vous pla�t donner un nom simple pour la configuration de votre nouvelle cron");
118
+ define("LM_CRON_MCRON_SUB","Avec cette option, vous serez en mesure d'enregistrer la configuration actuelle dans un fichier s�par� et de l'utiliser pour l'ex�cution de t�ches cron multiples");
119
+ define("LM_CRON_SETTINGS_M","Multiples CronJobs Configuration");
120
+ define("LM_CONFIG_SPLIT_BACKUP_SIZE","Split de sauvegarde des archives si la taille plus grande que:");
121
+
122
+ // --- MENU ---//
123
+ define("LM_MENU_OPEN_ALL","ouvrir Menu");
124
+ define("LM_MENU_CLOSE_ALL","fermer Menu");
125
+ define("LM_MENU_ADMINISTRATION","Administration");
126
+ define("LM_MENU_CLONER","Xcloner");
127
+ define("LM_MENU_CONFIGURATION","Configurations");
128
+ define("LM_MENU_CRON","CRON");
129
+ define("LM_MENU_LANG","Traduction");
130
+ define("LM_MENU_ACTIONS","Action");
131
+ define("LM_MENU_Generate_backup","G�n�rer des sauvegardes");
132
+ define("LM_MENU_Restore_backup","Restaurer la sauvegarde");
133
+ define("LM_MENU_View_backups","Voir les sauvegardes");
134
+ define("LM_MENU_Documentation","Aide");
135
+ define("LM_MENU_ABOUT","A propos de");
136
+ define("LM_DELETE_FILE_FAILED","�chec de la suppression, s'il vous pla�t v�rifier les permissions sur les fichiers");
137
+ define("LM_Joomla ou wordpressPLUG_CP","XCloner - Votre site de sauvegarde et de restauration solution");
138
+ define("LM_MENU_FORUM","Forum en ligne");
139
+ define("LM_MENU_SUPPORT","Support en ligne");
140
+ define("LM_MENU_WEBSITE","Site Web");
141
+
142
+ define("LM_MAIN_Settings","Param�tres");
143
+ define("LM_MAIN_View_Backups","Voir les sauvegardes");
144
+ define("LM_MAIN_Generate_Backup","G�n�rer des sauvegardes");
145
+ define("LM_MAIN_Help","Aide");
146
+ define("LM_FTP_TRANSFER_MORE","Mode de connexion FTP");
147
+ define("LM_REFRESH_MODE","Rafra�chir sauvegarde");
148
+ define("LM_DEBUG_MODE","Activer le journal:");
149
+ define("LM_REFRESH_ERROR","Il y a eu une erreur d'extraction des donn�es JSON � partir du serveur, essayez � nouveau ou contacter les d�veloppeurs!");
150
+
151
+ // --- LANGUAGE --//
152
+ define("LM_LANG_NAME","Nom de la langue");
153
+ define("LM_LANG_MSG_DEL","Langue(s) supprim� avec succ�s!");
154
+ define("LM_LANG_NEW","Nom de la nouvelle langue:");
155
+ define("LM_LANG_EDIT_FILE","�dition du fichier:");
156
+ define("LM_LANG_EDIT_FILE_SUB","Ne pas oublier de sauvegarder votre traduction toutes les 5 minutes, appuyez simplement sur le bouton Appliquer pour mettre � jour");
157
+
158
+ // --- TABS --//
159
+ define("LM_TAB_GENERAL","G�n�ral");
160
+ define("LM_TAB_G_STRUCTURE","Structures");
161
+ define("LM_TAB_SYSTEM","Syst�me");
162
+ define("LM_TAB_CRON","Cron");
163
+ define("LM_TAB_INFO","Info");
164
+ define("LM_TAB_G_DATABASE","Options de base de donn�es");
165
+ define("LM_TAB_G_FILES","Options Fichiers");
166
+ define("LM_TAB_G_COMMENTS","Commentaires sauvegardes");
167
+ define("LM_G_EXCLUDE_COMMENT","<br>S'il vous pla�t entrer ici les dossiers � exclure,un par ligne!
168
+ <br><b> vous pouvez d�sactiver la fonction du cache lorsque vous effectuez une sauvegarde, ou ne pas exclure le dossier cache de la sauvegarde </b>");
169
+ define("LM_TAB_G_COMMENTS_H2","Saisissez ci-dessous tout commentaire suppl�mentaire pour archiver:");
170
+ define("LM_TAB_G_COMMENTS_NOTE","S'il vous pla�t noter que les commentaires sont stock�s dans les archives <b>administrator/backups/.comments</b>");
171
+
172
+ // --- MESSAGES --//
173
+ // front end
174
+ define("LM_MSG_FRONT_1","Aucune sauvegarde disponible");
175
+ define("LM_MSG_FRONT_2","Chargement FTP a �chou� pour la destination");
176
+ define("LM_MSG_FRONT_3","Envoi effectu� pour");
177
+ define("LM_MSG_FRONT_4","Connexion FTP a �chou�!");
178
+ define("LM_MSG_FRONT_5","Tentative de connexion �");
179
+ define("LM_MSG_FRONT_6","pour l'utilisateur");
180
+
181
+ //backend
182
+ define("LM_MSG_BACK_1","Configuration mise � jour ...");
183
+ define("LM_MSG_BACK_2","Connexion FTP a �chou�!");
184
+ define("LM_MSG_BACK_3","D�placement de la sauvegarde FAITE! La sauvegarde s�lectionnez doit maintenant �tre disponible � l'emplacement pr�vu!");
185
+ define("LM_MSG_BACK_4","D�placement fait, d�marrer le processus de clonage sur l'h�te distant");
186
+ define("LM_MSG_BACK_5","Ensemble non publi�es � partir de l'interface");
187
+ define("LM_MSG_BACK_6","Erreur...S'il vous pla�t v�rifier vos chemins!");
188
+ define("LM_MSG_BACK_7","Publi� avec succ�s pour Interface");
189
+ define("LM_MSG_BACK_8","Erreur...S'il vous pla�t v�rifier vos chemins!");
190
+ define("LM_MSG_BACK_9","Clones renomm� avec succ�s!");
191
+ define("LM_MSG_BACK_10","Le chemin d'acc�s de Joomla ou wordpress n'est pas au sein de votre r�pertoire de sauvegarde! Impossible d'utiliser le mode de t�l�chargement direct!");
192
+ define("LM_MSG_BACK_11","Tout est fait! Tout est fait! Le processus de sauvegarde manuel est fini! <a href='index2.php?option=com_cloner&task=view'>Cliquer ici pour continuer </a>");
193
+ define("LM_MSG_BACK_12","<h2>La sauvegarde a �chou�! S'il vous pla�t v�rifiez que vous avez le support de l'utilitaire zip (/ usr / bin / zip ou / usr / local / bin / zip) sur votre serveur et que le chemin d'acc�s soit correcte ou choisir le type d'archive Tar!</h2>");
194
+ define("LM_MSG_BACK_13","<h2>La sauvegarde a �chou�! S'il vous pla�t v�rifiez que vous avez le support de l'utilitaire zip (/ usr / bin / zip ou / usr / local / bin / zip) sur votre serveur et que le chemin d'acc�s soit correcte ou choisir le type d'archive ZIP!</h2>");
195
+ define("LM_MSG_BACK_14","<font color='red'>Il y a eu un probl�me dans la cr�ation de la sauvegarde de base de donn�es, s'il vous pla�t v�rifiez le chemin du serveur mysqldump!</font>");
196
+
197
+
198
+
199
+ define("LM_CRON_TOP","Commande de configuration Cron");
200
+ define("LM_CRON_SUB","<b>Utilisation de la fonction cron, vous pouvez configurer un g�n�rateur automatique de sauvegarde pour votre site web ! </b>
201
+ <br/> Pour l'installer, vous devez ajouter � votre panneau de configuration <b>crontab</b> l'une des commandes suivantes:");
202
+ define("LM_CRON_HELP","<b>Notes:<br>
203
+ - Si vous avez dans votre php un emplacement diff�rent de celui / usr / bin / php s'il vous pla�t utiliser ce format /$"."php_path/php </b>
204
+ <br>
205
+
206
+ Pour plus d'informations sur comment configurer un cron pour
207
+ <br>- Cpanel <a href='http://www.cpanel.net/docs/cpanel/' target='_blank'>Cliquer Ici</a>
208
+ <br>- Plesk <a href='http://www.swsoft.com/doc/tutorials/Plesk/Plesk7/plesk_plesk7_eu/plesk7_eu_crontab.htm' target='_blank'>Cliquer Ici</a>
209
+ <br>- Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>Cliquer Ici</a>
210
+ <br>- Informations g�n�rales crontab Linux <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>Cliquer Ici</a>
211
+ <br> Si vous avez besoin d'aide pour configurer votre CRON, s'il vous pla�t visitez notre forum <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>");
212
+ define("LM_CRON_SETTINGS","Param�tres Cron");
213
+ define("LM_CRON_MODE","Mode de stockage sauvegarde:");
214
+ define("LM_CRON_MODE_INFO"," <br/>
215
+ <small> S'il vous pla�t noter: * si le serveur local est choisi nous allons utiliser le chemin de sauvegarde par d�faut pour stocker la sauvegarde</small>
216
+ <br/>
217
+ <small> S'il vous pla�t noter: ** si le mode email est utilis�e, nous avons pas de garantie que la sauvegarde sera port�e au compte de messagerie en raison de la limitation fournisseur</small>");
218
+ define("LM_CRON_TYPE_INFO","<small><br/> s'il vous pla�t choisir votre type de sauvegarde que vous souhaitez cr�er</small>");
219
+ define("LM_CRON_MYSQL_DETAILS","Options Mysql");
220
+ define("LM_CRON_MYSQL_DROP","Ajouter Mysql Drop");
221
+ define("LM_CRON_TYPE","Type de sauvegarde:");
222
+ define("LM_CRON_FTP_DETAILS","Sauvegarder configuration FTP:");
223
+ define("LM_CRON_FTP_SERVER","Serveur ftp:");
224
+ define("LM_CRON_FTP_USER","Nom d'utilisateur FTP:");
225
+ define("LM_CRON_FTP_PASS","Mot de passe FTP:");
226
+ define("LM_CRON_FTP_PATH","chemin d'acc�s FTP:");
227
+ define("LM_CRON_FTP_DELB","Supprimer sauvegarde apr�s le transfert");
228
+ define("LM_CRON_EMAIL_DETAILS","d�tails Email :");
229
+ define("LM_CRON_EMAIL_ACCOUNT","Compte Email:");
230
+ define("LM_CRON_COMPRESS","Compresser les fichiers de sauvegarde:");
231
+ define("LM_RESTORE_TOP","Information restauration de votre sauvegarde");
232
+ define("LM_CREDIT_TOP","A propos de XCloner");
233
+ define("LM_CLONE_FORM_TOP","<h2>Fournir les d�tails de votre ftp ci-dessous:</h2>");
234
+
235
+ // --- Info Tab ---//
236
+
237
+ define("LM_CONFIG_INFO_T_SAFEMODE","Mode sans �chec PHP:");
238
+ define("LM_CONFIG_INFO_T_VERSION","V�rification de la version PHP:");
239
+ define("LM_CONFIG_INFO_T_MTIME","Temps maximal d'ex�cution:");
240
+ define("LM_CONFIG_INFO_T_MEML","Limite m�moire:");
241
+ define("LM_CONFIG_INFO_T_BDIR","Ouverture base PHP");
242
+ define("LM_CONFIG_INFO_T_EXEC","exec () support:");
243
+ define("LM_CONFIG_INFO_T_TAR","chemin d'acc�s Tar:");
244
+ define("LM_CONFIG_INFO_T_ZIP","chemin d'acc�s Zip:");
245
+ define("LM_CONFIG_INFO_T_MSQL","chemin d'acc�s mysqldump:");
246
+ define("LM_CONFIG_INFO_T_BPATH","Chemin de sauvegarde:");
247
+ define("LM_CONFIG_INFO_ROOT_PATH_SUB","le chemin d'acc�s du lancement de la sauvegarde doit exister et �tre lisibles pour que XCloner puisse d�marrer le processus de sauvegarde");
248
+ define("LM_CONFIG_INFO_ROOT_BPATH_TMP","Dossier temporaire");
249
+ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","Le chemin d'acc�s <i>[Backup Start Path/administrator/backups]</i> doit �tre cr�e et �tre accessible en �criture pour que XCloner fonctionne correctement");
250
+
251
+
252
+
253
+ define("LM_CONFIG_INFO","Cet onglet affiche des informations syst�me g�n�ral et les chemins d'acc�s");
254
+ define("LM_CONFIG_INFO_PATHS","Info G�n�ral chemin d'acc�s:");
255
+ define("LM_CONFIG_INFO_PHP","Information configuration Php:");
256
+ define("LM_CONFIG_INFO_TIME","<small>Cela contr�le le temps maximum d'�x�cution du script vers votre serveur</small>");
257
+ define("LM_CONFIG_INFO_MEMORY","<small> Ce contr�le la quantit� maximale de m�moire le script peut allouer � ses processus </small>");
258
+ define("LM_CONFIG_INFO_BASEDIR","<small>Cela contr�le les chemins d'acc�s de votre script autoris� � acc�der, aucune valeur signifie qu'il peut acc�der � n'importe quel chemin d'acc�s</small>");
259
+ define("LM_CONFIG_INFO_SAFEMODE","<small> mode sans �chec devra �tre r�gl� sur Off pour que XCloner pour fonctionner correctement </small>");
260
+ define("LM_CONFIG_INFO_VERSION","<small> PHP> = 5.2.3 est n�cessaire</small>");
261
+ define("LM_CONFIG_INFO_TAR","<small>Si le script n'est pas en mesure de d�terminer le chemin d'acc�s de TAR automatiquement, vous pourriez avoir besoin de d�cocher la case activ� pr�s de la ligne TAR dans l'onglet G�n�ral</small>");
262
+ define("LM_CONFIG_INFO_ZIP","<small>Si le script n'est pas en mesure de d�terminer le chemin d'acc�s ZIP automatiquement, vous pourriez avoir besoin de d�cocher la case activ� pr�s de la ligne ZIP dans l'onglet G�n�ral</small>");
263
+ define("LM_CONFIG_INFO_MSQL","<small>Si le script n'est pas en mesure de d�terminer le chemin d'acc�s MYSQLDUMP automatiquement, vous pourriez avoir besoin de d�cocher la case activ� pr�s de la ligne mysqldump dans l'onglet G�n�ral</small>");
264
+ define("LM_CONFIG_INFO_EXEC","<small>Si cette fonction est d�sactiv�e, vous pouvez d�cocher les deux cases �actif� de l'onglet G�n�ral</small>");
265
+ define("LM_CONFIG_INFO_BPATH","<small>doit �tre accessible en �criture pour que XCloner acc�de aux sauvegardes d'archives</small>");
266
+
267
+ // --- TRANSFER DETAILS---//
268
+
269
+ define("LM_TRANSFER_URL","Adresse du site");
270
+ define("LM_TRANSFER_URL_SUB","<small>S'il vous pla�t fournir l'URL du site o� sera d�plac� de sauvegarde, http://www.sitename.com/ exemple, nous avons besoin de cela parce que nous allons vous diriger l� pour acc�der au script de restauration</small>");
271
+ define("LM_TRANSFER_FTP_HOST","Nom d'h�te FTP:");
272
+ define("LM_TRANSFER_FTP_HOST_SUB","exemple ftp.123456");
273
+ define("LM_TRANSFER_FTP_USER","Nom d'utilisateur FTP:");
274
+ define("LM_TRANSFER_FTP_USER_SUB","exemple '1234565'");
275
+ define("LM_TRANSFER_FTP_PASS","Mot de passe FTP :");
276
+ define("LM_TRANSFER_FTP_PASS_SUB","exemple 'test'");
277
+ define("LM_TRANSFER_FTP_DIR","R�pertoire ftp:");
278
+ define("LM_TRANSFER_FTP_DIR_SUB","S'il vous pla�t indiquer le r�pertoire ftp de l'endroit o� vous souhaitez d�placer la sauvegarde, exemple public_html/ ou htdocs/ et assurez-vous qu'il a les permissions d'�criture pour tout le monde");
279
+
280
+ // --- GENERATE BACKUP---//
281
+
282
+ define("LM_BACKUP_NAME","<b>S'il vous pla�t choisissez votre nom de la sauvegarde</b>");
283
+ define("LM_BACKUP_NAME_SUB","<small>s'il est laiss� en blanc, cela va g�n�rer un nom par d�faut!</small>");
284
+
285
+
286
+ // -- General --//
287
+ define("LM_COM_TITLE" , "XCloner Manager - ");
288
+ define("LM_COM_TITLE_CONFIRM" , "Confirmer la s�lection des dossiers");
289
+
290
+ define("LM_COL_FILENAME" , "Sauvegarde");
291
+ define("LM_COL_DOWNLOAD" , "T�l�charger");
292
+ define("LM_COL_AVALAIBLE","Interface Programme");
293
+ define("LM_COL_SIZE" , "Taille");
294
+ define("LM_COL_DATE" , "Date");
295
+ define("LM_COL_FOLDER" , "<b>Dossiers exclus et/ou fichiers</b>");
296
+
297
+ define("LM_DELETE_FILE_SUCCESS","fichiers supprim�s");
298
+ define("LM_DOWNLOAD_TITLE","T�l�charger");
299
+
300
+ define("LM_ARCHIVE_NAME" , "Nom Archive");
301
+ define("LM_NUMBER_FOLDERS" , "Nombre de dossiers");
302
+ define("LM_NUMBER_FILES" , "Nombre de fichiers");
303
+ define("LM_SIZE_ORIGINAL" , "Taille du fichier original");
304
+ define("LM_SIZE_ARCHIVE" , "Taille de l'archive");
305
+ define("LM_DATABASE_ARCHIVE" , "Base de donn�es de sauvegarde");
306
+
307
+ define("LM_CONFIRM_INSTRUCTIONS" , "<b>S'il vous pla�t s�lectionnez les dossiers que vous souhaitez exclure de l'archive</b> <br />
308
+ - par d�faut, tous les dossiers sont inclus, si vous souhaitez exlure un dossier et un sous-dossiers il suffit de cocher la case � c�t� de lui");
309
+ define("LM_CONFIRM_DATABASE" , "Sauvegarde Base de donn�es");
310
+
311
+
312
+ define("LM_DATABASE_EXCLUDED","Exclus");
313
+ define("LM_DATABASE_CURRENT","Base de donn�es courante:");
314
+ define("LM_DATABASE_INCLUDE_DATABASES","Inclure d'autres bases");
315
+ define("LM_DATABASE_INCLUDE_DATABASES_SUB","vous pouvez s�lectionner plusieurs bases de donn�es � inclure dans la sauvegarde en maintenant la touche CTRL enfonc�e et en s�lectionnant les �l�ments souhait�s avec votre souris, les bases de donn�es seront stock�es dans administrator / r�pertoire de sauvegarde de vos archives");
316
+
317
+ define("LM_DATABASE_MISSING_TABLES","Erreur: table d�finition non trouv�");
318
+ define("LM_DATABASE_BACKUP_FAILED","�chec de la sauvegarde, s'il vous pla�t v�rifiez que l'administrateur / r�pertoire des sauvegardes est accessible en �criture!");
319
+ define("LM_DATABASE_BACKUP_COMPLETED","Sauvegarde termin�e");
320
+ define("LM_RENAME_TOP","Renommer clones s�lectionn�s");
321
+ define("LM_RENAME","Renommer clone");
322
+ define("LM_RENAME_TO","�");
323
+ // --- CLONER RESTORE--- //
324
+
325
+ define("LM_CLONER_RESTORE","<h2> Comment faire pour restaurer une sauvegarde sur diff�rents endroits INFO! </h2> <br/>
326
+ <pre>
327
+ Restaurer vos sauvegardes n'a jamais �t� aussi facile!
328
+ Avec l'aide de notre fonction de clonage � partir du <a href='index2.php?option=com_cloner&task=view'> Voir les sauvegardes </a>
329
+ vous pourrez d�placer votre sauvegarde n'importe o� sur le site Internet.
330
+
331
+ Voici ce que vous avez � faire:
332
+
333
+ <b> Etape 1 - d�placer votre sauvegarde pour la restauration </b>
334
+
335
+ - Aller dans XCloner 'Voir les Sauvegardes'
336
+ - Apr�s avoir s�lectionn� votre sauvegarde cliquez sur le bouton 'Clone'
337
+ - Entrer les d�tails ftp de l'endroit o� vous souhaitez Cloner la sauvegarde
338
+ - apr�s avoir appuy� pour soumettre la sauvegarde et la restauration le script sera transf�r� sur le nouvel h�te et vous recevrez une url pour acc�der � l'�tape suivante sur la base des url que vous avez fournis pour la localisation � distance
339
+ - Apr�s avoir cliqu� sur le lien fourni, vous serez redirig� vers le nouvel emplacement exemple <b>http://my_restore_site.com/XCloner.php</b>
340
+
341
+ <b> Note: </b> Si ce processus �choue pour une raison quelconque, vous devez faire ceci:
342
+ 1. T�l�charger la sauvegarde sur votre ordinateur
343
+ 2. T�l�charger le script de restauration, tous les fichiers
344
+ administrator/components/com_xcloner-backupandrestore/restore/
345
+ 3. Envoyer la sauvegarde et la restauration du script � votre emplacement de restauration
346
+ 4. Lancer XCloner.php dans votre navigateur et suivez la restauration comme indiqu� ci-dessous
347
+
348
+ <b> �tape 2 - le XCloner.php restauration: </b>
349
+
350
+ <b> XCloner.php - le script de restauration </b>
351
+ - � cette �tape, vous avez mis en place la sauvegarde que vous avez cr�� et le script de restauration
352
+ - entrez vos nouvelles coordonn�es mysql, ce qui inclut votre nouveau nom d'h�te MySQL, un utilisateur et mot de passe, et une nouvelle base de donn�es
353
+ diff�rent de celui d'origine
354
+ - Entrez votre nouvelle adresse URL et de suivant
355
+ - Pour restaurer les fichiers que vous avez <b> 2 options: </b>
356
+
357
+ - 1. restaurer les fichiers par FTP, le script va simuler un processus de transfert ftp sur votre serveur, cela va r�soudre le probl�me des autorisations de l'�tape 2.
358
+ - 2. restaurer les fichiers directement, cela d�comlpresse les fichiers sur votre serveur, fonctionne plus rapidement, mais elle pourrait donner lieu � des probl�mes de droits si vous utilisez votre ftp beaucoup pour apporter des modifications sur le site
359
+
360
+ - Une fois que vous cliquez sur Soumettre le script va tenter de d�placer les fichiers vers le nouveau chemin, directement ou par ftp et
361
+ va installer la base de donn�e
362
+ - Si tout va bien votre nouveau site est op�rationnel sur le nouvel emplacement
363
+
364
+ Pour le support s'il vous pla�t consulter notre <a forums href='http://www.xcloner.com/support/forums/' target='_blank'> http://www.xcloner.com/support/forums/ </a>
365
+ ou par courriel � href='mailto:info@xcloner.com'> <a info@xcloner.com </a>
366
+
367
+
368
+ </ pre>");
369
+ define("LM_CLONER_ABOUT"," <h2>Sauvegarde XCloner</h2>
370
+ XCloner est un outil qui vous aidera � g�rer vos sauvegardes de votre site, G�n�rer / Restauration / D�placer afin que votre site sera toujours Garanti !
371
+ <br/> <br/>
372
+ Caract�ristiques:
373
+ <ul>
374
+ <li>Script cron pour g�n�rer des sauvegardes automatiques </li>
375
+ <li>Plusieurs options de sauvegarde</li>
376
+ <li>Outil de restauration pour passer le site rapidement vers d'autres emplacements</li>
377
+ <li>Stocker la sauvegarde en local,ou � distance</li>
378
+ <li>AJAX/JSON interface de sauvegarde </li>
379
+ <li>Code autonome, pouvez sauvegarder n'importe quel PHP / Mysql site web</li>
380
+ <li>Base de donn�es et fichiers de backup suppl�mentaire</li>
381
+ <li>Balayage de syst�me de fichiers progressif</li>
382
+ <li>Amazon S3 support</li>
383
+ </ul>
384
+ <br/>
385
+ Pour les rapports et propositions s'il vous pla�t contacter l'auteur info@xcloner.com ou visiter son site sur <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
386
+ <br/>XCloner.com � 2004-2011 </a> <br/> <p/> <br/>");
387
+ define("LM_LOGIN_TEXT","<pre>
388
+ <b>Notes:</b>
389
+ 1. Si vous �tes sur cet �cran pour la premi�re fois,par d�faut le nom d'utilisateur est <b> '<i>admin</i>' et le mot de passe est '<i>admin</i>'</b>
390
+
391
+ 2. si vous avez oubli� votre mot de passe, pour le r�initialiser, vous devez ajouter ce code:
392
+ <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
393
+ � la fin du fichier de configuration <b> cloner.config.php juste avant la ligne ?></b>
394
+ Ne pas oublier de remplacer le mot de passe <b>my_new_pass </b> par votre mot de passe r�el
395
+ </pre>");
396
+ ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.xcloner.com/
4
  Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload, wordpress backup, backup plugin, database backup, database restore, site move, transfer, blog transfer, BuddyPress
5
  Requires at least: 2.0.2
6
  Tested up to: 3.1
7
- Stable tag: 3.0
8
 
9
  XCloner is a full backup and restore plugin for Wordpress, it will backup and restore both files and database. www.xcloner.com
10
 
@@ -41,7 +41,7 @@ Features:
41
  4. Access it from the Plugins->XCloner menu
42
 
43
  UPGRADE:
44
-
45
  If you plan on upgrading your XCloner installation, to keep it's original setting, please keep a copy after your wp-content/plugins/xcloner-backup-and-restore/cloner.config.php file, and re-upload it after the upgrade.
46
 
47
  == Frequently Asked Questions ==
@@ -68,6 +68,9 @@ If the inside Clone option fails for some reason, you need to:
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 3.0 =
72
  * incremental database backup
73
  * incremental file system scan
@@ -90,5 +93,5 @@ If the inside Clone option fails for some reason, you need to:
90
 
91
  == Upgrade Notice ==
92
 
93
- = 3.0 =
94
- Please check the changelog, there are several improvements, including better interface, better incremental backup process, as well as several restore addons and speed improvements
4
  Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload, wordpress backup, backup plugin, database backup, database restore, site move, transfer, blog transfer, BuddyPress
5
  Requires at least: 2.0.2
6
  Tested up to: 3.1
7
+ Stable tag: 3.0.1
8
 
9
  XCloner is a full backup and restore plugin for Wordpress, it will backup and restore both files and database. www.xcloner.com
10
 
41
  4. Access it from the Plugins->XCloner menu
42
 
43
  UPGRADE:
44
+
45
  If you plan on upgrading your XCloner installation, to keep it's original setting, please keep a copy after your wp-content/plugins/xcloner-backup-and-restore/cloner.config.php file, and re-upload it after the upgrade.
46
 
47
  == Frequently Asked Questions ==
68
 
69
  == Changelog ==
70
 
71
+ = 3.0.1 =
72
+ * several important security and bug fixes
73
+
74
  = 3.0 =
75
  * incremental database backup
76
  * incremental file system scan
93
 
94
  == Upgrade Notice ==
95
 
96
+ = 3.0.1 =
97
+ Important security and bug fixes, upgrade is Highly recommended!
restore/TAR.php DELETED
@@ -1,2084 +0,0 @@
1
- <?php
2
- /* vim: set ts=4 sw=4: */
3
- // +----------------------------------------------------------------------+
4
- // | PHP Version 4 |
5
- // +----------------------------------------------------------------------+
6
- // | Copyright (c) 1997-2003 The PHP Group |
7
- // +----------------------------------------------------------------------+
8
- // | This source file is subject to version 3.0 of the PHP license, |
9
- // | that is bundled with this package in the file LICENSE, and is |
10
- // | available through the world-wide-web at the following url: |
11
- // | http://www.php.net/license/3_0.txt. |
12
- // | If you did not receive a copy of the PHP license and are unable to |
13
- // | obtain it through the world-wide-web, please send a note to |
14
- // | license@php.net so we can mail you a copy immediately. |
15
- // +----------------------------------------------------------------------+
16
- // | Author: Vincent Blavet <vincent@phpconcept.net> |
17
- // +----------------------------------------------------------------------+
18
- //
19
- // $Id: Tar.php,v 1.39 2006/12/22 19:20:08 cellog Exp $
20
-
21
- #require_once 'PEAR.php';
22
-
23
-
24
- define ('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
25
- define ('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));
26
-
27
- /**
28
- * Creates a (compressed) Tar archive
29
- *
30
- * @author Vincent Blavet <vincent@phpconcept.net>
31
- * @version $Revision: 1.39 $
32
- * @package Archive
33
- */
34
- class archive_tar
35
- {
36
- /**
37
- * @var string Name of the Tar
38
- */
39
- var $_tarname='';
40
-
41
- /**
42
- * @var boolean if true, the Tar file will be gzipped
43
- */
44
- var $_compress=false;
45
-
46
- /**
47
- * @var string Type of compression : 'none', 'gz' or 'bz2'
48
- */
49
- var $_compress_type='none';
50
-
51
- /**
52
- * @var string Explode separator
53
- */
54
- var $_separator=' ';
55
-
56
- /**
57
- * @var file descriptor
58
- */
59
- var $_file=0;
60
-
61
- /**
62
- * @var string Local Tar name of a remote Tar (http:// or ftp://)
63
- */
64
- var $_temp_tarname='';
65
-
66
- function raiseError($message){
67
-
68
- print "<b>TAR error: </b><font color='red'>".$message."</font><br />";return;
69
-
70
- }
71
-
72
- // {{{ constructor
73
- /**
74
- * Archive_Tar Class constructor. This flavour of the constructor only
75
- * declare a new Archive_Tar object, identifying it by the name of the
76
- * tar file.
77
- * If the compress argument is set the tar will be read or created as a
78
- * gzip or bz2 compressed TAR file.
79
- *
80
- * @param string $p_tarname The name of the tar archive to create
81
- * @param string $p_compress can be null, 'gz' or 'bz2'. This
82
- * parameter indicates if gzip or bz2 compression
83
- * is required. For compatibility reason the
84
- * boolean value 'true' means 'gz'.
85
- * @access public
86
- */
87
- function Archive_Tar($p_tarname, $p_compress = null)
88
- {
89
- #$this->PEAR();
90
- $this->_compress = false;
91
- $this->_compress_type = 'none';
92
- if (($p_compress === null) || ($p_compress == '')) {
93
- if (@file_exists($p_tarname)) {
94
- if ($fp = @fopen($p_tarname, "rb")) {
95
- // look for gzip magic cookie
96
- $data = fread($fp, 2);
97
- fclose($fp);
98
- if ($data == "\37\213") {
99
- $this->_compress = true;
100
- $this->_compress_type = 'gz';
101
- // No sure it's enought for a magic code ....
102
- } elseif ($data == "BZ") {
103
- $this->_compress = true;
104
- $this->_compress_type = 'bz2';
105
- }
106
- }
107
- } else {
108
- // probably a remote file or some file accessible
109
- // through a stream interface
110
- if (substr($p_tarname, -2) == 'gz') {
111
- $this->_compress = true;
112
- $this->_compress_type = 'gz';
113
- } elseif ((substr($p_tarname, -3) == 'bz2') ||
114
- (substr($p_tarname, -2) == 'bz')) {
115
- $this->_compress = true;
116
- $this->_compress_type = 'bz2';
117
- }
118
- }
119
- } else {
120
- if (($p_compress === true) || ($p_compress == 'gz')) {
121
- $this->_compress = true;
122
- $this->_compress_type = 'gz';
123
- } else if ($p_compress == 'bz2') {
124
- $this->_compress = true;
125
- $this->_compress_type = 'bz2';
126
- } else {
127
- die("Unsupported compression type '$p_compress'\n".
128
- "Supported types are 'gz' and 'bz2'.\n");
129
- return false;
130
- }
131
- }
132
- $this->_tarname = $p_tarname;
133
- if ($this->_compress) { // assert zlib or bz2 extension support
134
- if ($this->_compress_type == 'gz')
135
- $extname = 'zlib';
136
- else if ($this->_compress_type == 'bz2')
137
- $extname = 'bz2';
138
-
139
- #if (!extension_loaded($extname)) {
140
- #PEAR::loadExtension($extname);
141
- #}
142
- if (!extension_loaded($extname)) {
143
- die("The extension '$extname' couldn't be found.\n".
144
- "Please make sure your version of PHP was built ".
145
- "with '$extname' support.\n");
146
- return false;
147
- }
148
- }
149
- }
150
- // }}}
151
-
152
- // {{{ destructor
153
- function _Archive_Tar()
154
- {
155
- $this->_close();
156
- // ----- Look for a local copy to delete
157
- if ($this->_temp_tarname != '')
158
- @unlink($this->_temp_tarname);
159
- #$this->_PEAR();
160
- }
161
- // }}}
162
-
163
- // {{{ create()
164
- /**
165
- * This method creates the archive file and add the files / directories
166
- * that are listed in $p_filelist.
167
- * If a file with the same name exist and is writable, it is replaced
168
- * by the new tar.
169
- * The method return false and a PEAR error text.
170
- * The $p_filelist parameter can be an array of string, each string
171
- * representing a filename or a directory name with their path if
172
- * needed. It can also be a single string with names separated by a
173
- * single blank.
174
- * For each directory added in the archive, the files and
175
- * sub-directories are also added.
176
- * See also createModify() method for more details.
177
- *
178
- * @param array $p_filelist An array of filenames and directory names, or a
179
- * single string with names separated by a single
180
- * blank space.
181
- * @return true on success, false on error.
182
- * @see createModify()
183
- * @access public
184
- */
185
- function create($p_filelist)
186
- {
187
- return $this->createModify($p_filelist, '', '');
188
- }
189
- // }}}
190
-
191
- // {{{ add()
192
- /**
193
- * This method add the files / directories that are listed in $p_filelist in
194
- * the archive. If the archive does not exist it is created.
195
- * The method return false and a PEAR error text.
196
- * The files and directories listed are only added at the end of the archive,
197
- * even if a file with the same name is already archived.
198
- * See also createModify() method for more details.
199
- *
200
- * @param array $p_filelist An array of filenames and directory names, or a
201
- * single string with names separated by a single
202
- * blank space.
203
- * @return true on success, false on error.
204
- * @see createModify()
205
- * @access public
206
- */
207
- function add($p_filelist)
208
- {
209
- return $this->addModify($p_filelist, '', '');
210
- }
211
- // }}}
212
-
213
- // {{{ extract()
214
- function extract($p_path='')
215
- {
216
- return $this->extractModify($p_path, '');
217
- }
218
- // }}}
219
-
220
- // {{{ listContent()
221
- function listContent()
222
- {
223
- $v_list_detail = array();
224
-
225
- if ($this->_openRead()) {
226
- if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
227
- unset($v_list_detail);
228
- $v_list_detail = 0;
229
- }
230
- $this->_close();
231
- }
232
-
233
- return $v_list_detail;
234
- }
235
- // }}}
236
-
237
- // {{{ createModify()
238
- /**
239
- * This method creates the archive file and add the files / directories
240
- * that are listed in $p_filelist.
241
- * If the file already exists and is writable, it is replaced by the
242
- * new tar. It is a create and not an add. If the file exists and is
243
- * read-only or is a directory it is not replaced. The method return
244
- * false and a PEAR error text.
245
- * The $p_filelist parameter can be an array of string, each string
246
- * representing a filename or a directory name with their path if
247
- * needed. It can also be a single string with names separated by a
248
- * single blank.
249
- * The path indicated in $p_remove_dir will be removed from the
250
- * memorized path of each file / directory listed when this path
251
- * exists. By default nothing is removed (empty path '')
252
- * The path indicated in $p_add_dir will be added at the beginning of
253
- * the memorized path of each file / directory listed. However it can
254
- * be set to empty ''. The adding of a path is done after the removing
255
- * of path.
256
- * The path add/remove ability enables the user to prepare an archive
257
- * for extraction in a different path than the origin files are.
258
- * See also addModify() method for file adding properties.
259
- *
260
- * @param array $p_filelist An array of filenames and directory names,
261
- * or a single string with names separated by
262
- * a single blank space.
263
- * @param string $p_add_dir A string which contains a path to be added
264
- * to the memorized path of each element in
265
- * the list.
266
- * @param string $p_remove_dir A string which contains a path to be
267
- * removed from the memorized path of each
268
- * element in the list, when relevant.
269
- * @return boolean true on success, false on error.
270
- * @access public
271
- * @see addModify()
272
- */
273
- function createModify($p_filelist, $p_add_dir, $p_remove_dir='')
274
- {
275
- $v_result = true;
276
-
277
- if (!$this->_openWrite())
278
- return false;
279
-
280
- if ($p_filelist != '') {
281
- if (is_array($p_filelist))
282
- $v_list = $p_filelist;
283
- elseif (is_string($p_filelist))
284
- $v_list = explode($this->_separator, $p_filelist);
285
- else {
286
- $this->_cleanFile();
287
- $this->_error('Invalid file list');
288
- return false;
289
- }
290
-
291
- $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir);
292
- }
293
-
294
- if ($v_result) {
295
- $this->_writeFooter();
296
- $this->_close();
297
- } else
298
- $this->_cleanFile();
299
-
300
- return $v_result;
301
- }
302
- // }}}
303
-
304
- // {{{ addModify()
305
- /**
306
- * This method add the files / directories listed in $p_filelist at the
307
- * end of the existing archive. If the archive does not yet exists it
308
- * is created.
309
- * The $p_filelist parameter can be an array of string, each string
310
- * representing a filename or a directory name with their path if
311
- * needed. It can also be a single string with names separated by a
312
- * single blank.
313
- * The path indicated in $p_remove_dir will be removed from the
314
- * memorized path of each file / directory listed when this path
315
- * exists. By default nothing is removed (empty path '')
316
- * The path indicated in $p_add_dir will be added at the beginning of
317
- * the memorized path of each file / directory listed. However it can
318
- * be set to empty ''. The adding of a path is done after the removing
319
- * of path.
320
- * The path add/remove ability enables the user to prepare an archive
321
- * for extraction in a different path than the origin files are.
322
- * If a file/dir is already in the archive it will only be added at the
323
- * end of the archive. There is no update of the existing archived
324
- * file/dir. However while extracting the archive, the last file will
325
- * replace the first one. This results in a none optimization of the
326
- * archive size.
327
- * If a file/dir does not exist the file/dir is ignored. However an
328
- * error text is send to PEAR error.
329
- * If a file/dir is not readable the file/dir is ignored. However an
330
- * error text is send to PEAR error.
331
- *
332
- * @param array $p_filelist An array of filenames and directory
333
- * names, or a single string with names
334
- * separated by a single blank space.
335
- * @param string $p_add_dir A string which contains a path to be
336
- * added to the memorized path of each
337
- * element in the list.
338
- * @param string $p_remove_dir A string which contains a path to be
339
- * removed from the memorized path of
340
- * each element in the list, when
341
- * relevant.
342
- * @return true on success, false on error.
343
- * @access public
344
- */
345
- function addModify($p_filelist, $p_add_dir, $p_remove_dir='')
346
- {
347
- $v_result = true;
348
-
349
- if (!$this->_isArchive())
350
- $v_result = $this->createModify($p_filelist, $p_add_dir,
351
- $p_remove_dir);
352
- else {
353
- if (is_array($p_filelist))
354
- $v_list = $p_filelist;
355
- elseif (is_string($p_filelist))
356
- $v_list = explode($this->_separator, $p_filelist);
357
- else {
358
- $this->_error('Invalid file list');
359
- return false;
360
- }
361
-
362
- $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir);
363
- }
364
-
365
- return $v_result;
366
- }
367
- // }}}
368
-
369
- // {{{ addString()
370
- /**
371
- * This method add a single string as a file at the
372
- * end of the existing archive. If the archive does not yet exists it
373
- * is created.
374
- *
375
- * @param string $p_filename A string which contains the full
376
- * filename path that will be associated
377
- * with the string.
378
- * @param string $p_string The content of the file added in
379
- * the archive.
380
- * @return true on success, false on error.
381
- * @access public
382
- */
383
- function addString($p_filename, $p_string)
384
- {
385
- $v_result = true;
386
-
387
- if (!$this->_isArchive()) {
388
- if (!$this->_openWrite()) {
389
- return false;
390
- }
391
- $this->_close();
392
- }
393
-
394
- if (!$this->_openAppend())
395
- return false;
396
-
397
- // Need to check the get back to the temporary file ? ....
398
- $v_result = $this->_addString($p_filename, $p_string);
399
-
400
- $this->_writeFooter();
401
-
402
- $this->_close();
403
-
404
- return $v_result;
405
- }
406
- // }}}
407
-
408
- // {{{ extractModify()
409
- /**
410
- * This method extract all the content of the archive in the directory
411
- * indicated by $p_path. When relevant the memorized path of the
412
- * files/dir can be modified by removing the $p_remove_path path at the
413
- * beginning of the file/dir path.
414
- * While extracting a file, if the directory path does not exists it is
415
- * created.
416
- * While extracting a file, if the file already exists it is replaced
417
- * without looking for last modification date.
418
- * While extracting a file, if the file already exists and is write
419
- * protected, the extraction is aborted.
420
- * While extracting a file, if a directory with the same name already
421
- * exists, the extraction is aborted.
422
- * While extracting a directory, if a file with the same name already
423
- * exists, the extraction is aborted.
424
- * While extracting a file/directory if the destination directory exist
425
- * and is write protected, or does not exist but can not be created,
426
- * the extraction is aborted.
427
- * If after extraction an extracted file does not show the correct
428
- * stored file size, the extraction is aborted.
429
- * When the extraction is aborted, a PEAR error text is set and false
430
- * is returned. However the result can be a partial extraction that may
431
- * need to be manually cleaned.
432
- *
433
- * @param string $p_path The path of the directory where the
434
- * files/dir need to by extracted.
435
- * @param string $p_remove_path Part of the memorized path that can be
436
- * removed if present at the beginning of
437
- * the file/dir path.
438
- * @return boolean true on success, false on error.
439
- * @access public
440
- * @see extractList()
441
- */
442
- function extractModify($p_path, $p_remove_path)
443
- {
444
- $v_result = true;
445
- $v_list_detail = array();
446
-
447
- if ($v_result = $this->_openRead()) {
448
- $v_result = $this->_extractList($p_path, $v_list_detail,
449
- "complete", 0, $p_remove_path);
450
- $this->_close();
451
- }
452
-
453
- return $v_result;
454
- }
455
- // }}}
456
-
457
- // {{{ extractInString()
458
- /**
459
- * This method extract from the archive one file identified by $p_filename.
460
- * The return value is a string with the file content, or NULL on error.
461
- * @param string $p_filename The path of the file to extract in a string.
462
- * @return a string with the file content or NULL.
463
- * @access public
464
- */
465
- function extractInString($p_filename)
466
- {
467
- if ($this->_openRead()) {
468
- $v_result = $this->_extractInString($p_filename);
469
- $this->_close();
470
- } else {
471
- $v_result = NULL;
472
- }
473
-
474
- return $v_result;
475
- }
476
- // }}}
477
-
478
- // {{{ extractList()
479
- /**
480
- * This method extract from the archive only the files indicated in the
481
- * $p_filelist. These files are extracted in the current directory or
482
- * in the directory indicated by the optional $p_path parameter.
483
- * If indicated the $p_remove_path can be used in the same way as it is
484
- * used in extractModify() method.
485
- * @param array $p_filelist An array of filenames and directory names,
486
- * or a single string with names separated
487
- * by a single blank space.
488
- * @param string $p_path The path of the directory where the
489
- * files/dir need to by extracted.
490
- * @param string $p_remove_path Part of the memorized path that can be
491
- * removed if present at the beginning of
492
- * the file/dir path.
493
- * @return true on success, false on error.
494
- * @access public
495
- * @see extractModify()
496
- */
497
- function extractList($p_filelist, $p_path='', $p_remove_path='')
498
- {
499
- $v_result = true;
500
- $v_list_detail = array();
501
-
502
- if (is_array($p_filelist))
503
- $v_list = $p_filelist;
504
- elseif (is_string($p_filelist))
505
- $v_list = explode($this->_separator, $p_filelist);
506
- else {
507
- $this->_error('Invalid string list');
508
- return false;
509
- }
510
-
511
- if ($v_result = $this->_openRead()) {
512
- $v_result = $this->_extractList($p_path, $v_list_detail, "partial",
513
- $v_list, $p_remove_path);
514
- $this->_close();
515
- }
516
-
517
- return $v_result;
518
- }
519
- // }}}
520
-
521
- // {{{ setAttribute()
522
- /**
523
- * This method set specific attributes of the archive. It uses a variable
524
- * list of parameters, in the format attribute code + attribute values :
525
- * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ',');
526
- * @param mixed $argv variable list of attributes and values
527
- * @return true on success, false on error.
528
- * @access public
529
- */
530
- function setAttribute()
531
- {
532
- $v_result = true;
533
-
534
- // ----- Get the number of variable list of arguments
535
- if (($v_size = func_num_args()) == 0) {
536
- return true;
537
- }
538
-
539
- // ----- Get the arguments
540
- $v_att_list = &func_get_args();
541
-
542
- // ----- Read the attributes
543
- $i=0;
544
- while ($i<$v_size) {
545
-
546
- // ----- Look for next option
547
- switch ($v_att_list[$i]) {
548
- // ----- Look for options that request a string value
549
- case ARCHIVE_TAR_ATT_SEPARATOR :
550
- // ----- Check the number of parameters
551
- if (($i+1) >= $v_size) {
552
- $this->_error('Invalid number of parameters for '
553
- .'attribute ARCHIVE_TAR_ATT_SEPARATOR');
554
- return false;
555
- }
556
-
557
- // ----- Get the value
558
- $this->_separator = $v_att_list[$i+1];
559
- $i++;
560
- break;
561
-
562
- default :
563
- $this->_error('Unknow attribute code '.$v_att_list[$i].'');
564
- return false;
565
- }
566
-
567
- // ----- Next attribute
568
- $i++;
569
- }
570
-
571
- return $v_result;
572
- }
573
- // }}}
574
-
575
- // {{{ _error()
576
- function _error($p_message)
577
- {
578
- // ----- To be completed
579
- $this->raiseError($p_message);
580
- }
581
- // }}}
582
-
583
- // {{{ _warning()
584
- function _warning($p_message)
585
- {
586
- // ----- To be completed
587
- $this->raiseError($p_message);
588
- }
589
- // }}}
590
-
591
- // {{{ _isArchive()
592
- function _isArchive($p_filename=NULL)
593
- {
594
- if ($p_filename == NULL) {
595
- $p_filename = $this->_tarname;
596
- }
597
- clearstatcache();
598
- return @is_file($p_filename);
599
- }
600
- // }}}
601
-
602
- // {{{ _openWrite()
603
- function _openWrite()
604
- {
605
- if ($this->_compress_type == 'gz')
606
- $this->_file = @gzopen($this->_tarname, "wb9");
607
- else if ($this->_compress_type == 'bz2')
608
- $this->_file = @bzopen($this->_tarname, "wb");
609
- else if ($this->_compress_type == 'none')
610
- $this->_file = @fopen($this->_tarname, "wb");
611
- else
612
- $this->_error('Unknown or missing compression type ('
613
- .$this->_compress_type.')');
614
-
615
- if ($this->_file == 0) {
616
- $this->_error('Unable to open in write mode \''
617
- .$this->_tarname.'\'');
618
- return false;
619
- }
620
-
621
- return true;
622
- }
623
- // }}}
624
-
625
- // {{{ _openRead()
626
- function _openRead()
627
- {
628
- if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') {
629
-
630
- // ----- Look if a local copy need to be done
631
- if ($this->_temp_tarname == '') {
632
- $this->_temp_tarname = uniqid('tar').'.tmp';
633
- if (!$v_file_from = @fopen($this->_tarname, 'rb')) {
634
- $this->_error('Unable to open in read mode \''
635
- .$this->_tarname.'\'');
636
- $this->_temp_tarname = '';
637
- return false;
638
- }
639
- if (!$v_file_to = @fopen($this->_temp_tarname, 'wb')) {
640
- $this->_error('Unable to open in write mode \''
641
- .$this->_temp_tarname.'\'');
642
- $this->_temp_tarname = '';
643
- return false;
644
- }
645
- while ($v_data = @fread($v_file_from, 1024))
646
- @fwrite($v_file_to, $v_data);
647
- @fclose($v_file_from);
648
- @fclose($v_file_to);
649
- }
650
-
651
- // ----- File to open if the local copy
652
- $v_filename = $this->_temp_tarname;
653
-
654
- } else
655
- // ----- File to open if the normal Tar file
656
- $v_filename = $this->_tarname;
657
-
658
- if ($this->_compress_type == 'gz')
659
- $this->_file = @gzopen($v_filename, "rb");
660
- else if ($this->_compress_type == 'bz2')
661
- $this->_file = @bzopen($v_filename, "rb");
662
- else if ($this->_compress_type == 'none')
663
- $this->_file = @fopen($v_filename, "rb");
664
- else
665
- $this->_error('Unknown or missing compression type ('
666
- .$this->_compress_type.')');
667
-
668
- if ($this->_file == 0) {
669
- $this->_error('Unable to open in read mode \''.$v_filename.'\'');
670
- return false;
671
- }
672
-
673
- return true;
674
- }
675
- // }}}
676
-
677
- // {{{ _openReadWrite()
678
- function _openReadWrite()
679
- {
680
- if ($this->_compress_type == 'gz')
681
- $this->_file = @gzopen($this->_tarname, "r+b");
682
- else if ($this->_compress_type == 'bz2')
683
- $this->_file = @bzopen($this->_tarname, "r+b");
684
- else if ($this->_compress_type == 'none')
685
- $this->_file = @fopen($this->_tarname, "r+b");
686
- else
687
- $this->_error('Unknown or missing compression type ('
688
- .$this->_compress_type.')');
689
-
690
- if ($this->_file == 0) {
691
- $this->_error('Unable to open in read/write mode \''
692
- .$this->_tarname.'\'');
693
- return false;
694
- }
695
-
696
- return true;
697
- }
698
- // }}}
699
-
700
- // {{{ _close()
701
- function _close()
702
- {
703
- //if (isset($this->_file)) {
704
- if (is_resource($this->_file)) {
705
- if ($this->_compress_type == 'gz')
706
- @gzclose($this->_file);
707
- else if ($this->_compress_type == 'bz2')
708
- @bzclose($this->_file);
709
- else if ($this->_compress_type == 'none')
710
- @fclose($this->_file);
711
- else
712
- $this->_error('Unknown or missing compression type ('
713
- .$this->_compress_type.')');
714
-
715
- $this->_file = 0;
716
- }
717
-
718
- // ----- Look if a local copy need to be erase
719
- // Note that it might be interesting to keep the url for a time : ToDo
720
- if ($this->_temp_tarname != '') {
721
- @unlink($this->_temp_tarname);
722
- $this->_temp_tarname = '';
723
- }
724
-
725
- return true;
726
- }
727
- // }}}
728
-
729
- // {{{ _cleanFile()
730
- function _cleanFile()
731
- {
732
- $this->_close();
733
-
734
- // ----- Look for a local copy
735
- if ($this->_temp_tarname != '') {
736
- // ----- Remove the local copy but not the remote tarname
737
- @unlink($this->_temp_tarname);
738
- $this->_temp_tarname = '';
739
- } else {
740
- // ----- Remove the local tarname file
741
- @unlink($this->_tarname);
742
- }
743
- $this->_tarname = '';
744
-
745
- return true;
746
- }
747
- // }}}
748
-
749
- // {{{ _writeBlock()
750
- function _writeBlock($p_binary_data, $p_len=null)
751
- {
752
- if (is_resource($this->_file)) {
753
- if ($p_len === null) {
754
- if ($this->_compress_type == 'gz')
755
- @gzputs($this->_file, $p_binary_data);
756
- else if ($this->_compress_type == 'bz2')
757
- @bzwrite($this->_file, $p_binary_data);
758
- else if ($this->_compress_type == 'none')
759
- @fputs($this->_file, $p_binary_data);
760
- else
761
- $this->_error('Unknown or missing compression type ('
762
- .$this->_compress_type.')');
763
- } else {
764
- if ($this->_compress_type == 'gz')
765
- @gzputs($this->_file, $p_binary_data, $p_len);
766
- else if ($this->_compress_type == 'bz2')
767
- @bzwrite($this->_file, $p_binary_data, $p_len);
768
- else if ($this->_compress_type == 'none')
769
- @fputs($this->_file, $p_binary_data, $p_len);
770
- else
771
- $this->_error('Unknown or missing compression type ('
772
- .$this->_compress_type.')');
773
-
774
- }
775
- }
776
- return true;
777
- }
778
- // }}}
779
-
780
- // {{{ _readBlock()
781
- function _readBlock()
782
- {
783
- $v_block = null;
784
- if (is_resource($this->_file)) {
785
- if ($this->_compress_type == 'gz')
786
- $v_block = @gzread($this->_file, 512);
787
- else if ($this->_compress_type == 'bz2')
788
- $v_block = @bzread($this->_file, 512);
789
- else if ($this->_compress_type == 'none')
790
- $v_block = @fread($this->_file, 512);
791
- else
792
- $this->_error('Unknown or missing compression type ('
793
- .$this->_compress_type.')');
794
- }
795
- return $v_block;
796
- }
797
- // }}}
798
-
799
- // {{{ _jumpBlock()
800
- function _jumpBlock($p_len=null)
801
- {
802
- if (is_resource($this->_file)) {
803
- if ($p_len === null)
804
- $p_len = 1;
805
-
806
- if ($this->_compress_type == 'gz') {
807
- @gzseek($this->_file, gztell($this->_file)+($p_len*512));
808
- }
809
- else if ($this->_compress_type == 'bz2') {
810
- // ----- Replace missing bztell() and bzseek()
811
- for ($i=0; $i<$p_len; $i++)
812
- $this->_readBlock();
813
- } else if ($this->_compress_type == 'none')
814
- @fseek($this->_file, ftell($this->_file)+($p_len*512));
815
- else
816
- $this->_error('Unknown or missing compression type ('
817
- .$this->_compress_type.')');
818
-
819
- }
820
- return true;
821
- }
822
- // }}}
823
-
824
- // {{{ _writeFooter()
825
- function _writeFooter()
826
- {
827
- if (is_resource($this->_file)) {
828
- // ----- Write the last 0 filled block for end of archive
829
- $v_binary_data = pack('a1024', '');
830
- $this->_writeBlock($v_binary_data);
831
- }
832
- return true;
833
- }
834
- // }}}
835
-
836
- // {{{ _addList()
837
- function _addList($p_list, $p_add_dir, $p_remove_dir)
838
- {
839
- $v_result=true;
840
- $v_header = array();
841
-
842
- // ----- Remove potential windows directory separator
843
- $p_add_dir = $this->_translateWinPath($p_add_dir);
844
- $p_remove_dir = $this->_translateWinPath($p_remove_dir, false);
845
-
846
- if (!$this->_file) {
847
- $this->_error('Invalid file descriptor');
848
- return false;
849
- }
850
-
851
- if (sizeof($p_list) == 0)
852
- return true;
853
-
854
- foreach ($p_list as $v_filename) {
855
- if (!$v_result) {
856
- break;
857
- }
858
-
859
- // ----- Skip the current tar name
860
- if ($v_filename == $this->_tarname)
861
- continue;
862
-
863
- if ($v_filename == '')
864
- continue;
865
-
866
- if (!file_exists($v_filename)) {
867
- $this->_warning("File '$v_filename' does not exist");
868
- continue;
869
- }
870
-
871
- // ----- Add the file or directory header
872
- if (!$this->_addFile($v_filename, $v_header, $p_add_dir, $p_remove_dir))
873
- return false;
874
-
875
- if (@is_dir($v_filename)) {
876
- if (!($p_hdir = opendir($v_filename))) {
877
- $this->_warning("Directory '$v_filename' can not be read");
878
- continue;
879
- }
880
- while (false !== ($p_hitem = readdir($p_hdir))) {
881
- if (($p_hitem != '.') && ($p_hitem != '..')) {
882
- if ($v_filename != ".")
883
- $p_temp_list[0] = $v_filename.'/'.$p_hitem;
884
- else
885
- $p_temp_list[0] = $p_hitem;
886
-
887
- $v_result = $this->_addList($p_temp_list,
888
- $p_add_dir,
889
- $p_remove_dir);
890
- }
891
- }
892
-
893
- unset($p_temp_list);
894
- unset($p_hdir);
895
- unset($p_hitem);
896
- }
897
- }
898
-
899
- return $v_result;
900
- }
901
- // }}}
902
-
903
- // {{{ _addFile()
904
- function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir)
905
- {
906
- if (!$this->_file) {
907
- $this->_error('Invalid file descriptor');
908
- return false;
909
- }
910
-
911
- if ($p_filename == '') {
912
- $this->_error('Invalid file name');
913
- return false;
914
- }
915
-
916
- // ----- Calculate the stored filename
917
- $p_filename = $this->_translateWinPath($p_filename, false);;
918
- $v_stored_filename = $p_filename;
919
- if (strcmp($p_filename, $p_remove_dir) == 0) {
920
- return true;
921
- }
922
- if ($p_remove_dir != '') {
923
- if (substr($p_remove_dir, -1) != '/')
924
- $p_remove_dir .= '/';
925
-
926
- if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
927
- $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
928
- }
929
- $v_stored_filename = $this->_translateWinPath($v_stored_filename);
930
- if ($p_add_dir != '') {
931
- if (substr($p_add_dir, -1) == '/')
932
- $v_stored_filename = $p_add_dir.$v_stored_filename;
933
- else
934
- $v_stored_filename = $p_add_dir.'/'.$v_stored_filename;
935
- }
936
-
937
- $v_stored_filename = $this->_pathReduction($v_stored_filename);
938
-
939
- if ($this->_isArchive($p_filename)) {
940
- if (($v_file = @fopen($p_filename, "rb")) == 0) {
941
- $this->_warning("Unable to open file '".$p_filename
942
- ."' in binary read mode");
943
- return true;
944
- }
945
-
946
- if (!$this->_writeHeader($p_filename, $v_stored_filename))
947
- return false;
948
-
949
- while (($v_buffer = fread($v_file, 512)) != '') {
950
- $v_binary_data = pack("a512", "$v_buffer");
951
- $this->_writeBlock($v_binary_data);
952
- }
953
-
954
- fclose($v_file);
955
-
956
- } else {
957
- // ----- Only header for dir
958
- if (!$this->_writeHeader($p_filename, $v_stored_filename))
959
- return false;
960
- }
961
-
962
- return true;
963
- }
964
- // }}}
965
-
966
- // {{{ _addString()
967
- function _addString($p_filename, $p_string)
968
- {
969
- if (!$this->_file) {
970
- $this->_error('Invalid file descriptor');
971
- return false;
972
- }
973
-
974
- if ($p_filename == '') {
975
- $this->_error('Invalid file name');
976
- return false;
977
- }
978
-
979
- // ----- Calculate the stored filename
980
- $p_filename = $this->_translateWinPath($p_filename, false);;
981
-
982
- if (!$this->_writeHeaderBlock($p_filename, strlen($p_string),
983
- time(), 384, "", 0, 0))
984
- return false;
985
-
986
- $i=0;
987
- while (($v_buffer = substr($p_string, (($i++)*512), 512)) != '') {
988
- $v_binary_data = pack("a512", $v_buffer);
989
- $this->_writeBlock($v_binary_data);
990
- }
991
-
992
- return true;
993
- }
994
- // }}}
995
-
996
- // {{{ _writeHeader()
997
- function _writeHeader($p_filename, $p_stored_filename)
998
- {
999
- if ($p_stored_filename == '')
1000
- $p_stored_filename = $p_filename;
1001
- $v_reduce_filename = $this->_pathReduction($p_stored_filename);
1002
-
1003
- if (strlen($v_reduce_filename) > 99) {
1004
- if (!$this->_writeLongHeader($v_reduce_filename))
1005
- return false;
1006
- }
1007
-
1008
- $v_info = stat($p_filename);
1009
- $v_uid = sprintf("%6s ", DecOct($v_info[4]));
1010
- $v_gid = sprintf("%6s ", DecOct($v_info[5]));
1011
- $v_perms = sprintf("%6s ", DecOct(fileperms($p_filename)));
1012
-
1013
- $v_mtime = sprintf("%11s", DecOct(filemtime($p_filename)));
1014
-
1015
- if (@is_dir($p_filename)) {
1016
- $v_typeflag = "5";
1017
- $v_size = sprintf("%11s ", DecOct(0));
1018
- } else {
1019
- $v_typeflag = '';
1020
- clearstatcache();
1021
- $v_size = sprintf("%11s ", DecOct(filesize($p_filename)));
1022
- }
1023
-
1024
- $v_linkname = '';
1025
-
1026
- $v_magic = '';
1027
-
1028
- $v_version = '';
1029
-
1030
- $v_uname = '';
1031
-
1032
- $v_gname = '';
1033
-
1034
- $v_devmajor = '';
1035
-
1036
- $v_devminor = '';
1037
-
1038
- $v_prefix = '';
1039
-
1040
- $v_binary_data_first = pack("a100a8a8a8a12A12",
1041
- $v_reduce_filename, $v_perms, $v_uid,
1042
- $v_gid, $v_size, $v_mtime);
1043
- $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12",
1044
- $v_typeflag, $v_linkname, $v_magic,
1045
- $v_version, $v_uname, $v_gname,
1046
- $v_devmajor, $v_devminor, $v_prefix, '');
1047
-
1048
- // ----- Calculate the checksum
1049
- $v_checksum = 0;
1050
- // ..... First part of the header
1051
- for ($i=0; $i<148; $i++)
1052
- $v_checksum += ord(substr($v_binary_data_first,$i,1));
1053
- // ..... Ignore the checksum value and replace it by ' ' (space)
1054
- for ($i=148; $i<156; $i++)
1055
- $v_checksum += ord(' ');
1056
- // ..... Last part of the header
1057
- for ($i=156, $j=0; $i<512; $i++, $j++)
1058
- $v_checksum += ord(substr($v_binary_data_last,$j,1));
1059
-
1060
- // ----- Write the first 148 bytes of the header in the archive
1061
- $this->_writeBlock($v_binary_data_first, 148);
1062
-
1063
- // ----- Write the calculated checksum
1064
- $v_checksum = sprintf("%6s ", DecOct($v_checksum));
1065
- $v_binary_data = pack("a8", $v_checksum);
1066
- $this->_writeBlock($v_binary_data, 8);
1067
-
1068
- // ----- Write the last 356 bytes of the header in the archive
1069
- $this->_writeBlock($v_binary_data_last, 356);
1070
-
1071
- return true;
1072
- }
1073
- // }}}
1074
-
1075
- // {{{ _writeHeaderBlock()
1076
- function _writeHeaderBlock($p_filename, $p_size, $p_mtime=0, $p_perms=0,
1077
- $p_type='', $p_uid=0, $p_gid=0)
1078
- {
1079
- $p_filename = $this->_pathReduction($p_filename);
1080
-
1081
- if (strlen($p_filename) > 99) {
1082
- if (!$this->_writeLongHeader($p_filename))
1083
- return false;
1084
- }
1085
-
1086
- if ($p_type == "5") {
1087
- $v_size = sprintf("%11s ", DecOct(0));
1088
- } else {
1089
- $v_size = sprintf("%11s ", DecOct($p_size));
1090
- }
1091
-
1092
- $v_uid = sprintf("%6s ", DecOct($p_uid));
1093
- $v_gid = sprintf("%6s ", DecOct($p_gid));
1094
- $v_perms = sprintf("%6s ", DecOct($p_perms));
1095
-
1096
- $v_mtime = sprintf("%11s", DecOct($p_mtime));
1097
-
1098
- $v_linkname = '';
1099
-
1100
- $v_magic = '';
1101
-
1102
- $v_version = '';
1103
-
1104
- $v_uname = '';
1105
-
1106
- $v_gname = '';
1107
-
1108
- $v_devmajor = '';
1109
-
1110
- $v_devminor = '';
1111
-
1112
- $v_prefix = '';
1113
-
1114
- $v_binary_data_first = pack("a100a8a8a8a12A12",
1115
- $p_filename, $v_perms, $v_uid, $v_gid,
1116
- $v_size, $v_mtime);
1117
- $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12",
1118
- $p_type, $v_linkname, $v_magic,
1119
- $v_version, $v_uname, $v_gname,
1120
- $v_devmajor, $v_devminor, $v_prefix, '');
1121
-
1122
- // ----- Calculate the checksum
1123
- $v_checksum = 0;
1124
- // ..... First part of the header
1125
- for ($i=0; $i<148; $i++)
1126
- $v_checksum += ord(substr($v_binary_data_first,$i,1));
1127
- // ..... Ignore the checksum value and replace it by ' ' (space)
1128
- for ($i=148; $i<156; $i++)
1129
- $v_checksum += ord(' ');
1130
- // ..... Last part of the header
1131
- for ($i=156, $j=0; $i<512; $i++, $j++)
1132
- $v_checksum += ord(substr($v_binary_data_last,$j,1));
1133
-
1134
- // ----- Write the first 148 bytes of the header in the archive
1135
- $this->_writeBlock($v_binary_data_first, 148);
1136
-
1137
- // ----- Write the calculated checksum
1138
- $v_checksum = sprintf("%6s ", DecOct($v_checksum));
1139
- $v_binary_data = pack("a8", $v_checksum);
1140
- $this->_writeBlock($v_binary_data, 8);
1141
-
1142
- // ----- Write the last 356 bytes of the header in the archive
1143
- $this->_writeBlock($v_binary_data_last, 356);
1144
-
1145
- return true;
1146
- }
1147
- // }}}
1148
-
1149
- // {{{ _writeLongHeader()
1150
- function _writeLongHeader($p_filename)
1151
- {
1152
- $v_size = sprintf("%11s ", DecOct(strlen($p_filename)));
1153
-
1154
- $v_typeflag = 'L';
1155
-
1156
- $v_linkname = '';
1157
-
1158
- $v_magic = '';
1159
-
1160
- $v_version = '';
1161
-
1162
- $v_uname = '';
1163
-
1164
- $v_gname = '';
1165
-
1166
- $v_devmajor = '';
1167
-
1168
- $v_devminor = '';
1169
-
1170
- $v_prefix = '';
1171
-
1172
- $v_binary_data_first = pack("a100a8a8a8a12A12",
1173
- '././@LongLink', 0, 0, 0, $v_size, 0);
1174
- $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12",
1175
- $v_typeflag, $v_linkname, $v_magic,
1176
- $v_version, $v_uname, $v_gname,
1177
- $v_devmajor, $v_devminor, $v_prefix, '');
1178
-
1179
- // ----- Calculate the checksum
1180
- $v_checksum = 0;
1181
- // ..... First part of the header
1182
- for ($i=0; $i<148; $i++)
1183
- $v_checksum += ord(substr($v_binary_data_first,$i,1));
1184
- // ..... Ignore the checksum value and replace it by ' ' (space)
1185
- for ($i=148; $i<156; $i++)
1186
- $v_checksum += ord(' ');
1187
- // ..... Last part of the header
1188
- for ($i=156, $j=0; $i<512; $i++, $j++)
1189
- $v_checksum += ord(substr($v_binary_data_last,$j,1));
1190
-
1191
- // ----- Write the first 148 bytes of the header in the archive
1192
- $this->_writeBlock($v_binary_data_first, 148);
1193
-
1194
- // ----- Write the calculated checksum
1195
- $v_checksum = sprintf("%6s ", DecOct($v_checksum));
1196
- $v_binary_data = pack("a8", $v_checksum);
1197
- $this->_writeBlock($v_binary_data, 8);
1198
-
1199
- // ----- Write the last 356 bytes of the header in the archive
1200
- $this->_writeBlock($v_binary_data_last, 356);
1201
-
1202
- // ----- Write the filename as content of the block
1203
- $i=0;
1204
- while (($v_buffer = substr($p_filename, (($i++)*512), 512)) != '') {
1205
- $v_binary_data = pack("a512", "$v_buffer");
1206
- $this->_writeBlock($v_binary_data);
1207
- }
1208
-
1209
- return true;
1210
- }
1211
- // }}}
1212
-
1213
- // {{{ _readHeader()
1214
- function _readHeader($v_binary_data, &$v_header)
1215
- {
1216
- if (strlen($v_binary_data)==0) {
1217
- $v_header['filename'] = '';
1218
- return true;
1219
- }
1220
-
1221
- if (strlen($v_binary_data) != 512) {
1222
- $v_header['filename'] = '';
1223
- $this->_error('Invalid block size : '.strlen($v_binary_data));
1224
- return false;
1225
- }
1226
-
1227
- if (!is_array($v_header)) {
1228
- $v_header = array();
1229
- }
1230
- // ----- Calculate the checksum
1231
- $v_checksum = 0;
1232
- // ..... First part of the header
1233
- for ($i=0; $i<148; $i++)
1234
- $v_checksum+=ord(substr($v_binary_data,$i,1));
1235
- // ..... Ignore the checksum value and replace it by ' ' (space)
1236
- for ($i=148; $i<156; $i++)
1237
- $v_checksum += ord(' ');
1238
- // ..... Last part of the header
1239
- for ($i=156; $i<512; $i++)
1240
- $v_checksum+=ord(substr($v_binary_data,$i,1));
1241
-
1242
- $v_data = unpack("a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/"
1243
- ."a8checksum/a1typeflag/a100link/a6magic/a2version/"
1244
- ."a32uname/a32gname/a8devmajor/a8devminor",
1245
- $v_binary_data);
1246
-
1247
- // ----- Extract the checksum
1248
- $v_header['checksum'] = OctDec(trim($v_data['checksum']));
1249
- if ($v_header['checksum'] != $v_checksum) {
1250
- $v_header['filename'] = '';
1251
-
1252
- // ----- Look for last block (empty block)
1253
- if (($v_checksum == 256) && ($v_header['checksum'] == 0))
1254
- return true;
1255
-
1256
- $this->_error('Invalid checksum for file "'.$v_data['filename']
1257
- .'" : '.$v_checksum.' calculated, '
1258
- .$v_header['checksum'].' expected');
1259
- return false;
1260
- }
1261
-
1262
- // ----- Extract the properties
1263
- $v_header['filename'] = trim($v_data['filename']);
1264
- if ($this->_maliciousFilename($v_header['filename'])) {
1265
- $this->_error('Malicious .tar detected, file "' . $v_header['filename'] .
1266
- '" will not install in desired directory tree');
1267
- return false;
1268
- }
1269
- $v_header['mode'] = OctDec(trim($v_data['mode']));
1270
- $v_header['uid'] = OctDec(trim($v_data['uid']));
1271
- $v_header['gid'] = OctDec(trim($v_data['gid']));
1272
- $v_header['size'] = OctDec(trim($v_data['size']));
1273
- $v_header['mtime'] = OctDec(trim($v_data['mtime']));
1274
- if (($v_header['typeflag'] = $v_data['typeflag']) == "5") {
1275
- $v_header['size'] = 0;
1276
- }
1277
- $v_header['link'] = trim($v_data['link']);
1278
- /* ----- All these fields are removed form the header because
1279
- they do not carry interesting info
1280
- $v_header[magic] = trim($v_data[magic]);
1281
- $v_header[version] = trim($v_data[version]);
1282
- $v_header[uname] = trim($v_data[uname]);
1283
- $v_header[gname] = trim($v_data[gname]);
1284
- $v_header[devmajor] = trim($v_data[devmajor]);
1285
- $v_header[devminor] = trim($v_data[devminor]);
1286
- */
1287
-
1288
- return true;
1289
- }
1290
- // }}}
1291
-
1292
- // {{{ _maliciousFilename()
1293
- /**
1294
- * Detect and report a malicious file name
1295
- *
1296
- * @param string $file
1297
- * @return bool
1298
- * @access private
1299
- */
1300
- function _maliciousFilename($file)
1301
- {
1302
- if (strpos($file, '/../') !== false) {
1303
- return true;
1304
- }
1305
- if (strpos($file, '../') === 0) {
1306
- return true;
1307
- }
1308
- return false;
1309
- }
1310
- // }}}
1311
-
1312
- // {{{ _readLongHeader()
1313
- function _readLongHeader(&$v_header)
1314
- {
1315
- $v_filename = '';
1316
- $n = floor($v_header['size']/512);
1317
- for ($i=0; $i<$n; $i++) {
1318
- $v_content = $this->_readBlock();
1319
- $v_filename .= $v_content;
1320
- }
1321
- if (($v_header['size'] % 512) != 0) {
1322
- $v_content = $this->_readBlock();
1323
- $v_filename .= $v_content;
1324
- }
1325
-
1326
- // ----- Read the next header
1327
- $v_binary_data = $this->_readBlock();
1328
-
1329
- if (!$this->_readHeader($v_binary_data, $v_header))
1330
- return false;
1331
-
1332
- $v_header['filename'] = $v_filename;
1333
- if ($this->_maliciousFilename($v_filename)) {
1334
- $this->_error('Malicious .tar detected, file "' . $v_filename .
1335
- '" will not install in desired directory tree');
1336
- return false;
1337
- }
1338
-
1339
- return true;
1340
- }
1341
- // }}}
1342
-
1343
- // {{{ _extractInString()
1344
- /**
1345
- * This method extract from the archive one file identified by $p_filename.
1346
- * The return value is a string with the file content, or NULL on error.
1347
- * @param string $p_filename The path of the file to extract in a string.
1348
- * @return a string with the file content or NULL.
1349
- * @access private
1350
- */
1351
- function _extractInString($p_filename)
1352
- {
1353
- $v_result_str = "";
1354
-
1355
- While (strlen($v_binary_data = $this->_readBlock()) != 0)
1356
- {
1357
- if (!$this->_readHeader($v_binary_data, $v_header))
1358
- return NULL;
1359
-
1360
- if ($v_header['filename'] == '')
1361
- continue;
1362
-
1363
- // ----- Look for long filename
1364
- if ($v_header['typeflag'] == 'L') {
1365
- if (!$this->_readLongHeader($v_header))
1366
- return NULL;
1367
- }
1368
-
1369
- if ($v_header['filename'] == $p_filename) {
1370
- if ($v_header['typeflag'] == "5") {
1371
- $this->_error('Unable to extract in string a directory '
1372
- .'entry {'.$v_header['filename'].'}');
1373
- return NULL;
1374
- } else {
1375
- $n = floor($v_header['size']/512);
1376
- for ($i=0; $i<$n; $i++) {
1377
- $v_result_str .= $this->_readBlock();
1378
- }
1379
- if (($v_header['size'] % 512) != 0) {
1380
- $v_content = $this->_readBlock();
1381
- $v_result_str .= substr($v_content, 0,
1382
- ($v_header['size'] % 512));
1383
- }
1384
- return $v_result_str;
1385
- }
1386
- } else {
1387
- $this->_jumpBlock(ceil(($v_header['size']/512)));
1388
- }
1389
- }
1390
-
1391
- return NULL;
1392
- }
1393
- // }}}
1394
-
1395
- // {{{ _extractList()
1396
- function _extractList_vbdata($p_path, &$p_list_detail, $p_mode,
1397
- $p_file_list, $p_remove_path, $v_binary_data)
1398
- {
1399
- $v_result=true;
1400
- $v_nb = 0;
1401
- $v_extract_all = true;
1402
- $v_listing = false;
1403
-
1404
- $p_path = $this->_translateWinPath($p_path, false);
1405
- if ($p_path == '' || (substr($p_path, 0, 1) != '/'
1406
- && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))) {
1407
- $p_path = "./".$p_path;
1408
- }
1409
- $p_remove_path = $this->_translateWinPath($p_remove_path);
1410
-
1411
- // ----- Look for path to remove format (should end by /)
1412
- if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/'))
1413
- $p_remove_path .= '/';
1414
- $p_remove_path_size = strlen($p_remove_path);
1415
-
1416
- switch ($p_mode) {
1417
- case "complete" :
1418
- $v_extract_all = TRUE;
1419
- $v_listing = FALSE;
1420
- break;
1421
- case "partial" :
1422
- $v_extract_all = FALSE;
1423
- $v_listing = FALSE;
1424
- break;
1425
- case "list" :
1426
- $v_extract_all = FALSE;
1427
- $v_listing = TRUE;
1428
- break;
1429
- default :
1430
- $this->_error('Invalid extract mode ('.$p_mode.')');
1431
- return false;
1432
- }
1433
-
1434
- clearstatcache();
1435
-
1436
- //while (strlen($v_binary_data = $this->_readBlock()) != 0)
1437
- {
1438
- $v_extract_file = FALSE;
1439
- $v_extraction_stopped = 0;
1440
-
1441
- if (!$this->_readHeader($v_binary_data, $v_header))
1442
- return false;
1443
-
1444
- if ($v_header['filename'] == '') {
1445
- continue;
1446
- }
1447
-
1448
- // ----- Look for long filename
1449
- if ($v_header['typeflag'] == 'L') {
1450
- if (!$this->_readLongHeader($v_header))
1451
- return false;
1452
- }
1453
-
1454
- #if ((!$v_extract_all) && (is_array($p_file_list)))
1455
- #{
1456
- // ----- By default no unzip if the file is not found
1457
- $v_extract_file = true;
1458
-
1459
- /*for ($i=0; $i<sizeof($p_file_list); $i++) {
1460
- // ----- Look if it is a directory
1461
- if (substr($p_file_list[$i], -1) == '/') {
1462
- // ----- Look if the directory is in the filename path
1463
- if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
1464
- && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
1465
- == $p_file_list[$i])) {
1466
- $v_extract_file = TRUE;
1467
- break;
1468
- }
1469
- }
1470
-
1471
- // ----- It is a file, so compare the file names
1472
- elseif ($p_file_list[$i] == $v_header['filename']) {
1473
- $v_extract_file = TRUE;
1474
- break;
1475
- }
1476
- }
1477
- } else {
1478
- $v_extract_file = TRUE;
1479
- }*/
1480
-
1481
- // ----- Look if this file need to be extracted
1482
- if (($v_extract_file) && (!$v_listing))
1483
- {
1484
- if (($p_remove_path != '')
1485
- && (substr($v_header['filename'], 0, $p_remove_path_size)
1486
- == $p_remove_path))
1487
- $v_header['filename'] = substr($v_header['filename'],
1488
- $p_remove_path_size);
1489
- if (($p_path != './') && ($p_path != '/')) {
1490
- while (substr($p_path, -1) == '/')
1491
- $p_path = substr($p_path, 0, strlen($p_path)-1);
1492
-
1493
- if (substr($v_header['filename'], 0, 1) == '/')
1494
- $v_header['filename'] = $p_path.$v_header['filename'];
1495
- else
1496
- $v_header['filename'] = $p_path.'/'.$v_header['filename'];
1497
- }
1498
- if (file_exists($v_header['filename'])) {
1499
- if ( (@is_dir($v_header['filename']))
1500
- && ($v_header['typeflag'] == '')) {
1501
- $this->_error('File '.$v_header['filename']
1502
- .' already exists as a directory');
1503
- return false;
1504
- }
1505
- if ( ($this->_isArchive($v_header['filename']))
1506
- && ($v_header['typeflag'] == "5")) {
1507
- $this->_error('Directory '.$v_header['filename']
1508
- .' already exists as a file');
1509
- return false;
1510
- }
1511
- if (!is_writeable($v_header['filename'])) {
1512
- $this->_error('File '.$v_header['filename']
1513
- .' already exists and is write protected');
1514
- return false;
1515
- }
1516
- if (filemtime($v_header['filename']) > $v_header['mtime']) {
1517
- // To be completed : An error or silent no replace ?
1518
- }
1519
- }
1520
-
1521
- // ----- Check the directory availability and create it if necessary
1522
- elseif (($v_result
1523
- = $this->_dirCheck(($v_header['typeflag'] == "5"
1524
- ?$v_header['filename']
1525
- :dirname($v_header['filename'])))) != 1) {
1526
- $this->_error('Unable to create path for '.$v_header['filename']);
1527
- return false;
1528
- }
1529
-
1530
- if ($v_extract_file) {
1531
- if ($v_header['typeflag'] == "5") {
1532
- if (!@file_exists($v_header['filename'])) {
1533
- if (!@mkdir($v_header['filename'], 0777)) {
1534
- $this->_error('Unable to create directory {'
1535
- .$v_header['filename'].'}');
1536
- return false;
1537
- }
1538
- }
1539
- } elseif ($v_header['typeflag'] == "2") {
1540
- if (!@symlink($v_header['link'], $v_header['filename'])) {
1541
- $this->_error('Unable to extract symbolic link {'
1542
- .$v_header['filename'].'}');
1543
- return false;
1544
- }
1545
- } else {
1546
- if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
1547
- $this->_error('Error while opening {'.$v_header['filename']
1548
- .'} in write binary mode');
1549
- return false;
1550
- } else {
1551
- $n = floor($v_header['size']/512);
1552
- for ($i=0; $i<$n; $i++) {
1553
- $v_content = $this->_readBlock();
1554
- fwrite($v_dest_file, $v_content, 512);
1555
- }
1556
- if (($v_header['size'] % 512) != 0) {
1557
- $v_content = $this->_readBlock();
1558
- fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
1559
- }
1560
-
1561
- @fclose($v_dest_file);
1562
-
1563
- // ----- Change the file mode, mtime
1564
- @touch($v_header['filename'], $v_header['mtime']);
1565
- if ($v_header['mode'] & 0111) {
1566
- // make file executable, obey umask
1567
- $mode = fileperms($v_header['filename']) | (~umask() & 0111);
1568
- @chmod($v_header['filename'], $mode);
1569
- }
1570
- }
1571
-
1572
- // ----- Check the file size
1573
- clearstatcache();
1574
- if (filesize($v_header['filename']) != $v_header['size']) {
1575
- $this->_error('Extracted file '.$v_header['filename']
1576
- .' does not have the correct file size \''
1577
- .filesize($v_header['filename'])
1578
- .'\' ('.$v_header['size']
1579
- .' expected). Archive may be corrupted.');
1580
- return false;
1581
- }
1582
- }
1583
- } else {
1584
- $this->_jumpBlock(ceil(($v_header['size']/512)));
1585
- }
1586
- } else {
1587
- $this->_jumpBlock(ceil(($v_header['size']/512)));
1588
- }
1589
-
1590
- /* TBC : Seems to be unused ...
1591
- if ($this->_compress)
1592
- $v_end_of_file = @gzeof($this->_file);
1593
- else
1594
- $v_end_of_file = @feof($this->_file);
1595
- */
1596
-
1597
- if ($v_listing || $v_extract_file || $v_extraction_stopped) {
1598
- // ----- Log extracted files
1599
- if (($v_file_dir = dirname($v_header['filename']))
1600
- == $v_header['filename'])
1601
- $v_file_dir = '';
1602
- if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == ''))
1603
- $v_file_dir = '/';
1604
-
1605
- $p_list_detail[$v_nb++] = $v_header;
1606
- if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
1607
- return true;
1608
- }
1609
- }
1610
- }
1611
-
1612
- return true;
1613
- }
1614
- // }}}
1615
-
1616
-
1617
- // {{{ _extractList()
1618
- function _extractList($p_path, &$p_list_detail, $p_mode,
1619
- $p_file_list, $p_remove_path, $limit=0)
1620
- {
1621
- $v_result=true;
1622
- $v_nb = 0;
1623
- $v_extract_all = true;
1624
- $v_listing = false;
1625
- $inc = 0;
1626
-
1627
- $p_path = $this->_translateWinPath($p_path, false);
1628
- if ($p_path == '' || (substr($p_path, 0, 1) != '/'
1629
- && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))) {
1630
- $p_path = "./".$p_path;
1631
- }
1632
- $p_remove_path = $this->_translateWinPath($p_remove_path);
1633
-
1634
- // ----- Look for path to remove format (should end by /)
1635
- if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/'))
1636
- $p_remove_path .= '/';
1637
- $p_remove_path_size = strlen($p_remove_path);
1638
-
1639
- switch ($p_mode) {
1640
- case "complete" :
1641
- $v_extract_all = TRUE;
1642
- $v_listing = FALSE;
1643
- break;
1644
- case "partial" :
1645
- $v_extract_all = FALSE;
1646
- $v_listing = FALSE;
1647
- break;
1648
- case "list" :
1649
- $v_extract_all = FALSE;
1650
- $v_listing = TRUE;
1651
- break;
1652
- default :
1653
- $this->_error('Invalid extract mode ('.$p_mode.')');
1654
- return false;
1655
- }
1656
-
1657
- clearstatcache();
1658
-
1659
- while (strlen($v_binary_data = $this->_readBlock()) != 0)
1660
- {
1661
-
1662
- $v_extract_file = FALSE;
1663
- $v_extraction_stopped = 0;
1664
-
1665
- if (!$this->_readHeader($v_binary_data, $v_header))
1666
- return false;
1667
-
1668
- if ($v_header['filename'] == '') {
1669
- continue;
1670
- }
1671
-
1672
- //Ovi's code
1673
- if(($inc >= $limit) and ($limit !=0))
1674
- return ftell($this->_file);
1675
- $inc++;
1676
-
1677
- // ----- Look for long filename
1678
- if ($v_header['typeflag'] == 'L') {
1679
- if (!$this->_readLongHeader($v_header))
1680
- return false;
1681
- }
1682
-
1683
- if ((!$v_extract_all) && (is_array($p_file_list))) {
1684
- // ----- By default no unzip if the file is not found
1685
- $v_extract_file = false;
1686
-
1687
- for ($i=0; $i<sizeof($p_file_list); $i++) {
1688
- // ----- Look if it is a directory
1689
- if (substr($p_file_list[$i], -1) == '/') {
1690
- // ----- Look if the directory is in the filename path
1691
- if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
1692
- && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
1693
- == $p_file_list[$i])) {
1694
- $v_extract_file = TRUE;
1695
- break;
1696
- }
1697
- }
1698
-
1699
- // ----- It is a file, so compare the file names
1700
- elseif ($p_file_list[$i] == $v_header['filename']) {
1701
- $v_extract_file = TRUE;
1702
- break;
1703
- }
1704
- }
1705
- } else {
1706
- $v_extract_file = TRUE;
1707
- }
1708
-
1709
- // ----- Look if this file need to be extracted
1710
- if (($v_extract_file) && (!$v_listing))
1711
- {
1712
- if (($p_remove_path != '')
1713
- && (substr($v_header['filename'], 0, $p_remove_path_size)
1714
- == $p_remove_path))
1715
- $v_header['filename'] = substr($v_header['filename'],
1716
- $p_remove_path_size);
1717
- if (($p_path != './') && ($p_path != '/')) {
1718
- while (substr($p_path, -1) == '/')
1719
- $p_path = substr($p_path, 0, strlen($p_path)-1);
1720
-
1721
- if (substr($v_header['filename'], 0, 1) == '/')
1722
- $v_header['filename'] = $p_path.$v_header['filename'];
1723
- else
1724
- $v_header['filename'] = $p_path.'/'.$v_header['filename'];
1725
- }
1726
- if (file_exists($v_header['filename'])) {
1727
- if ( (@is_dir($v_header['filename']))
1728
- && ($v_header['typeflag'] == '')) {
1729
- $this->_error('File '.$v_header['filename']
1730
- .' already exists as a directory');
1731
- return false;
1732
- }
1733
- if ( ($this->_isArchive($v_header['filename']))
1734
- && ($v_header['typeflag'] == "5")) {
1735
- $this->_error('Directory '.$v_header['filename']
1736
- .' already exists as a file');
1737
- return false;
1738
- }
1739
- if (!is_writeable($v_header['filename'])) {
1740
- $this->_error('File '.$v_header['filename']
1741
- .' already exists and is write protected');
1742
- return false;
1743
- }
1744
- if (filemtime($v_header['filename']) > $v_header['mtime']) {
1745
- // To be completed : An error or silent no replace ?
1746
- }
1747
- }
1748
-
1749
- // ----- Check the directory availability and create it if necessary
1750
- elseif (($v_result
1751
- = $this->_dirCheck(($v_header['typeflag'] == "5"
1752
- ?$v_header['filename']
1753
- :dirname($v_header['filename'])))) != 1) {
1754
- $this->_error('Unable to create path for '.$v_header['filename']);
1755
- return false;
1756
- }
1757
-
1758
- if ($v_extract_file) {
1759
- if ($v_header['typeflag'] == "5") {
1760
- if (!@file_exists($v_header['filename'])) {
1761
- if (!@mkdir($v_header['filename'], 0777)) {
1762
- $this->_error('Unable to create directory {'
1763
- .$v_header['filename'].'}');
1764
- return false;
1765
- }
1766
- }
1767
- } elseif ($v_header['typeflag'] == "2") {
1768
- if (!@symlink($v_header['link'], $v_header['filename'])) {
1769
- $this->_error('Unable to extract symbolic link {'
1770
- .$v_header['filename'].'}');
1771
- return false;
1772
- }
1773
- } else {
1774
- if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
1775
- $this->_error('Error while opening {'.$v_header['filename']
1776
- .'} in write binary mode');
1777
- return false;
1778
- } else {
1779
- $n = floor($v_header['size']/512);
1780
- for ($i=0; $i<$n; $i++) {
1781
- $v_content = $this->_readBlock();
1782
- fwrite($v_dest_file, $v_content, 512);
1783
- }
1784
- if (($v_header['size'] % 512) != 0) {
1785
- $v_content = $this->_readBlock();
1786
- fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
1787
- }
1788
-
1789
- @fclose($v_dest_file);
1790
-
1791
- // ----- Change the file mode, mtime
1792
- @touch($v_header['filename'], $v_header['mtime']);
1793
- if ($v_header['mode'] & 0111) {
1794
- // make file executable, obey umask
1795
- $mode = fileperms($v_header['filename']) | (~umask() & 0111);
1796
- @chmod($v_header['filename'], $mode);
1797
- }
1798
- }
1799
-
1800
- // ----- Check the file size
1801
- clearstatcache();
1802
- if (filesize($v_header['filename']) != $v_header['size']) {
1803
- $this->_error('Extracted file '.$v_header['filename']
1804
- .' does not have the correct file size \''
1805
- .filesize($v_header['filename'])
1806
- .'\' ('.$v_header['size']
1807
- .' expected). Archive may be corrupted.');
1808
- return false;
1809
- }
1810
- }
1811
- } else {
1812
- $this->_jumpBlock(ceil(($v_header['size']/512)));
1813
- }
1814
- } else {
1815
- $this->_jumpBlock(ceil(($v_header['size']/512)));
1816
- }
1817
-
1818
- /* TBC : Seems to be unused ...
1819
- if ($this->_compress)
1820
- $v_end_of_file = @gzeof($this->_file);
1821
- else
1822
- $v_end_of_file = @feof($this->_file);
1823
- */
1824
-
1825
- if ($v_listing || $v_extract_file || $v_extraction_stopped) {
1826
- // ----- Log extracted files
1827
- if (($v_file_dir = dirname($v_header['filename']))
1828
- == $v_header['filename'])
1829
- $v_file_dir = '';
1830
- if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == ''))
1831
- $v_file_dir = '/';
1832
-
1833
- $p_list_detail[$v_nb++] = $v_header;
1834
- if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
1835
- return true;
1836
- }
1837
- }
1838
- }
1839
-
1840
- return true;
1841
- }
1842
- // }}}
1843
-
1844
- //extract file by sending v_header and setting seek position
1845
- function extractFile($tar, &$v_header)
1846
- {
1847
- $v_result_str = "";
1848
- $p_filename = $v_header['filename'];
1849
-
1850
- // ----- Look for long filename
1851
- if ($v_header['typeflag'] == 'L') {
1852
- if (!$tar->_readLongHeader($v_header))
1853
- return NULL;
1854
- }
1855
-
1856
- if ($v_header['typeflag'] == "5") {
1857
- $tar->_error('Unable to extract in string a directory '
1858
- .'entry {'.$v_header['filename'].'}');
1859
- return NULL;
1860
- } else {
1861
- $n = floor($v_header['size']/512);
1862
- for ($i=0; $i<$n; $i++) {
1863
- $v_result_str .= $tar->_readBlock();
1864
- }
1865
- if (($v_header['size'] % 512) != 0) {
1866
- $v_content = $tar->_readBlock();
1867
- $v_result_str .= substr($v_content, 0,
1868
- ($v_header['size'] % 512));
1869
- }
1870
- return $v_result_str;
1871
- }
1872
-
1873
-
1874
- return NULL;
1875
- }
1876
-
1877
-
1878
- // {{{ _openAppend()
1879
- function _openAppend()
1880
- {
1881
- if (filesize($this->_tarname) == 0)
1882
- return $this->_openWrite();
1883
-
1884
- if ($this->_compress) {
1885
- $this->_close();
1886
-
1887
- if (!@rename($this->_tarname, $this->_tarname.".tmp")) {
1888
- $this->_error('Error while renaming \''.$this->_tarname
1889
- .'\' to temporary file \''.$this->_tarname
1890
- .'.tmp\'');
1891
- return false;
1892
- }
1893
-
1894
- if ($this->_compress_type == 'gz')
1895
- $v_temp_tar = @gzopen($this->_tarname.".tmp", "rb");
1896
- elseif ($this->_compress_type == 'bz2')
1897
- $v_temp_tar = @bzopen($this->_tarname.".tmp", "rb");
1898
-
1899
- if ($v_temp_tar == 0) {
1900
- $this->_error('Unable to open file \''.$this->_tarname
1901
- .'.tmp\' in binary read mode');
1902
- @rename($this->_tarname.".tmp", $this->_tarname);
1903
- return false;
1904
- }
1905
-
1906
- if (!$this->_openWrite()) {
1907
- @rename($this->_tarname.".tmp", $this->_tarname);
1908
- return false;
1909
- }
1910
-
1911
- if ($this->_compress_type == 'gz') {
1912
- while (!@gzeof($v_temp_tar)) {
1913
- $v_buffer = @gzread($v_temp_tar, 512);
1914
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK) {
1915
- // do not copy end blocks, we will re-make them
1916
- // after appending
1917
- continue;
1918
- }
1919
- $v_binary_data = pack("a512", $v_buffer);
1920
- $this->_writeBlock($v_binary_data);
1921
- }
1922
-
1923
- @gzclose($v_temp_tar);
1924
- }
1925
- elseif ($this->_compress_type == 'bz2') {
1926
- while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
1927
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK) {
1928
- continue;
1929
- }
1930
- $v_binary_data = pack("a512", $v_buffer);
1931
- $this->_writeBlock($v_binary_data);
1932
- }
1933
-
1934
- @bzclose($v_temp_tar);
1935
- }
1936
-
1937
- if (!@unlink($this->_tarname.".tmp")) {
1938
- $this->_error('Error while deleting temporary file \''
1939
- .$this->_tarname.'.tmp\'');
1940
- }
1941
-
1942
- } else {
1943
- // ----- For not compressed tar, just add files before the last
1944
- // one or two 512 bytes block
1945
- if (!$this->_openReadWrite())
1946
- return false;
1947
-
1948
- clearstatcache();
1949
- $v_size = filesize($this->_tarname);
1950
-
1951
- // We might have zero, one or two end blocks.
1952
- // The standard is two, but we should try to handle
1953
- // other cases.
1954
- fseek($this->_file, $v_size - 1024);
1955
- if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1956
- fseek($this->_file, $v_size - 1024);
1957
- }
1958
- elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1959
- fseek($this->_file, $v_size - 512);
1960
- }
1961
- }
1962
-
1963
- return true;
1964
- }
1965
- // }}}
1966
-
1967
- // {{{ _append()
1968
- function _append($p_filelist, $p_add_dir='', $p_remove_dir='')
1969
- {
1970
- if (!$this->_openAppend())
1971
- return false;
1972
-
1973
- if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir))
1974
- $this->_writeFooter();
1975
-
1976
- $this->_close();
1977
-
1978
- return true;
1979
- }
1980
- // }}}
1981
-
1982
- // {{{ _dirCheck()
1983
-
1984
- /**
1985
- * Check if a directory exists and create it (including parent
1986
- * dirs) if not.
1987
- *
1988
- * @param string $p_dir directory to check
1989
- *
1990
- * @return bool TRUE if the directory exists or was created
1991
- */
1992
- function _dirCheck($p_dir)
1993
- {
1994
- clearstatcache();
1995
- if ((@is_dir($p_dir)) || ($p_dir == ''))
1996
- return true;
1997
-
1998
- $p_parent_dir = dirname($p_dir);
1999
-
2000
- if (($p_parent_dir != $p_dir) &&
2001
- ($p_parent_dir != '') &&
2002
- (!$this->_dirCheck($p_parent_dir)))
2003
- return false;
2004
-
2005
- if (!@mkdir($p_dir, 0777)) {
2006
- $this->_error("Unable to create directory '$p_dir'");
2007
- return false;
2008
- }
2009
-
2010
- return true;
2011
- }
2012
-
2013
- // }}}
2014
-
2015
- // {{{ _pathReduction()
2016
-
2017
- /**
2018
- * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
2019
- * rand emove double slashes.
2020
- *
2021
- * @param string $p_dir path to reduce
2022
- *
2023
- * @return string reduced path
2024
- *
2025
- * @access private
2026
- *
2027
- */
2028
- function _pathReduction($p_dir)
2029
- {
2030
- $v_result = '';
2031
-
2032
- // ----- Look for not empty path
2033
- if ($p_dir != '') {
2034
- // ----- Explode path by directory names
2035
- $v_list = explode('/', $p_dir);
2036
-
2037
- // ----- Study directories from last to first
2038
- for ($i=sizeof($v_list)-1; $i>=0; $i--) {
2039
- // ----- Look for current path
2040
- if ($v_list[$i] == ".") {
2041
- // ----- Ignore this directory
2042
- // Should be the first $i=0, but no check is done
2043
- }
2044
- else if ($v_list[$i] == "..") {
2045
- // ----- Ignore it and ignore the $i-1
2046
- $i--;
2047
- }
2048
- else if ( ($v_list[$i] == '')
2049
- && ($i!=(sizeof($v_list)-1))
2050
- && ($i!=0)) {
2051
- // ----- Ignore only the double '//' in path,
2052
- // but not the first and last /
2053
- } else {
2054
- $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?'/'
2055
- .$v_result:'');
2056
- }
2057
- }
2058
- }
2059
- $v_result = strtr($v_result, '\\', '/');
2060
- return $v_result;
2061
- }
2062
-
2063
- // }}}
2064
-
2065
- // {{{ _translateWinPath()
2066
- function _translateWinPath($p_path, $p_remove_disk_letter=true)
2067
- {
2068
- if (defined('OS_WINDOWS') && OS_WINDOWS) {
2069
- // ----- Look for potential disk letter
2070
- if ( ($p_remove_disk_letter)
2071
- && (($v_position = strpos($p_path, ':')) != false)) {
2072
- $p_path = substr($p_path, $v_position+1);
2073
- }
2074
- // ----- Change potential windows directory separator
2075
- if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
2076
- $p_path = strtr($p_path, '\\', '/');
2077
- }
2078
- }
2079
- return $p_path;
2080
- }
2081
- // }}}
2082
-
2083
- }
2084
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
restore/XCloner.php DELETED
@@ -1,1362 +0,0 @@
1
- <?php
2
- /*
3
- * XCloner.php
4
- *
5
- * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
- * MA 02110-1301, USA.
21
- */
22
-
23
- if(is_file("../cloner.config.php")){
24
-
25
- echo "<h3>Access denied, if you are trying to restore a backup, please move the restore script in another directory!</h3>";
26
-
27
- exit;
28
-
29
- }
30
-
31
-
32
- @set_time_limit(3600);
33
-
34
- @ini_set("error_reporting", E_ALL^E_NOTICE);
35
-
36
- ###################### Do not edit Below #############################
37
-
38
- $g_pcltar_lib_dir = "./";
39
-
40
- require "TAR.php";
41
-
42
- $_CONFIG['my_version'] = "3.0.1";
43
- $_CONFIG['script_name'] = "XCloner.php";
44
- $_CONFIG['sql_usefile'] = "";
45
- $_CONFIG['filesLimit'] = 100;
46
- $_CONFIG['seek'] = 0;
47
-
48
-
49
- if(isset($_REQUEST['sql_setfile']))
50
- $_CONFIG['sql_usefile'] = $_REQUEST['sql_setfile'];
51
-
52
- if(trim($_CONFIG['sql_usefile']) == "")
53
- $_CONFIG['sql_usefile'] = "database-sql.sql";
54
-
55
- if(isset($_REQUEST['strrep'])){
56
- setcookie ("strrep_c", "", time() - 3600);
57
- setcookie("strrep_c", str_replace("\r\n","*-*",stripslashes($_REQUEST['strrep'])), time()+3600); /* expire in 1 hour */
58
- }else{
59
- $_REQUEST['strrep'] = str_replace("*-*", "\r\n", $_COOKIE['strrep_c']);
60
- }
61
-
62
-
63
- if ($handle = opendir('./')) {
64
- /* This is the correct way to loop over the directory. */
65
- while (false !== ($file = readdir($handle))){
66
- $ext = substr($file,strlen($file)-4,strlen($file));
67
- if(($file!='XCloner.php')&&($file!='..')&&($file!='.')&&(($ext=='.tgz')||($ext=='.tar'))){
68
- $_CONFIG[versions][] = $file;
69
- }
70
- }
71
- closedir($handle);
72
- }else{
73
- echo "Unable to open my directory for reading and listing!";exit;
74
- }
75
-
76
-
77
- ######################################################################
78
-
79
-
80
- $_CONFIG['output_path'] = $_REQUEST['output_path'];
81
- $_CONFIG['output_url'] = $_REQUEST['output_url_pref']."://".$_REQUEST['output_url'];
82
- $_CONFIG['tmp'] = $_REQUEST['output_path'];
83
-
84
- if($_REQUEST['files_skip'] == 1)
85
- $_REQUEST['do_database'] = 1;
86
- if($_REQUEST['fpos'])
87
- $_CONFIG['seek'] = $_REQUEST['fpos'];
88
-
89
- $filepath =$_SERVER["SCRIPT_FILENAME"];
90
- $pathinfo = pathinfo($filepath);
91
- $startscript = $pathinfo['dirname'];
92
- $_CONFIG[group] = $groupinfo[name];
93
- $_CONFIG[owner] =$ownerinfo[name];
94
-
95
- ###################### FRONT AREA ###################################
96
- //setCache();
97
- ?>
98
-
99
- <!DOCTYPE html>
100
-
101
- <html>
102
- <head>
103
- <title>XCloner Restore - <?php echo $_SERVER['HTTP_HOST']?> - Backup and Restore Made Easy</title>
104
- <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
105
- <link REL="SHORTCUT ICON" HREF="http://www.xcloner.com/images/favicon.ico">
106
- <style type="text/css" media="screen">
107
- @import url( http://www.xcloner.com/downloads/style.css );
108
- @import url( http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/start/jquery-ui.css );
109
- .error {
110
- color: red;
111
- font-size: 15px;
112
- }
113
- </style>
114
-
115
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
116
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"></script>
117
- </head>
118
-
119
- <body>
120
-
121
- <script>
122
- $(function() {
123
- $( "#tabs-main" ).tabs();
124
- });
125
- </script>
126
-
127
-
128
- <!-- section 1-->
129
-
130
- <table align='center' width='700' bgcolor='#eeeeee' style='padding: 0 5px 0 5px;'>
131
-
132
- <tr><td align='center'><h2><font color=red>XCloner</font> Automatic Restore! - <?php echo $_SERVER['HTTP_HOST']?></h2></td></tr>
133
-
134
- <tr><td align='left'>
135
-
136
- <form action='' method='GET' name='form'>
137
-
138
- <?php
139
-
140
-
141
-
142
- switch ($_REQUEST[task]) {
143
- case 'step2':
144
- step2();
145
- break;
146
- case 'step1':
147
- step1();
148
- break;
149
- case 'getinfo':
150
- getPHPINFO();
151
- break;
152
- case 'info':
153
- echo phpinfo();
154
- break;
155
- default :
156
- start();
157
- break;
158
- }
159
-
160
- ?>
161
-
162
- </form>
163
- </td></tr>
164
- <tr><td>
165
- <hr />
166
- <small>XCloner Automatic Restore(<b><?php echo $_CONFIG['my_version']?></b>) - <a href='http://www.xcloner.com' title='XCloner.com - Website Backup Application'>Website Backup and Restore</a>
167
- </small>
168
- </td></tr>
169
- </table>
170
-
171
- </body>
172
-
173
- </html>
174
-
175
-
176
-
177
-
178
-
179
- <?php
180
-
181
- #####################################################################
182
-
183
-
184
- ##################### FUNCTIONS #####################################
185
-
186
- function step2($file=""){
187
-
188
- global $_CONFIG,$filepath ;
189
-
190
- $DBcreated = $_REQUEST[DBcreated];
191
-
192
- if ($DBcreated=='on'){
193
- $DBhostname = $_REQUEST['mysql_server'];
194
- $DBuserName = $_REQUEST['mysql_username'];
195
- $DBpassword = $_REQUEST['mysql_pass'];
196
- $DBname = $_REQUEST['mysql_db'];
197
-
198
- $db = @mysql_connect($DBhostname, $DBuserName, $DBpassword) or die("<br />The database details provided are incorrect and/or empty. Unable to connect to mysql server");
199
- @mysql_query("CREATE database $DBname;");
200
- if (!@mysql_select_db($DBname)) {
201
- die("<br /><span class='error'>Could not connect to $DBname database! Please make sure the database exists and that you assigned the mysql user to it...</span>");
202
- }
203
- mysql_query("SET sql_mode='';");
204
- if($_REQUEST['charset_of_file']!="")
205
- mysql_query("SET NAMES ".$_REQUEST['charset_of_file']."");
206
- else
207
- mysql_query("SET NAMES utf8;");
208
- }
209
-
210
- if($_REQUEST['do_database'] != 1){
211
-
212
- ############ DATABASE ONLY RESTRICTION##################################################
213
-
214
- ########################### START FTP MODE #################################
215
- if($_REQUEST[transfer_mode]==2){
216
-
217
- $_CONFIG[output_path] = $_CONFIG[output_path]."/archive_tmp/";
218
- @mkdir($_CONFIG[output_path]);
219
-
220
- // set up basic connection
221
- $conn_id = @ftp_connect($_REQUEST[ftp_server], $_REQUEST[ftp_port]) or die("<span class='error'>Could not connect to $_REQUEST[ftp_server] on port $_REQUEST[ftp_port]! Ftp connection has failed!</span>");
222
-
223
- // login with username and password
224
- $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]) or die("<span class='error'>Could not login to ftp server for user $_REQUEST[ftp_user] and provided pass! Ftp connection has failed!</span>");
225
-
226
- // check connection
227
- if ((!$conn_id) || (!$login_result)) {
228
- echo "<b style='color:red'>FTP connection has failed!</b>";
229
- echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server].":".$_REQUEST[ftp_port]." for user ".$_REQUEST[ftp_user]."</b>";
230
- return;
231
- } else {
232
- echo "<br />Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user], starting transfer...<br />";
233
- }
234
- $ftp_dir_original = ftp_pwd($conn_id);
235
- @ftp_mkdir($conn_id,$_REQUEST[ftp_path]);
236
-
237
- // try to change the directory to somedir
238
- if (@ftp_chdir($conn_id, $_REQUEST[ftp_path])) {
239
- echo "Current directory is now: <b>" . ftp_pwd($conn_id) . "</b>\n";
240
- } else {
241
- echo "<b style='color:red'>Couldn't change directory to <b>$_REQUEST[ftp_path]</b>, please verify that the ftp location exists or use the \"Install files directly\" option!</b><br />\n";
242
- return;
243
- }
244
- @ftp_chdir($conn_id, $ftp_dir_original);
245
-
246
- }
247
-
248
- ########################## END FTP MODE ######################################
249
-
250
-
251
- ##### START extract ######
252
- if($_REQUEST['refresh'] < 1){
253
-
254
- $ext = substr($file, strlen($file)-4, strlen($file));
255
- if($_REQUEST['file_utilities'] != '1'){
256
- $tar_object = new Archive_Tar($file);
257
-
258
- if($_REQUEST['manual_ftp']){
259
-
260
- $tar_object->_openRead();
261
- fseek($tar_object->_file, $_CONFIG['seek']);
262
- $seek = $tar_object->_extractList($_CONFIG['output_path'], $return, "partial", "", "", $_CONFIG['filesLimit']);
263
- $seek = $seek - 512;//reverse 512 bytes
264
- if($seek > 0){
265
- $backupSize = filesize($file);
266
- $rurl = rurl($seek, $backupSize);
267
- $percent = sprintf("%.2f",($seek*100)/$backupSize);
268
- echo "<h3>Processing files - ".$percent."%</h3>";
269
- echo "<script> document.location='".$rurl."'</script>";
270
- return;
271
- }
272
- $_REQUEST['fpos'] = 0;
273
- $_REQUEST['chunk'] = 0;
274
- }
275
- else{
276
- $tar_object->extract($_CONFIG['output_path']);
277
- #$tar_object->extractList("backups/perm.txt", $_CONFIG['output_path']);
278
- }
279
-
280
- }else{
281
- if($ext == '.tgz') $compress = 'z';
282
- else $compress = '';
283
- shell_exec("tar -x".$compress."pf $file -C $_CONFIG[output_path]");
284
- }
285
- }
286
- ##### END extract ######
287
-
288
-
289
- $new_arr = array();
290
- #@chmod($_CONFIG[output_path], 0777);
291
- $tran_file = $_CONFIG[output_path]."/transfer.txt";
292
-
293
- if($_REQUEST[transfer_mode]==2){
294
- # initialise list arrays, directories and files separately and array counters for them
295
- $excludedFolders = array();
296
- $d_arr = array(); $d = 0;
297
- $ds_arr = array();
298
- $f_arr = array(); $f = 0;
299
- $s_arr = array(); $s = 0;
300
- $d_arr[$d] = $_CONFIG[output_path];
301
-
302
- if($_REQUEST['refresh'] < 1){
303
- # obtain the list of files by recursing the mambo file store
304
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders , '', $_CONFIG[output_path]);
305
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $d_arr , '', $_CONFIG[output_path]);
306
- sort($d_arr);
307
- sort($f_arr);
308
- $new_arr = array_merge($d_arr, $f_arr);
309
-
310
- if($_REQUEST[transfer_mode]==2)
311
- if($fp = fopen($tran_file, "w")){
312
- foreach($new_arr as $file){
313
- fwrite($fp, $file."\n");
314
- }
315
- fclose($fp);
316
- }else{
317
- echo "Unable to write to directory ".$_CONFIG[output_path]."! Please check that this directory is writeable!"; return;
318
- }
319
- else{};
320
-
321
- }else{
322
- $content = "";
323
- $new_arr = file($tran_file);
324
- }
325
-
326
- if(sizeof($new_arr) != 0 )
327
- $percn = sprintf("%.2f",($_REQUEST[next] * 100)/sizeof($new_arr));
328
- if($percn > sizeof($new_arr))
329
- $percn = sizeof($new_arr);
330
-
331
- }
332
-
333
-
334
- if($_REQUEST['refresh'] == 1){
335
- echo "<h3>Transfering $percn% of ".sizeof($new_arr)." files through ftp</h3>";
336
- echo "<textarea cols=70 rows=30 name='ftp_list'></textarea>";
337
- }
338
- elseif($_REQUEST['refresh'] == 2)
339
- echo "Files transfer finished!";
340
-
341
- $i = (int)$_REQUEST[next];
342
- $j = 0;
343
-
344
- ### MOVING THE FILES THROUGH FTP
345
-
346
- #foreach($new_arr as $key=>$file)
347
- for($key=$i;$key<=sizeof($new_arr);$key++){
348
- $file = str_replace(array("\r","\n"), array("",""), $new_arr[$key]);
349
- if($_REQUEST['manual_ftp'] == 1)
350
- if($j == 100){
351
- #echo "Transfering files from line: ". (int)$_REQUEST[next];
352
- $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
353
- $rurl = "XCloner.php?".$qstr[0]."&refresh=1&next=".($_REQUEST[next]+100);
354
- ftp_close($conn_id);
355
- echo "<script> document.location='".$rurl."'</script>";
356
- exit;
357
- }
358
-
359
- $j++;
360
- $sfile = str_replace($_CONFIG[output_path],"",$file);
361
- $fsource = $_CONFIG[output_path]."/".$sfile;
362
- if(($sfile != "")&&($sfile!="/"))
363
- if($_REQUEST[transfer_mode]==2){
364
- $upload = 1;
365
- $ftarget = $_REQUEST[ftp_path]."/".$sfile;
366
- if(is_dir($fsource)){
367
- $upload1 = @ftp_mkdir($conn_id,$ftarget);
368
- }else{
369
- $upload = ftp_put($conn_id, $ftarget, $fsource, FTP_BINARY);
370
- }
371
- #echo "$i <br >";
372
-
373
- if(!$upload){
374
- echo "<br /><font color=red>Transfer fail for $fsource to $ftarget</font> <br />File already exists and/or doesn't have writing permissions!<br/>";
375
- }else{
376
-
377
- if($_REQUEST['manual_ftp'] == 1){
378
- $ftarget .= '\n';
379
-
380
- echo "<script>document.form.ftp_list.value = document.form.ftp_list.value + '".$ftarget."'; </script>";
381
- #echo "$ftarget <br />\n";
382
- }
383
- }
384
- }
385
- }
386
-
387
-
388
- if($_REQUEST['refresh'] == 1){
389
- $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
390
- $rurl = "XCloner.php?".$qstr[0]."&refresh=2&next=".($_REQUEST[next]+102);
391
- echo "<script> document.location='".$rurl."'</script>";
392
- exit;
393
- }
394
-
395
- ############### RESTORING HTACCESS AND CONFIGURATION PERM#####################################
396
-
397
- if($_REQUEST[transfer_mode]==2){
398
- $cmd = "CHMOD 0777 ".$_REQUEST[ftp_path]."/"."wp-config.php";
399
- @ftp_site($conn_id, $cmd);
400
- }else{
401
- @chmod($_REQUEST[output_path]."/"."wp-config.php", 0777);
402
- }
403
-
404
-
405
- #### CUSTOM PERMISSIONS #####
406
- if($_REQUEST['preserve_perm']){
407
- $perm_data = "";
408
- $perm_file = $_CONFIG[output_path]."/administrator/backups/perm.txt";
409
- $per = 1;
410
-
411
- @chmod($perm_file,0777);
412
- $fp = @fopen($perm_file,'r');
413
- if($fp){
414
- while(!feof($fp))
415
- $perm_data .= fread($fp, 1024);
416
- fclose($fp);
417
- }else{
418
-
419
- echo "Could not set permissions! Permissions file $perm_file not found!<br />";
420
- $per = 0;
421
- }
422
-
423
- $data = explode("\n",$perm_data);
424
- foreach($data as $value){
425
- $dir = explode("|", $value);
426
- if($dir[1]=="")
427
- $dir[1] = '0755';
428
-
429
- if(strstr($dir[0],"wp-config.php"))
430
- $dir[1] = '0777';
431
-
432
- if($_REQUEST[transfer_mode]==2){
433
- $cmd = "CHMOD ".$dir[1]." ".$_REQUEST[ftp_path]."/".$dir[0];
434
-
435
- @ftp_site($conn_id, $cmd);
436
-
437
- }else{
438
-
439
- @chmod($_CONFIG[output_path]."/".$dir[0], octdec($dir[1]));
440
-
441
- }
442
-
443
- }
444
-
445
- if($per){
446
- echo "<h2>Permissions restored to their initial value...</h2>";
447
- }
448
-
449
- }
450
- #### END CUSTOM PERMISSIONS #####
451
-
452
- $_CONFIG[output_path] = str_replace("/archive_tmp/","",$_CONFIG[output_path]);
453
-
454
- if($_REQUEST[transfer_mode]==2){
455
-
456
- // close the FTP stream
457
- @ftp_close($conn_id);
458
- recursive_remove_directory($_CONFIG[output_path]."/archive_tmp/");
459
- @unlink($_CONFIG[output_path]."/archive_tmp/");
460
- echo "<h2>Files succesfully copied to ".$_REQUEST[ftp_path]." on $_REQUEST[ftp_server] using FTP</h2>";
461
-
462
- }else{
463
- echo "<h2>Files succesfully copied to ".$_CONFIG[output_path]."</h2>";
464
- }
465
-
466
- ######### END DATABASE ONLY RESTRICT #########################################
467
-
468
- }
469
-
470
-
471
- ##### RESTORE CONFIGURATION #####
472
- $update_config = 1;
473
-
474
- if(($_REQUEST['files_skip']) and (isset($_REQUEST['fpos']))){
475
-
476
- $update_config = 0;
477
-
478
- }
479
-
480
- if(($_REQUEST['do_database'] != 1) || ($_REQUEST['files_skip'] == 1)){
481
- $config_file = $_CONFIG[output_path]."/wp-config.php";
482
- @chmod($config_file,0777);
483
- @unlink($_CONFIG[output_path]."/administrator/backups/perm.txt");
484
- if(($_CONFIG['sql_usefile'] == "database-sql.sql") and ($update_config))
485
- if(write_config($config_file)){
486
- echo "<H2>Configuration updated!</H2>";
487
- }else{
488
- echo "<span class='error'>Unable to write to configuration file $config_file... Aborting...</span>";return;
489
- }
490
- }
491
-
492
-
493
- ############ ATTEMPT DATABASE INSERT #####################################
494
-
495
- if($DBcreated!='on'){
496
-
497
- echo "<h2>Database import skipped!</h2>";
498
- echo "<a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...</b></a><br />";
499
-
500
- return ;
501
- }
502
-
503
- if (($DBcreated=='on')&&($_REQUEST['do_database'] == 1)){
504
-
505
- $sqlfile = $_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile'];
506
-
507
- if(!file_exists($sqlfile)){
508
- echo "<span class='error'>Unable to read the database backup file $sqlfile , database was not imported!</span>";
509
- }else{
510
-
511
- if($_REQUEST['manual_sql'])
512
- $errors = populate_db_manual( $db, $sqlfile);
513
- else
514
- $errors = populate_db( $db, $sqlfile);
515
-
516
- if(sizeof($errors)>0){
517
-
518
- echo "There were some errors while importing the database:<br />";
519
- echo "<textarea cols=60 rows=30>".implode("\n",$errors)."</textarea>";
520
- exit;
521
- }else{
522
-
523
- @unlink($_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile']);
524
-
525
- }
526
-
527
- echo "<h2>Database populated...</h2>";
528
-
529
- }
530
- }
531
-
532
- ###################################################################################
533
-
534
- if($_REQUEST['do_database'] != 1) {
535
-
536
- $vars = "";
537
- foreach($_REQUEST as $key=>$value)
538
- $vars .= $key.'='.@urlencode($value).'&';
539
-
540
- #$href = "XCloner.php?".$vars."do_database=1";
541
- $href = rurl()."&do_database=1";
542
- echo "<br /><a href='$href'>Please click here to continue with database import...</a>";
543
-
544
- return;
545
-
546
- }else{
547
-
548
- echo "<br /><a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...<br /></a><br />";
549
- return ;
550
- }
551
-
552
- }
553
-
554
- function write_config($file){
555
-
556
- if(@$fp = fopen($file, "r")){
557
- $config_data = "";
558
- while(!feof($fp))
559
- $config_data .= fread($fp, 1024);
560
- fclose($fp);
561
- }
562
-
563
- if ($_REQUEST[DBcreated] == 'on'){
564
-
565
- $config_data = str_replace("define('DB_HOST', '", "define('DB_HOST', '".$_REQUEST[mysql_server]."');#", $config_data);
566
- $config_data = str_replace("define('DB_USER', '", "define('DB_USER', '".$_REQUEST[mysql_username]."');#", $config_data);
567
- $config_data = str_replace("define('DB_PASSWORD', '", "define('DB_PASSWORD', '".$_REQUEST[mysql_pass]."');#", $config_data);
568
- $config_data = str_replace("define('DB_NAME', '", "define('DB_NAME', '".$_REQUEST[mysql_db]."');#", $config_data);
569
- $liveurl = $_REQUEST[output_url_pref]."://".$_REQUEST[output_url];
570
- $config_data = str_replace("define('DB_HOST", "define('WP_SITEURL','".$liveurl."');\ndefine('WP_HOME','".$liveurl."');\ndefine('RELOCATE',true);\ndefine('DB_HOST", $config_data);
571
-
572
- $config_data = str_replace("define('WP_SITEURL', '", "define('WP_SITEURL', '".$liveurl."');#", $config_data);
573
- $config_data = str_replace("define('WP_HOME', '", "define('WP_HOME', '".$liveurl."');#", $config_data);
574
- }
575
-
576
- if($_REQUEST['transfer_mode'] == 2){
577
- $config_data = str_replace('$'.'ftp_host =',"$"."ftp_host ='".$_REQUEST[ftp_server]."';#", $config_data);
578
- $config_data = str_replace('$'.'ftp_port =',"$"."ftp_port ='".$_REQUEST[ftp_port]."';#", $config_data);
579
- $config_data = str_replace('$'.'ftp_user =',"$"."ftp_user ='".$_REQUEST[ftp_user]."';#", $config_data);
580
- $config_data = str_replace('$'.'ftp_pass =',"$"."ftp_pass ='".$_REQUEST[ftp_pass]."';#", $config_data);
581
- $config_data = str_replace('$'.'ftp_root =',"$"."ftp_root ='".$_REQUEST[ftp_path]."';#", $config_data);
582
- }else{
583
- $config_data = str_replace('$'.'ftp_enable =',"$"."ftp_enable ='0';#", $config_data);
584
- }
585
-
586
- $_REQUEST[output_url] = str_replace("/###","",$_REQUEST[output_url]."###");
587
- $_REQUEST[output_url] = str_replace("###","",$_REQUEST[output_url]);
588
-
589
- $config_data = str_replace('$'.'live_site =',"$"."live_site ='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."';#", $config_data);
590
- $config_data = str_replace('$'.'absolute_path =',"$"."absolute_path ='".$_REQUEST[output_path]."';#", $config_data);
591
-
592
- if ($fp = fopen($file, "w")) {
593
- fwrite( $fp, $config_data);
594
- fclose( $fp );
595
- } else {
596
- return false;
597
- } // if
598
- return true;
599
- }
600
-
601
-
602
- function step1(){
603
-
604
- global $_CONFIG;
605
-
606
- $ftarget = $_CONFIG[output_path]."/".$_REQUEST[ver];
607
-
608
- if($_REQUEST['refresh'] < 1)
609
-
610
- if(!is_writable($_CONFIG[output_path])){
611
-
612
- echo "<span class='error'>Directory ".$_CONFIG[output_path]." is not writeable or does not exists! Could not continue...</span>";
613
-
614
- return ;
615
-
616
- }
617
-
618
-
619
-
620
- $ftarget = $_REQUEST[ver];
621
-
622
-
623
- if((!file_exists($ftarget)) and (!$_REQUEST['files_skip'])){
624
- echo "<span class='error'>Could not continue, unable to read the clone backup file! Please make sure you copied the backup in the same directory as XCloner.php </span>";
625
- return;
626
- }
627
-
628
- step2($ftarget);
629
-
630
- return;
631
-
632
- }
633
-
634
-
635
-
636
- function start() {
637
-
638
- global $_CONFIG,$pathinfo;
639
-
640
- $pdir = str_replace($_CONFIG['script_name'], "", $_SERVER["SCRIPT_FILENAME"]);
641
-
642
- $purl = $_SERVER['HTTP_HOST'].str_replace("/".$_CONFIG['script_name'],"", $_SERVER['SCRIPT_NAME']);
643
-
644
- ?>
645
-
646
-
647
- <script>
648
- $(function() {
649
- $( "#DBcreated" ).button();
650
- $( "#phpinfo").button();
651
- $( "#manual_sql" ).button();
652
- $( "#transfer_mode-ftp" ).button();
653
- $( "#transfer_mode-direct" ).button();
654
- $( "input:submit", ".form" ).button();
655
- });
656
- $(function() {
657
- $( "#tabs" ).tabs();
658
- $( "#tabs2" ).tabs();
659
- });
660
- </script>
661
-
662
-
663
- <!-- section 1-->
664
- <div id="tabs2">
665
- <ul>
666
- <li><a href="#tabs2-1">New Path & Url Configuration</a></li>
667
- </ul>
668
- <div id="tabs2-1">
669
- <table class="adminForm">
670
-
671
- <tr><td nowrap>
672
- 1. Install directory: (server path where you want to restore your backup)<br />
673
- <input type=text size=80 name='output_path' value='<?php echo str_replace("\\", "/", $pdir);?>'><br >
674
-
675
- </td></tr>
676
- <tr><td>
677
- <br />2.Install Url: (the url correspondent of your Install directory:)<br />
678
- <div style="display:inline">
679
- <div style="float:left">
680
- <select name='output_url_pref'>
681
- <option selected value='http'>http://</option>
682
- <option value='https'>https://</option>
683
- </select>
684
- </div>
685
- <div style="float:left">
686
- <input type=text size=65 name='output_url' value='<?php echo $purl?>'>
687
- </div>
688
- </div>
689
-
690
- </td></tr>
691
- <tr><td>
692
- <br />3. Choose backup archive to restore:
693
- <?php echo version_list('ver');?>
694
- </td></tr>
695
- </table>
696
- </div>
697
- </div>
698
- <!-- end section 1-->
699
-
700
- <div id="tabs">
701
- <ul>
702
- <li><a href="#tabs-1">New Mysql Configuration</a></li>
703
- <li><a href="#tabs-2">File Restore Options</a></li>
704
- </ul>
705
-
706
- <div id="tabs-1">
707
- <!--start tabs 1 -->
708
- <table width="100%">
709
- <tr><td>
710
- <!--<h3><a href="#">Mysql configuration: </a></h3>-->
711
- <input type=checkbox checked name='DBcreated' id="DBcreated"> <label for="DBcreated">Import mysql database</label>
712
- <input type='checkbox' value='1' name='manual_sql' checked id="manual_sql"> <label for="manual_sql">Incremental sql import</label>
713
- </td></tr>
714
- <tr><td>
715
- <!-- mysql details -->
716
- <table width='100%'>
717
- <tr>
718
- <td nowrap>Mysql server:</td>
719
- <td><input type=text size=40 name='mysql_server' value='localhost'></td>
720
- <tr>
721
- <td>Mysql username:</td>
722
- <td><input type=text size=40 name='mysql_username' value=''></td>
723
- </tr>
724
- <tr>
725
- <td>Mysql password:</td>
726
- <td><input type=text size=40 name='mysql_pass' value=''></td>
727
- </tr>
728
- <tr>
729
- <td>Mysql database:</td>
730
- <td><input type=text size=40 name='mysql_db' value=''></td>
731
- </tr>
732
- <tr>
733
- <td>Data encoding:</td>
734
- <td>
735
- <select name="charset_of_file">
736
-
737
- <option value="" selected="selected">Default</option>
738
- <option value="big5" title="Big5 Traditional Chinese">big5</option>
739
- <option value="binary" title="Binary pseudo charset">binary</option>
740
- <option value="cp1250" title="Windows Central European">cp1250</option>
741
- <option value="cp932" title="SJIS for Windows Japanese">cp932</option>
742
- <option value="euckr" title="EUC-KR Korean">euckr</option>
743
-
744
- <option value="gb2312" title="GB2312 Simplified Chinese">gb2312</option>
745
- <option value="gbk" title="GBK Simplified Chinese">gbk</option>
746
- <option value="latin1" title="cp1252 West European">latin1</option>
747
- <option value="latin2" title="ISO 8859-2 Central European">latin2</option>
748
- <option value="sjis" title="Shift-JIS Japanese">sjis</option>
749
- <option value="tis620" title="TIS620 Thai">tis620</option>
750
-
751
- <option value="ucs2" title="UCS-2 Unicode">ucs2</option>
752
- <option value="ujis" title="EUC-JP Japanese">ujis</option>
753
- <option value="utf8" title="UTF-8 Unicode" >utf8</option>
754
- </select>
755
- </td>
756
- </tr>
757
-
758
- <?php
759
- $dir = "administrator/backups/";
760
- $sql_files =array();
761
- if(@is_dir($dir)){
762
- if ($handle = @opendir($dir)) {
763
- /* This is the correct way to loop over the directory. */
764
- while (false !== ($file = @readdir($handle))) {
765
- if(strstr($file, ".sql"))
766
- $sql_files[] = $file;
767
- }
768
- @closedir($handle);
769
- }
770
-
771
- if(sizeof($sql_files) > 0) {
772
- $list = "";
773
- for($i=0;$i<sizeof($sql_files);$i++){
774
- $list .= "<option value='$sql_files[$i]'>$sql_files[$i]</option>";
775
- }
776
-
777
- echo "<tr><td>Import Mysql file:</td>
778
- <td><select name='sql_setfile'><option value='database-sql.sql'>Default</option>$list</select></td> </tr>";
779
- }
780
- }
781
- ?>
782
- </table>
783
- </tr></td>
784
- <!-- end mysql details -->
785
- </table>
786
- <!--end tabs 1 -->
787
- </div>
788
-
789
- <div id="tabs-2">
790
- <!-- start tabs 2 -->
791
- <table width="100%">
792
- <tr bgcolor='#dddddd'><td>
793
- <!--<h3><a href="#">Files transfer and configuration:</a></h3>-->
794
- <input type=checkbox name='files_skip' value='1' > <font color='red'>Skip files restore</font><br />
795
- <input type=checkbox name='preserve_perm' value='1'> Restore files permissions<br />
796
- <input type=checkbox name='file_utilities' value='1' > Restore by using the server utilities(tar) <br />
797
- <input type='checkbox' value='1' name='manual_ftp' checked> Incremental transfer
798
- </td></tr>
799
-
800
- <tr><td colspan=2>
801
-
802
- <table width='100%'>
803
- <tr><td colspan='2'>
804
- <label for="transfer_mode-ftp">Install files throught ftp:</label>
805
- <input type=radio name=transfer_mode value=2 id="transfer_mode-ftp">
806
- <!--<small>this will attempt to transfer all files through ftp, so the owner keep it's permissions, can be used to send files to other hosts also, <font color=red>*recommended</font></small>-->
807
- <label for="transfer_mode-direct">Install files directly</label>
808
- <input type=radio name=transfer_mode value=1 checked id="transfer_mode-direct"><br />
809
- <!--<small>transfering the files directly will cause some permissions problems in some cases, but it's faster than the other option </small>-->
810
- </td></tr>
811
- <tr>
812
- <td valign="top" nowrap>Ftp server:</td>
813
- <td><input type=text size=30 name='ftp_server' value='localhost'> : <input type=text size=3 name='ftp_port' value='21'></td>
814
- </tr>
815
- <tr>
816
- <td valign="top">Ftp username:</td>
817
- <td><input type=text size=30 name='ftp_user'></td>
818
- </tr>
819
- <tr>
820
- <td valign="top">Ftp password:</td>
821
- <td><input type=text size=30 name='ftp_pass'></td>
822
- </tr>
823
- <tr>
824
- <td valign="top">Ftp upload path:</td>
825
- <td><input type=text size=30 name='ftp_path'>
826
- <br><small>ftp root path of where the backup will be restored</small>
827
- </td>
828
- </tr>
829
- </table>
830
-
831
- </td></tr>
832
- </table>
833
- <!--end tabs 2-->
834
- </div>
835
- </div>
836
-
837
- <br />
838
- <div class="form">
839
- <input type=hidden name='task' value='step1'>
840
- <input type=submit name=submit value='Start install' >
841
- <button onclick="window.open('XCloner.php?task=getinfo', 'getInfo', 'toolbar,width=750,height=400'); return false;" id="phpinfo">phpinfo()</button>
842
- </div>
843
- <small>*after hitting submit please wait for the package to get unarchived and transfered through ftp if it is the case!</small>
844
-
845
- <br />
846
- <span class="ui-state-highlight">
847
- <span style='color:red'>Security Note:</span> After restore <b>delete the XCloner.php</b> script from your server</span>
848
- </span>
849
-
850
- <?php
851
-
852
- }
853
-
854
- function getPHPINFO(){
855
-
856
- ?>
857
-
858
- <table width='100%'>
859
- <tr bgcolor='#dddddd'><td>
860
- <b>PHP Configuration: <a target='_blank' href='XCloner.php?task=info'> phpinfo()</a></b>
861
- </td></tr>
862
-
863
- <tr><td>
864
- <table bgcolor='#dddddd' width='65%' style='text-align:center;' border='1'>
865
- <tr>
866
- <td><b style='color:red'>PHP Setting</b></td>
867
- <td><b style='color:orange'>Current Value</b></td>
868
- <td><b style='color:green'>Recomemnded</b></td>
869
- </tr>
870
- <tr>
871
- <td><b>Open_Basedir:</b> </td>
872
- <td>
873
- <?php echo (@ini_get('open_basedir') ? @ini_get('open_basedir') : 'No value')?>
874
- </td>
875
- <td><b>No Value</b></td>
876
- </tr>
877
- <tr>
878
- <td><b>Max Execution Time:</b> </td>
879
- <td>
880
- <?php echo (@ini_get('max_execution_time') ? @ini_get('max_execution_time') : 'No value')?>
881
- </td>
882
- <td><b>>30</b></td>
883
- </tr>
884
- <tr>
885
- <td><b>Safe mode:</b> </td>
886
- <td>
887
- <?php echo (@ini_get('safe_mode') ? @ini_get('safe_mode') : 'Off')?>
888
- </td>
889
- <td><b>Off</b></td>
890
- </tr>
891
- </table>
892
- </td></tr>
893
- </table>
894
-
895
- <?php
896
- }
897
-
898
-
899
- ###END
900
-
901
-
902
- ###Starting the manual sql backup
903
-
904
- function populate_db_manual( $db, $sqlfile='administrator/backups/database-sql.sql'){
905
-
906
- global $qstr;
907
-
908
- $extra_que = $qstr[0];
909
-
910
- $file = $sqlfile;
911
-
912
- define ('DATA_CHUNK_LENGTH',16384); // How many chars are read per time
913
-
914
- define ('MAX_QUERY_LINES',300); // How many lines may be considered to be one query (except text lines)
915
-
916
- $lines = "";
917
-
918
- $error = "";
919
-
920
- $error_status = 0;
921
-
922
- if((isset($_REQUEST['chunk']))&&((int)$_REQUEST['chunk'] != 0))
923
-
924
- $chunk = $_REQUEST['chunk'];
925
-
926
- else
927
-
928
- $chunk = DATA_CHUNK_LENGTH;
929
-
930
- if($_REQUEST['correct_query'] != 1){
931
-
932
- $start_pos = (int)$_REQUEST['fpos'];
933
-
934
- $fpos = read_file($file, MAX_QUERY_LINES, $start_pos, $chunk, $lines);
935
-
936
- }else{
937
-
938
- $lines[0] = stripslashes($_REQUEST['error_msg']);
939
-
940
- $fpos = $_REQUEST['start_posf'] ;
941
-
942
- }
943
-
944
- foreach($lines as $line)
945
-
946
- if(trim($line) != ''){
947
-
948
- $query = $line;
949
-
950
- $line = $line .";\n";
951
-
952
- #$tmp = explode("DEFAULT CHARSET",$line);
953
-
954
- $line_tmp = $line;
955
-
956
- $start_pos = $start_pos + strlen($line);
957
-
958
- if(isset($_REQUEST['strrep']))
959
-
960
- {
961
-
962
- $strrep = explode("\r\n", stripslashes($_REQUEST['strrep']));
963
-
964
- foreach($strrep as $value)
965
-
966
- if(trim($value)!= ""){
967
-
968
-
969
- $tmp = explode("|", $value);
970
-
971
-
972
- $line_tmp = str_replace(trim($tmp[0]),trim($tmp[1]),$line_tmp);
973
-
974
- $query = str_replace(trim($tmp[0]),trim($tmp[1]),$query);
975
-
976
- }
977
-
978
- }
979
-
980
- if(!mysql_query($line_tmp)){
981
-
982
- if($_REQUEST['correct_query'] != 1)
983
-
984
- $fpos = $start_pos ;
985
-
986
- $form_url = rurl($fpos, $chunk);
987
-
988
- echo "</form><form name='' action='".$form_url."' method='POST'>
989
-
990
- <input type='hidden' name='correct_query' value = '1'>
991
-
992
- <input type='hidden' name='start_pos' value='".$start_pos."'>
993
-
994
- <input type='hidden' name='start_posf' value='".$fpos."'>
995
-
996
- <input type='hidden' name='glen' value='".$qlen."'>
997
-
998
- <center>";
999
-
1000
- echo sprintf("<b>###MYSQL error</b>\n<br /><font color='red'>".mysql_error()."</font><br />\n<b>###On Query:</b><br />\n<br /><textarea cols=70 rows=15 name='error_msg'>%s</textarea><br />", $query);
1001
-
1002
- echo "<b>Search and replace in query:</b><br /><textarea cols=70 rows=5 name='strrep'>".stripslashes($_REQUEST[strrep])."</textarea><br />
1003
-
1004
- <small>
1005
-
1006
- enter a string, one per line, which you would like to replace in the query above, example <i>string_to_search|text_to_replace_with</i>
1007
-
1008
- </small>";
1009
-
1010
- echo "<br /> <input type=submit name=submit value='Correct Query &gt;&gt;'>";
1011
-
1012
- echo "</center></form>";
1013
-
1014
- $error_status = 1;
1015
-
1016
- break;
1017
-
1018
- }
1019
-
1020
- }
1021
-
1022
-
1023
- $percent = sprintf("%.2f", (100*$fpos)/ filesize($file));
1024
-
1025
- if($fpos!='-1'){
1026
-
1027
- echo "<h3>Processed $percent% from sql backup!</h3>";
1028
-
1029
- $red_url = rurl($fpos, $chunk);
1030
-
1031
- if($error_status == 1 ){
1032
-
1033
- echo "<h3><a href='".$red_url."'>To skip this query, click here to Continue</a></h3>";
1034
-
1035
- exit;
1036
-
1037
- }else{
1038
-
1039
- echo "<h3><a href='".$red_url."'>Continue here</a></h3>";
1040
-
1041
- echo "<script>window.location='".$red_url."'</script>";
1042
-
1043
- exit;
1044
-
1045
- }
1046
-
1047
- } else {
1048
-
1049
- echo "<h3>The sql import is finished!</h3>";
1050
-
1051
- }
1052
-
1053
- return;
1054
-
1055
- }
1056
-
1057
- ########END
1058
-
1059
-
1060
-
1061
- ### STARTING THE AUTOMATIC BACKUP
1062
-
1063
- function populate_db( $db, $sqlfile='administrator/backups/database-sql.sql') {
1064
-
1065
- global $errors, $_CONFIG;
1066
-
1067
- if($_REQUEST['use_mysqldump'] == 1){
1068
- echo shell_exec($_REQUEST['mysqldump_path']." -u ".$_REQUEST[mysql_username]." -p".$_REQUEST[mysql_pass]." -h ".$_REQUEST[mysql_server]." ".$_REQUEST[mysql_db]." < ".$sqlfile);
1069
- return;
1070
- }
1071
-
1072
- $mqr = @get_magic_quotes_runtime();
1073
-
1074
- @set_magic_quotes_runtime(0);
1075
-
1076
- @chmod($sqlfile,0777);
1077
-
1078
- $query = fread( fopen( $sqlfile, 'r' ), filesize( $sqlfile ) );
1079
-
1080
- @set_magic_quotes_runtime($mqr);
1081
-
1082
- $pieces = split_sql($query);
1083
-
1084
-
1085
-
1086
- for ($i=0; $i<count($pieces); $i++) {
1087
-
1088
- $pieces[$i] = trim($pieces[$i]);
1089
-
1090
- $tmp = explode("DEFAULT CHARSET",$pieces[$i]);
1091
-
1092
- $pieces[$i] = $tmp[0].";";
1093
-
1094
- if(!empty($pieces[$i]) && $pieces[$i] != "#") {
1095
-
1096
- if (!mysql_query($pieces[$i], $db)) {
1097
-
1098
- $errors[] = "\n\n##Mysql Query: \n########\n".
1099
-
1100
- $pieces[$i].
1101
-
1102
- "\n########\n##Error message: ".
1103
-
1104
- mysql_error();
1105
-
1106
-
1107
-
1108
- }
1109
-
1110
- }
1111
-
1112
-
1113
-
1114
- }
1115
-
1116
- return $errors;
1117
-
1118
- }
1119
-
1120
-
1121
- function rurl($fpos = 0, $chunk = 0){
1122
-
1123
- $get_query = "&";
1124
-
1125
- foreach($_REQUEST as $key=>$value){
1126
- if(($key != 'fpos')&&($key != 'chunk')&&($key != 'strrep_c')&&($key != 'strrep'))
1127
- $get_query .= $key."=".$value."&";
1128
- }
1129
- $url = $_SERVER['PHP_SELF']."?fpos=".$fpos."&chunk=".$chunk.$get_query;
1130
-
1131
- return $url;
1132
- }
1133
-
1134
- function read_file($file, $lines, $start_pos, &$chunk, &$text){
1135
-
1136
- $cline = 0;
1137
-
1138
- $fp = fopen($file, "r");
1139
- fseek($fp, $start_pos);
1140
- while((!feof($fp)) &&($cline <= $lines)){
1141
- $btemp = fgets($fp, $chunk);
1142
- $buffer .= $btemp;
1143
- if(strstr($btemp, ";\n"))
1144
- $cline++;
1145
- $fpos = ftell($fp);
1146
- }
1147
-
1148
- $buffer = str_replace(";\r", ";\n", $buffer);
1149
- $text = explode(";\n", $buffer);
1150
- $fpos = $fpos - strlen($text[sizeof($text)-1]);
1151
- if(sizeof($text) == 1)
1152
- $chunk = DATA_CHUNK_LENGTH+$chunk;
1153
- else
1154
- $chunk = DATA_CHUNK_LENGTH;
1155
-
1156
- if(feof($fp))
1157
- $fpos = '-1';
1158
- fclose ($fp);
1159
-
1160
- return $fpos; // array_reverse is optional: you can also just return the $text array which consists of the file's lines.
1161
-
1162
- }
1163
-
1164
-
1165
-
1166
- /**
1167
-
1168
- * @param string
1169
-
1170
- */
1171
-
1172
- function split_sql($sql) {
1173
-
1174
- $ret = array();
1175
- $sql = str_replace("\n) ", "\n) ;\n#\n#", $sql);
1176
- $sql = str_replace("\n--\n","\n#\n",$sql);
1177
- $sql = str_replace("\n-- ","\n# ",$sql);
1178
- $sql = str_replace("\n/*","\n#/*",$sql);
1179
- $sql = str_replace("#\n", "#;\n", $sql);
1180
-
1181
- // Processing the SQL file content
1182
-
1183
- $file_content = explode("\n",$sql);
1184
- $query = "";
1185
- // Parsing the SQL file content
1186
- foreach($file_content as $key=>$sql_line) {
1187
-
1188
- if(substr($sql_line, 0, 2) == "--")
1189
- $sql_line = "#".substr($sql_line, 2, strlen($sql_line));
1190
-
1191
- if(trim($sql_line) != "" ){
1192
-
1193
- $query .= $sql_line;
1194
-
1195
- // Checking whether the line is a valid statement
1196
- if(preg_match("/(.*);/", $sql_line)){
1197
-
1198
- $query = substr($query, 0, strlen($query)-1);
1199
-
1200
- //Executing the parsed string, returns the error code in failure
1201
- $ret[] = $query;
1202
- $query = "";
1203
- }
1204
- }
1205
- } //End of foreach
1206
-
1207
- return($ret);
1208
- }
1209
-
1210
-
1211
-
1212
- function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $mosConfig_absolute_path) {
1213
-
1214
- $currentfullpath = $mosConfig_absolute_path.$path;
1215
-
1216
- # Open possibly available directory
1217
-
1218
- if( is_dir( $currentfullpath ) ) {
1219
-
1220
- if( $handle = opendir( $currentfullpath ) ) {
1221
-
1222
- while( false !== ( $file = readdir( $handle ) ) ) {
1223
-
1224
- # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1225
-
1226
- if( $file != "." && $file != ".." ) {
1227
-
1228
- if( is_dir( $currentfullpath . "/" . $file ) ) {
1229
-
1230
- # Create array for directories
1231
-
1232
- $d_arr[++$d] = $currentfullpath . "/" . $file;
1233
-
1234
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $mosConfig_absolute_path);
1235
-
1236
- } else {
1237
-
1238
- if ( in_array($currentfullpath, $includedFolders) ) {
1239
-
1240
- # Create array for files
1241
-
1242
- $s_arr[$f] = filesize($currentfullpath.'/'.$file);
1243
-
1244
- $f_arr[$f++] = str_replace($mosConfig_absolute_path.'/', '', $currentfullpath.'/').$file;
1245
-
1246
- $s += filesize($currentfullpath.'/'.$file);
1247
-
1248
- }
1249
-
1250
- }
1251
-
1252
- }
1253
-
1254
- }
1255
-
1256
- }
1257
-
1258
- # Wrap things up if we're in a directory
1259
-
1260
- if( is_dir( $handle ) )
1261
-
1262
- closedir( $handle );
1263
-
1264
- }
1265
-
1266
- }
1267
-
1268
-
1269
-
1270
-
1271
-
1272
- function version_list($fname) {
1273
-
1274
- global $_CONFIG;
1275
-
1276
- $return = "<select name='$fname'><option value=''>Choose local clone archive</option>";
1277
-
1278
- if(is_array($_CONFIG[versions])){
1279
-
1280
- foreach($_CONFIG[versions] as $key=>$value){
1281
-
1282
- $size = sprintf("%.2fM", filesize($value)/(1024*1024));
1283
-
1284
- $return .= "<option selected value='$value'>$value($size)</option>";
1285
-
1286
- }
1287
-
1288
- }
1289
-
1290
- $return .= "</select>";
1291
-
1292
- return $return;
1293
-
1294
- }
1295
-
1296
-
1297
- function recursive_remove_directory($directory, $empty=FALSE){
1298
-
1299
- // if the path has a slash at the end we remove it here
1300
- if(substr($directory,-1) == '/'){
1301
- $directory = substr($directory,0,-1);
1302
- }
1303
-
1304
- // if the path is not valid or is not a directory ...
1305
- if(!file_exists($directory) || !is_dir($directory)){
1306
- // ... we return false and exit the function
1307
- return FALSE;
1308
-
1309
- // ... if the path is not readable
1310
- }elseif(!is_readable($directory)){
1311
- // ... we return false and exit the function
1312
- return FALSE;
1313
- // ... else if the path is readable
1314
- }else{
1315
- // we open the directory
1316
- $handle = opendir($directory);
1317
- // and scan through the items inside
1318
- while (FALSE !== ($item = readdir($handle))){
1319
- // if the filepointer is not the current directory
1320
- // or the parent directory
1321
- if($item != '.' && $item != '..'){
1322
- // we build the new path to delete
1323
- $path = $directory.'/'.$item;
1324
- // if the new path is a directory
1325
- if(is_dir($path)){
1326
- // we call this function with the new path
1327
- recursive_remove_directory($path);
1328
- // if the new path is a file
1329
- }else{
1330
- // we remove the file
1331
- unlink($path);
1332
- }
1333
- }
1334
- }
1335
- // close the directory
1336
- closedir($handle);
1337
-
1338
- // if the option to empty is not set to true
1339
- if($empty == FALSE){
1340
- // try to delete the now empty directory
1341
- if(!@rmdir($directory)){
1342
- // return false if not possible
1343
- return FALSE;
1344
- }
1345
- }
1346
- // return success
1347
- return TRUE;
1348
- }
1349
- }
1350
-
1351
-
1352
- function setCache($time = 3600){
1353
-
1354
- $seconds_to_cache = $time;
1355
- $ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
1356
- @header("Expires: $ts");
1357
- @header("Pragma: cache");
1358
- @header("Cache-Control: maxage=$seconds_to_cache");
1359
-
1360
- }
1361
-
1362
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
screenshot-8.png DELETED
Binary file
toolbar.cloner.html.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
- /**
3
- * XCloner
4
- * Oficial website: http://www.joomlaplug.com/
5
- * -------------------------------------------
6
- * Creator: Liuta Romulus Ovidiu
7
- * License: GNU/GPL
8
- * Email: admin@joomlaplug.com
9
- * Revision: 1.0
10
- * Date: July 2007
11
- **/
12
-
13
-
14
- /** ensure this file is being included by a parent file */
15
- defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
16
-
17
- function button($action, $text='', $js=''){
18
- if($action == "cancel")
19
- $icon = "ui-icon-cancel";
20
- elseif($action == "generate")
21
- $icon = "ui-icon-arrowthick-1-e";
22
- elseif($action == "config")
23
- $icon = "ui-icon-circle-check";
24
- else
25
- $icon = "ui-icon-arrowreturnthick-1-e";
26
- ?>
27
- <script>
28
- $(function() {
29
- $( "#<?php echo $text?>" ).button({
30
- icons:{
31
- primary: '<?php echo $icon;?>'
32
- }
33
- })
34
- .click(function(){
35
- document.adminForm.task.value='<?php echo $action?>';document.adminForm.submit();
36
- })
37
- .css({ 'text-transform':'uppercase', width: '110px', 'padding-top': '10px', 'padding-bottom': '10px' });
38
- });
39
- </script>
40
-
41
- <button id="<?php echo $text?>"><?php echo $text?></button>
42
-
43
- <?php
44
-
45
- }
46
-
47
- class TOOLBAR_cloner {
48
-
49
- function _LOGIN() {
50
- button('dologin','Login',false);
51
- button('cancel','Cancel',false);
52
- }
53
- function _GENERATE() {
54
- button('clone','Clone',false);
55
- button('move','Move',false);
56
- button('view','Back',false);
57
- }
58
- function _CONFIRM() {
59
- button('generate','Continue',false);
60
- button('cancel','Cancel',false);
61
- }
62
- function _CLONE() {
63
- button('continue','Continue',false);
64
- button('view','Cancel',false);
65
- }
66
- function _CONFIG() {
67
- button('config', 'Save');
68
- button('cancel', 'Cancel');
69
- }
70
-
71
- function _LANG_EDIT() {
72
- button('save_lang_apply','Apply');
73
- button('save_lang', 'Save');
74
- button('cancel_lang', 'Cancel');
75
- }
76
-
77
- function _LANG_ADD() {
78
- button('add_lang_new', 'New');
79
- button('cancel_lang', 'Cancel');
80
- }
81
-
82
- function _LANG() {
83
- button('add_lang','New');
84
- button('edit_lang', 'Edit');
85
- button('del_lang', 'Delete');
86
- button('cancel','Cancel');
87
- }
88
-
89
- function _RENAME() {
90
- button('rename_save', 'Save');
91
- button('rename_cancel', 'Cancel');
92
- }
93
- function _VIEW() {
94
- button('clone','Clone',true);
95
- button('move','Move',true);
96
- button('rename','Rename',true);
97
- button('remove','Delete');
98
- button('cancel','Cancel');
99
- }
100
- function _DEFAULT() {
101
-
102
- button('logout','Logout');
103
- button('cancel','Cancel');
104
-
105
- }
106
- }
107
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
toolbar.cloner.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
- /**
3
- * XCloner
4
- * Oficial website: http://www.joomlaplug.com/
5
- * -------------------------------------------
6
- * Creator: Liuta Romulus Ovidiu
7
- * License: GNU/GPL
8
- * Email: admin@joomlaplug.com
9
- * Revision: 1.0
10
- * Date: July 2007
11
- **/
12
-
13
-
14
- /** ensure this file is being included by a parent file */
15
- defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
16
-
17
- require_once('toolbar.cloner.html.php' );
18
-
19
- switch ( $task ) {
20
- case 'help':
21
- case 'credits':
22
- case 'refresh':
23
- case 'generate':
24
- TOOLBAR_cloner::_GENERATE();
25
- break;
26
-
27
- case 'rename_save':
28
- case 'rename':
29
- TOOLBAR_cloner::_RENAME();
30
- break;
31
- case 'confirm':
32
- TOOLBAR_cloner::_CONFIRM();
33
- break;
34
- case 'continue':
35
- case 'move':
36
- case 'clone':
37
- TOOLBAR_cloner::_CLONE();
38
- break;
39
- case 'config':
40
- TOOLBAR_cloner::_CONFIG();
41
- break;
42
- case 'show':
43
- case 'view':
44
- TOOLBAR_cloner::_VIEW();
45
- break;
46
-
47
-
48
- case 'add_lang':
49
- TOOLBAR_cloner::_LANG_ADD();
50
- break;
51
- case 'save_lang_apply':
52
- case 'edit_lang':
53
- TOOLBAR_cloner::_LANG_EDIT();
54
- break;
55
-
56
- case 'del_lang':
57
- case 'lang':
58
- TOOLBAR_cloner::_LANG();
59
- break;
60
-
61
- case 'login':
62
- TOOLBAR_cloner::_LOGIN();
63
- break;
64
-
65
- default:
66
- TOOLBAR_cloner::_DEFAULT();
67
- break;
68
- }
69
-
70
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
xcloner.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: XCloner
4
- Plugin URI: http://www.xcloner.com
5
- Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks. Don't forget to create the 'administrator/backups' directory in your Wordpress root and make it fully writeable. <a href="plugins.php?page=xcloner_show">Open XCloner</a> | <a href="http://www.xcloner.com/support/premium-support/">Get Premium Support</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40xcloner%2ecom&lc=US&item_name=XCloner%20Support&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest">Donate</a>
6
- Version: 3.0
7
- Author: Liuta Ovidiu
8
- Author URI: http://www.xcloner.com
9
- Plugin URI: http://www.xcloner.com
10
- */
11
-
12
-
13
- // no direct access
14
- #defined( '_JEXEC' ) or die( 'Restricted access' );
15
-
16
- function xcloner_show(){
17
-
18
- print "<iframe src='../wp-content/plugins/xcloner-backup-and-restore/index.php' width='100%' height='900' frameborder=0 marginWidth=0 frameSpacing=0 marginHeight=110 ></iframe>";
19
-
20
- }
21
- function xcloner_install(){
22
-
23
- }
24
-
25
- function xcloner_page(){
26
-
27
- if ( function_exists('add_submenu_page') )
28
- add_submenu_page('plugins.php', XCloner, XCloner, 'manage_options', 'xcloner_show', 'xcloner_show');
29
-
30
-
31
-
32
- }
33
-
34
- #add_action('admin_head', 'xcloner');
35
- add_action('admin_menu', 'xcloner_page');
36
-
37
- #add_options_page('XCloner Options', 'XCloner', 9, 'index.php', 'xcloner_options');
38
-
39
- if (isset($_GET['activate']) && $_GET['activate'] == 'true')
40
- {
41
- add_action('init', 'xcloner_install');
42
- }
43
-
44
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
xcloner_j1.5.xml DELETED
@@ -1,138 +0,0 @@
1
- <install type="component" version="1.5.0" method="upgrade">
2
- <name>XCloner-BackupandRestore</name>
3
- <version>2.2.1</version>
4
- <license>GNU/GPL</license>
5
- <author>XCloner.com</author>
6
- <authoremail>info@xcloner.com</authoremail>
7
- <authorurl>http://www.xcloner.com</authorurl>
8
- <creationDate>February 2011</creationDate>
9
- <copyright>XCloner.com</copyright>
10
- <description><![CDATA[
11
- <h2>XCloner Backup&Restore Utility</h2>
12
- <pre>XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured!
13
- <a href="http://www.xcloner.com"><img src="http://www.xcloner.com/xcloner_p.jpg" border=0 style="float:left; padding-right:10px;padding-bottom: 100px;padding-top:20px;"></a>
14
- Features:
15
- -cron script to generate backup
16
- -multiple backup options
17
- -restore tool to move the website rapidly to other locations
18
- -multiple locations of where you could store the backup safelly
19
- -comnpatible with both Joomla 1.5.x and 1.6.x
20
-
21
- For reports and suggestions please contact us at info@xcloner.com or visit us on <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
22
- </pre>
23
- <br/>
24
-
25
- XCloner.com &copy; 2006-2011 | <a href="http://www.xcloner.com">www.xcloner.com</a>
26
- <br/><p/><br/>
27
- ]]>
28
- </description>
29
- <installfile>install.xcloner.php</installfile>
30
- <administration>
31
- <menu img="components/com_xcloner-backupandrestore/images/xcloner.png" alias="XCloner">.XCloner-Backup and Restore</menu>
32
- <files>
33
- <filename>admin.xcloner.php</filename>
34
- <filename>admin.xcloner-backupandrestore.php</filename>
35
- <filename>xcloner.php</filename>
36
- <filename>classes/S3.php</filename>
37
- <filename>classes/fileRecursion.php</filename>
38
- <filename>classes/index.html</filename>
39
- <filename>classes/main.class.php</filename>
40
- <filename>classes/mysqlBackup.class.php</filename>
41
- <filename>administrator/index.html</filename>
42
- <filename>administrator/backups/index.html</filename>
43
- <filename>browser/file.gif</filename>
44
- <filename>browser/filebrowser.css</filename>
45
- <filename>browser/files_inpage.php</filename>
46
- <filename>browser/files_xml.php</filename>
47
- <filename>browser/folder.gif</filename>
48
- <filename>browser/timer.gif</filename>
49
- <filename>browser/xmlhttp.js</filename>
50
- <filename>configs/index.html</filename>
51
- <filename>css/dtree.css</filename>
52
- <filename>css/main.css</filename>
53
- <filename>css/start/jquery-ui-1.8.9.custom.css</filename>
54
- <filename>css/start/images/ui-bg_flat_55_999999_40x100.png</filename>
55
- <filename>css/start/images/ui-bg_flat_75_aaaaaa_40x100.png</filename>
56
- <filename>css/start/images/ui-bg_glass_75_79c9ec_1x400.png</filename>
57
- <filename>css/start/images/ui-icons_056b93_256x240.png</filename>
58
- <filename>css/start/images/ui-icons_d8e7f3_256x240.png</filename>
59
- <filename>css/start/images/ui-icons_fcd113_256x240.png</filename>
60
- <filename>css/start/images/ui-bg_glass_45_0078ae_1x400.png</filename>
61
- <filename>css/start/images/ui-icons_f7a50d_256x240.png</filename>
62
- <filename>css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png</filename>
63
- <filename>css/start/images/ui-icons_0078ae_256x240.png</filename>
64
- <filename>css/start/images/ui-bg_glass_55_f8da4e_1x400.png</filename>
65
- <filename>css/start/images/ui-icons_e0fdff_256x240.png</filename>
66
- <filename>css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png</filename>
67
- <filename>css/start/images/ui-icons_f5e175_256x240.png</filename>
68
- <filename>css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png</filename>
69
- <filename>css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png</filename>
70
-
71
- <filename>images/about.png</filename>
72
- <filename>images/actions.gif</filename>
73
- <filename>images/actions.png</filename>
74
- <filename>images/backup.png</filename>
75
- <filename>images/css.png</filename>
76
- <filename>images/editions.png</filename>
77
- <filename>images/editionssm.png</filename>
78
- <filename>images/empty.gif</filename>
79
- <filename>images/filesave.png</filename>
80
- <filename>images/folder.png</filename>
81
- <filename>images/forum.png</filename>
82
- <filename>images/gen_settings.png</filename>
83
- <filename>images/help.png</filename>
84
- <filename>images/helpsm.png</filename>
85
- <filename>images/join.gif</filename>
86
- <filename>images/joinbottom.gif</filename>
87
- <filename>images/keep_icon.gif</filename>
88
- <filename>images/lang.png</filename>
89
- <filename>images/lhelp.png</filename>
90
- <filename>images/line.gif</filename>
91
- <filename>images/logo.gif</filename>
92
- <filename>images/logo.png</filename>
93
- <filename>images/xcloner.png</filename>
94
- <filename>images/minus.gif</filename>
95
- <filename>images/minusbottom.gif</filename>
96
- <filename>images/nolines_minus.gif</filename>
97
- <filename>images/nolines_plus.gif</filename>
98
- <filename>images/page.gif</filename>
99
- <filename>images/plus.gif</filename>
100
- <filename>images/plusbottom.gif</filename>
101
- <filename>images/publish_x.png</filename>
102
- <filename>images/settings.png</filename>
103
- <filename>images/support.png</filename>
104
- <filename>images/templatessm.png</filename>
105
- <filename>images/website.png</filename>
106
- <filename>images/wizard.png</filename>
107
- <filename>images/wizardsm.png</filename>
108
- <filename>images/wizardsm_restore.gif</filename>
109
- <filename>images/wizardsm_restore.png</filename>
110
- <filename>javascript/dtree.js</filename>
111
- <filename>javascript/main.js</filename>
112
- <filename>javascript/jquery-1.4.4.min.js</filename>
113
- <filename>javascript/jquery-ui-1.8.9.custom.min.js</filename>
114
- <filename>language/english.php</filename>
115
- <filename>language/spanish.php</filename>
116
- <filename>language/dutch.php</filename>
117
- <filename>language/deutsch.php</filename>
118
- <filename>language/index.html</filename>
119
- <filename>restore/TAR.php</filename>
120
- <filename>restore/XCloner.php</filename>
121
- <filename>admin.cloner.html.php</filename>
122
- <filename>admin.cloner.php</filename>
123
- <filename>cloner.config.php</filename>
124
- <filename>cloner.cron.php</filename>
125
- <filename>cloner.functions.php</filename>
126
- <filename>common.php</filename>
127
- <filename>index.php</filename>
128
- <filename>index2.php</filename>
129
- <filename>install.xcloner.php</filename>
130
- <filename>license.txt</filename>
131
- <filename>readme.txt</filename>
132
- <filename>toolbar.cloner.html.php</filename>
133
- <filename>toolbar.cloner.php</filename>
134
- </files>
135
- </administration>
136
- </install>
137
-
138
-