XCloner – Backup and Restore - Version 2.1.1

Version Description

Download this release

Release Info

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

Version 2.1.1

Files changed (84) hide show
  1. admin.cloner.html.php +1778 -0
  2. admin.cloner.php +191 -0
  3. admin.xcloner.php +10 -0
  4. administrator/backups/.excl +0 -0
  5. administrator/backups/index.html +0 -0
  6. administrator/index.html +0 -0
  7. browser/file.gif +0 -0
  8. browser/filebrowser.css +34 -0
  9. browser/files_inpage.php +18 -0
  10. browser/files_xml.php +264 -0
  11. browser/folder.gif +0 -0
  12. browser/timer.gif +0 -0
  13. browser/xmlhttp.js +154 -0
  14. cloner.config.php +90 -0
  15. cloner.cron.php +411 -0
  16. cloner.functions.php +1946 -0
  17. common.php +64 -0
  18. configs/index.html +0 -0
  19. css/dtree.css +34 -0
  20. css/main.css +686 -0
  21. css/tabber.css +109 -0
  22. images/about.png +0 -0
  23. images/actions.gif +0 -0
  24. images/actions.png +0 -0
  25. images/backup.png +0 -0
  26. images/css.png +0 -0
  27. images/editions.png +0 -0
  28. images/editionssm.png +0 -0
  29. images/empty.gif +0 -0
  30. images/filesave.png +0 -0
  31. images/folder.png +0 -0
  32. images/forum.png +0 -0
  33. images/gen_settings.png +0 -0
  34. images/help.png +0 -0
  35. images/helpsm.png +0 -0
  36. images/join.gif +0 -0
  37. images/joinbottom.gif +0 -0
  38. images/keep_icon.gif +0 -0
  39. images/lang.png +0 -0
  40. images/lhelp.png +0 -0
  41. images/line.gif +0 -0
  42. images/logo.gif +0 -0
  43. images/logo.png +0 -0
  44. images/minus.gif +0 -0
  45. images/minusbottom.gif +0 -0
  46. images/nolines_minus.gif +0 -0
  47. images/nolines_plus.gif +0 -0
  48. images/page.gif +0 -0
  49. images/plus.gif +0 -0
  50. images/plusbottom.gif +0 -0
  51. images/publish_x.png +0 -0
  52. images/settings.png +0 -0
  53. images/support.png +0 -0
  54. images/templatessm.png +0 -0
  55. images/website.png +0 -0
  56. images/wizard.png +0 -0
  57. images/wizardsm.png +0 -0
  58. images/wizardsm_restore.gif +0 -0
  59. images/wizardsm_restore.png +0 -0
  60. images/xcloner.png +0 -0
  61. index.php +3 -0
  62. index2.php +3 -0
  63. install.xcloner.php +33 -0
  64. javascript/dtree.js +672 -0
  65. javascript/tabber.js +512 -0
  66. language/deutsch.php +410 -0
  67. language/dutch.php +304 -0
  68. language/english.php +402 -0
  69. language/index.html +4 -0
  70. language/spanish.php +302 -0
  71. license.txt +2 -0
  72. readme.txt +83 -0
  73. recursive.php +118 -0
  74. restore/TAR.php +1821 -0
  75. restore/XCloner.php +2219 -0
  76. screenshot-1.png +0 -0
  77. screenshot-2.png +0 -0
  78. screenshot-3.png +0 -0
  79. screenshot-4.png +0 -0
  80. screenshot-5.png +0 -0
  81. toolbar.cloner.html.php +85 -0
  82. toolbar.cloner.php +69 -0
  83. xcloner.php +43 -0
  84. xcloner_j1.5.xml +115 -0
admin.cloner.html.php ADDED
@@ -0,0 +1,1778 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
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
+ if($_COOKIE['auth_clone'] != 1)
18
+ setcookie('auth_clone', '1');
19
+
20
+ class mosTabs{
21
+
22
+ function mosTabs($int){
23
+
24
+ echo "<div class=\"tabber\">";
25
+
26
+ }
27
+
28
+ function startTab($name, $class){
29
+
30
+ echo "<div class=\"tabbertab\" title=\"$name\">";
31
+
32
+
33
+ }
34
+
35
+ function endTab(){
36
+
37
+ echo "</div>";
38
+
39
+ }
40
+
41
+ function endPane(){
42
+
43
+ echo "</div>";
44
+ }
45
+
46
+ }
47
+
48
+ /**
49
+ * @package Joomla
50
+ * @subpackage JoomlaCloner
51
+ */
52
+ class HTML_cloner {
53
+
54
+ function header(){
55
+
56
+ global $mosConfig_live_site, $task;
57
+
58
+ ?>
59
+ <html lang="en">
60
+ <head>
61
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
62
+ <title>XCloner Backup and Restore</title>
63
+
64
+ <link rel="stylesheet" href="css/tabber.css" TYPE="text/css" MEDIA="screen">
65
+ <link rel="styleSheet" href="css/dtree.css" type="text/css" />
66
+ <link rel="styleSheet" href="css/main.css" type="text/css" />
67
+
68
+ <script type="text/javascript" src="javascript/tabber.js"></script>
69
+ <script type="text/javascript" src="javascript/dtree.js"></script>
70
+ <script type="text/javascript">
71
+
72
+ /* Optional: Temporarily hide the "tabber" class so it does not "flash"
73
+ on the page as plain HTML. After tabber runs, the class is changed
74
+ to "tabberlive" and it will appear. */
75
+
76
+ document.write('<style type="text/css">.tabber{display:none;}<\/style>');
77
+ </script>
78
+
79
+ </head>
80
+ <body>
81
+
82
+ <table width='100%' style="padding-left: 3px; padding-right: 4px;align:center;" bgcolor='#ffffff'>
83
+ <tr><td align='right'>
84
+
85
+ </td></tr>
86
+
87
+ <tr><td align='center'>
88
+
89
+ <table width='100%' border='1' bgcolor='white'>
90
+ <tr>
91
+ <td width='100%'>
92
+ <table><tr><td>
93
+ <img src="images/backup.png" align="middle">&nbsp;
94
+ </td><td>
95
+ <h2><?php echo LM_COM_TITLE.$_SERVER['HTTP_HOST']; ?></h2>
96
+ <h1>Backup and Restore</h1>
97
+ </td></tr></table>
98
+ <td>
99
+ <?php
100
+ # Generating the buttons...
101
+ require_once( "toolbar.cloner.php" );
102
+ ?>
103
+
104
+ </tr>
105
+ </table>
106
+ <br />
107
+ <table width="100%" cellspacing='3' cellpadding="4" >
108
+ <tr><td valign='top' width="160" >
109
+ <table width='100%' cellpadding='5' height='100%' class='menu_table'><tr><td>
110
+
111
+
112
+ <div class="dtree">
113
+
114
+ <a href="javascript: d.openAll();"><?php echo LM_MENU_OPEN_ALL?></a> | <a href="javascript: d.closeAll();"><?php echo LM_MENU_CLOSE_ALL?>l</a><br />
115
+ <br />
116
+ <script type="text/javascript">
117
+ <!--
118
+
119
+ d = new dTree('d');
120
+
121
+ d.add(0,-1,'&nbsp;<?php echo LM_MENU_CLONER;?>','index2.php?option=com_cloner','','','images/logo.gif');
122
+
123
+ d.add(800,0,'&nbsp;<?php echo LM_MENU_ADMINISTRATION;?>','','','','images/actions.gif','images/actions.gif');
124
+
125
+ d.add(801,800,'&nbsp;<?php echo LM_MENU_CONFIGURATION;?>','index2.php?option=com_cloner&task=config','','','images/gen_settings.png');
126
+ d.add(802,800,'&nbsp;<?php echo LM_MENU_CRON;?>','index2.php?option=com_cloner&task=cron','','','images/templatessm.png');
127
+ d.add(803,800,'&nbsp;<?php echo LM_MENU_LANG;?>','index2.php?option=com_cloner&task=lang','','','images/lang.png');
128
+
129
+
130
+ d.add(840,0,'&nbsp;<?php echo LM_MENU_ACTIONS;?>','','','','images/actions.gif','images/actions.gif');
131
+ d.add(841,840,'&nbsp;<?php echo LM_MENU_View_backups;?>','index2.php?option=com_cloner&task=view','','','images/editionssm.png');
132
+ d.add(842,840,'&nbsp;<?php echo LM_MENU_Generate_backup;?>','index2.php?option=com_cloner&task=confirm','','','images/wizardsm.png');
133
+ d.add(843,840,'&nbsp;<?php echo LM_MENU_Restore_backup;?>','index2.php?option=com_cloner&task=restore','','','images/wizardsm_restore.gif');
134
+
135
+ d.add(830,0,'&nbsp;<?php echo LM_MENU_SUPPORT;?>','','','','images/support.png','images/support.png');
136
+ d.add(831,830,'&nbsp;<?php echo LM_MENU_FORUM;?>','http://www.xcloner.com/support/forums/','','_blank','images/forum.png','images/forum.png');
137
+ d.add(832,830,'&nbsp;<?php echo LM_MENU_WEBSITE;?>','http://www.xcloner.com','','_blank','images/website.png','images/website.png');
138
+
139
+
140
+
141
+ d.add(820,0,'&nbsp;<?php echo LM_MENU_Documentation;?>','','','','images/help.png','images/help.png');
142
+ d.add(821,820,'&nbsp;<?php echo LM_MENU_ABOUT;?>','index2.php?option=com_cloner&task=about','','','images/about.png','images/about.png');
143
+
144
+ document.write(d);
145
+
146
+ //-->
147
+ </script></div> </td></tr></table>
148
+ </td><td valign='top' align='left' style="padding-left: 20px;">
149
+
150
+
151
+ <?php
152
+ if($_REQUEST['mosmsg']!="")
153
+
154
+ echo "<center><h2>".$_REQUEST['mosmsg']."</h2></center>";
155
+
156
+ }
157
+
158
+ function footer(){
159
+
160
+ ?>
161
+ </td></tr></table>
162
+ <hr><br /><br />
163
+ <center>
164
+ <p>Powered by <a href='http://www.xcloner.com' target='_blank'>XCloner.com</a>. All rights reserved!</p></center>
165
+
166
+ </td></tr></table>
167
+
168
+ <?php
169
+
170
+ }
171
+
172
+ function _FDefault(){
173
+ ?>
174
+
175
+ <form action="index2.php" method="post" name="adminForm">
176
+
177
+ <table class="adminform">
178
+ <tr><th valign='top' >
179
+ <?php echo LM_JOOMLAPLUG_CP?>
180
+ </th>
181
+ </table>
182
+
183
+ <table class="adminform" >
184
+ <tr><td >
185
+ <div id="cpanel">
186
+
187
+ <div style="float:left;">
188
+ <div class="icon">
189
+
190
+ <a href="index2.php?option=com_cloner&amp;task=config">
191
+ <img src="images/settings.png"
192
+ alt="Settings" align="middle" name="" border="0" />
193
+ <span><?php echo LM_MAIN_Settings?></span>
194
+ </a>
195
+ </div>
196
+ </div>
197
+
198
+ <div style="float:left;">
199
+ <div class="icon">
200
+
201
+ <a href="index2.php?option=com_cloner&amp;task=view">
202
+ <img src="images/editions.png"
203
+ alt="View Backups" align="middle" name="" border="0" />
204
+ <span><?php echo LM_MAIN_View_Backups?></span>
205
+ </a>
206
+ </div>
207
+ </div>
208
+
209
+ <div style="float:left;">
210
+ <div class="icon">
211
+
212
+ <a href="index2.php?option=com_cloner&amp;task=confirm">
213
+ <img src="images/wizard.png"
214
+ alt="MagaGenerate Backup" align="middle" name="" border="0" />
215
+ <span><?php echo LM_MAIN_Generate_Backup?></span>
216
+ </a>
217
+ </div>
218
+ </div>
219
+
220
+ <div style="float:left;">
221
+ <div class="icon">
222
+
223
+ <a href="index2.php?option=com_cloner&amp;task=about">
224
+ <img src="images/lhelp.png"
225
+ alt="MagaGenerate Backup" align="middle" name="" border="0" />
226
+ <span><?php echo LM_MAIN_Help?></span>
227
+ </a>
228
+ </div>
229
+ </div>
230
+
231
+
232
+
233
+
234
+ </div>
235
+ </td></tr>
236
+ </table>
237
+ <input type="hidden" name="option" value="com_cloner" />
238
+ <input type="hidden" name="task" value="lang" />
239
+ </form>
240
+
241
+ <?php
242
+ }
243
+
244
+ /*The basic authentification form*/
245
+ function Login(){
246
+
247
+ ?>
248
+ <center><br />
249
+ <form action="index2.php" method="post" name="adminForm">
250
+ <table border='1' ><tr><td align='center'>
251
+ <table align='center' cellpadding='10' cellspacing='20'>
252
+ <tr ><td colspan='2' align='center'><b>Authentification Area:</b></td></tr>
253
+ <tr><td>Username:</td><td><input type='text' size='30' name='username'></td></tr>
254
+ <tr><td>Password:</td><td><input type='password' size='30' name='password'></td></tr>
255
+
256
+ <tr><td colspan='2'><?php echo LM_LOGIN_TEXT;?></td></tr>
257
+
258
+ </table>
259
+ </td></tr>
260
+
261
+
262
+
263
+ </table>
264
+
265
+ <input type="hidden" name="option" value="com_cloner" />
266
+ <input type="hidden" name="task" value="lang" />
267
+ <input type="hidden" name="boxchecked" value="0" />
268
+ <input type="hidden" name="hidemainmenu" value="0" />
269
+
270
+ </form>
271
+ </center>
272
+ <?php
273
+
274
+ }
275
+
276
+ function Cron(){
277
+ global $_CONFIG;
278
+ ?>
279
+ <table class='adminform'>
280
+ <tr><th>
281
+ <?php echo LM_CRON_TOP?>
282
+ </th></tr>
283
+ <tr><td>
284
+ <pre>
285
+ <?php echo LM_CRON_SUB?>
286
+ <br /><b>For Joomla:</b>
287
+ <span style='background: #eeeeee'>
288
+ /usr/bin/php /path_to_backup_dir/cloner.cron.php
289
+ <br />
290
+ or
291
+ <br />
292
+ links http://link_to_backup_dir/cloner.cron.php
293
+ <br />
294
+ or
295
+ <br />
296
+ lynx -source http://link_to_backup_dir/cloner.cron.php
297
+ </span>
298
+
299
+ For <b>Running Multiple Crons</b>, you need to first create a custom configuration file in the XCloner Configuration -> Cron tab
300
+ and then replace "cloner.cron.php" with "cloner.cron.php?config=myconfig.php", only use 'links' or 'lynx' options to run the cronjob
301
+
302
+ If you would like to use the <b>php SSH command</b> for running Multiple Crons, you will need to replace
303
+ the "cloner.cron.php" with <b>"cloner.cron.php myconfig.php"</b> in the command line.
304
+
305
+ <?php echo LM_CRON_HELP?>
306
+ </pre>
307
+ </td></tr>
308
+ </table>
309
+
310
+ <?php
311
+ }
312
+
313
+
314
+ function Translator_Edit_DEFAULT($option, $content, $file, $lang){
315
+ global $_CONFIG;
316
+ ?>
317
+ <form action="index2.php" method="post" name="adminForm">
318
+ <table class="adminlist">
319
+ <tr>
320
+ <th align="left"><?php echo LM_LANG_EDIT_FILE?> <?php echo $file?></th>
321
+ </tr>
322
+
323
+ <tr>
324
+
325
+ <td><textarea name='def_content' cols='100' rows='30'><?php echo $content;?></textarea></td>
326
+
327
+ </tr>
328
+
329
+ <input type="hidden" name="option" value="com_cloner" />
330
+ <input type="hidden" name="language" value="<?php echo $lang?>" />
331
+ <input type="hidden" name="task" value="lang" />
332
+ <input type="hidden" name="boxchecked" value="0" />
333
+ <input type="hidden" name="hidemainmenu" value="0" />
334
+ </form>
335
+
336
+ <?php
337
+
338
+ }
339
+
340
+ function Translator_Add($option){
341
+ global $_CONFIG;
342
+ ?>
343
+ <form action="index2.php" method="post" name="adminForm">
344
+ <table class="adminlist">
345
+ <tr>
346
+ <th align="left"><?php echo LM_LANG_NEW?></th>
347
+ </tr>
348
+
349
+ <tr>
350
+
351
+ <td><input size='40' type=text name='lname' value=''></td>
352
+
353
+ </tr>
354
+
355
+ <input type="hidden" name="option" value="com_cloner" />
356
+ <input type="hidden" name="language" value="<?php echo $lang?>" />
357
+ <input type="hidden" name="task" value="add_lang_new" />
358
+ <input type="hidden" name="boxchecked" value="0" />
359
+ <input type="hidden" name="hidemainmenu" value="0" />
360
+ </form>
361
+ <?php
362
+ }
363
+
364
+ function Translator_Edit($option, $data, $def_data, $file, $lang){
365
+ global $_CONFIG;
366
+ ?>
367
+
368
+ <form action="index2.php" method="post" name="adminForm">
369
+ <table class="adminlist">
370
+ <tr>
371
+ <th align="left"><?php echo LM_LANG_EDIT_FILE?> <input type=text name='lfile' size=100 value='<?php echo $file?>'><br />
372
+ <font color='red'><?php echo LM_LANG_EDIT_FILE_SUB?></font>
373
+
374
+ <script language="javascript" type="text/javascript">
375
+ function submitbutton(pressbutton) {
376
+ var form = document.adminForm;
377
+
378
+ if (pressbutton == 'save_lang_apply') {
379
+ if(confirm('Before you continue please make sure you are still logged in, else press Cancel and then try again!')){
380
+ submitform( pressbutton );
381
+ }
382
+ return;
383
+ }
384
+ else
385
+ if (pressbutton == 'save_lang') {
386
+ if(confirm('Before you continue please make sure you are still logged in, else press Cancel and then try again!')){
387
+ submitform( pressbutton );
388
+ }
389
+ return;
390
+ }
391
+ else{
392
+ submitform( pressbutton );
393
+ }
394
+ }
395
+ </script>
396
+
397
+ </th>
398
+ </tr>
399
+ </table>
400
+ <?php
401
+ foreach($data as $key=>$value)
402
+ if($def_data[$key]!="") {
403
+ if($i++ %2 == 0)
404
+ $bgcolor = '#eeeeee';
405
+ else
406
+ $bgcolor = '#dddddd';
407
+ ?>
408
+ <table class="adminlist">
409
+ <tr>
410
+ <th width='50%' align="left">Default Variable <?php echo $key?></th>
411
+ <th width='50%' align="left">Translation <?php echo $key?></th>
412
+ </tr>
413
+ <tr bgcolor="<?php echo $bgcolor?>">
414
+ <td><textarea cols=65 rows=3 ><?php echo stripslashes($def_data[$key])?></textarea></td>
415
+
416
+ <td bgcolor='<?php if( trim(str_replace(array("\n","\r"," "),array("","",""),$def_data[$key])) !=
417
+ trim(str_replace(array("\n","\r"," "),array("","",""),$value)))
418
+ echo 'green';
419
+ else
420
+ echo 'red';?>'>
421
+ <textarea cols=65 rows=3 name=lang[<?php echo $key?>]><?php echo stripslashes($value)?></textarea></td>
422
+ </tr>
423
+
424
+ <?php
425
+ }
426
+ ?>
427
+
428
+ <input type="hidden" name="option" value="com_cloner" />
429
+ <input type="hidden" name="language" value="<?php echo $lang?>" />
430
+ <input type="hidden" name="task" value="lang" />
431
+ <input type="hidden" name="boxchecked" value="0" />
432
+ <input type="hidden" name="hidemainmenu" value="0" />
433
+ </form>
434
+
435
+ <?php
436
+ }
437
+
438
+ function Translator($option, $lang_arr){
439
+ global $_CONFIG;
440
+
441
+ ?>
442
+
443
+ <form action="index2.php" method="post" name="adminForm">
444
+ <table class="adminlist">
445
+ <tr>
446
+ <th width="5" align="left">#</th>
447
+ <th width="5" align="left">
448
+ <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $lang_arr ); ?>);" />
449
+ </th>
450
+ <th align="left">
451
+ <?php echo LM_LANG_NAME ?>
452
+ </th>
453
+ </tr>
454
+ <?php
455
+
456
+ for($i=0; $i<sizeof($lang_arr); $i++){
457
+
458
+ ?>
459
+
460
+ <tr>
461
+ <td width="5" align="left"><?php echo ($i+1);?></td>
462
+ <td width="5" align="left">
463
+ <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" onclick="isChecked(this.checked);" />
464
+ <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $lang_arr[$i] ?>" onclick="isChecked(this.checked);" />
465
+ </td>
466
+ <td align="left" >
467
+ <a href="index2.php?option=<?php echo $option;?>&task=edit_lang&langx=<?php echo $lang_arr[$i];?>"><?php echo ucfirst($lang_arr[$i])?>
468
+ </td>
469
+ </tr>
470
+ <?php
471
+
472
+ }
473
+ ?>
474
+
475
+ <input type="hidden" name="option" value="com_cloner" />
476
+ <input type="hidden" name="task" value="lang" />
477
+ <input type="hidden" name="boxchecked" value="0" />
478
+ <input type="hidden" name="hidemainmenu" value="0" />
479
+ </form>
480
+ <?php
481
+ }
482
+
483
+ function showBackups( &$files, &$sizes, $path, $option ) {
484
+ // ----------------------------------------------------------
485
+ // Presentation of the backup set list screen
486
+ // ----------------------------------------------------------
487
+ global $baDownloadPath, $_CONFIG;
488
+
489
+ ?>
490
+ <form action="index2.php" method="post" name="adminForm">
491
+ <table class="adminlist">
492
+ <tr>
493
+ <th width="5">#</th>
494
+ <th width="5">
495
+ <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $files ); ?>);" />
496
+ </th>
497
+ <th width="33%" class="title">
498
+ <?php echo LM_COL_FILENAME ?>
499
+ </th>
500
+ <th align="left" width="10%">
501
+ <?php echo LM_COL_DOWNLOAD ?>
502
+ </th>
503
+ <th align="left" width="10%">
504
+ <?php echo LM_COL_SIZE ?>
505
+ </th>
506
+ <th align="left" width="43%">
507
+ <?php echo LM_COL_DATE ?>
508
+ </th>
509
+ </tr>
510
+ <?php
511
+ $k = 0;
512
+ for ($i=0; $i <= (count( $files )-1); $i++) {
513
+ $date = date ("D jS M Y H:i:s (\G\M\T O)", filemtime($path.'/'.$files[$i]));
514
+ ?>
515
+ <tr class="<?php echo "row$k"; ?>">
516
+ <td>
517
+ <?php echo $i+1; ?>
518
+ </td>
519
+ <td align="center">
520
+ <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" onclick="isChecked(this.checked);" />
521
+ <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $files[$i] ?>" onclick="isChecked(this.checked);" />
522
+ </td>
523
+ <td >
524
+ <a target='_blank' href="<?php echo "index2.php?option=com_cloner&task=download&file=".'/'.urlencode($files[$i]); ?>"><?php echo $files[$i]; ?></a><input type="hidden" id="f<?php echo $i ?>" name="f<?php echo $i ?>" value="<?php echo $files[$i]; ?>" >
525
+ </td>
526
+ <td align="left">
527
+ <a target='_blank' href="<?php echo "index2.php?option=com_cloner&task=download&file=".'/'.urlencode($files[$i]); ?>"><img src="images/filesave.png" border="0" alt="<?php echo LM_DOWNLOAD_TITLE ?>" title="<?php echo LM_DOWNLOAD_TITLE ?>"></a></td >
528
+ <!--<td align="left">
529
+ <?php
530
+
531
+ $userfile = $_CONFIG['baDownloadPath']."/".$files[$i];
532
+ $localfile = $_CONFIG['clonerPath']."/".$files[$i];
533
+ if(@file_exists($userfile))
534
+ echo "<a href=\"index2.php?option=com_cloner&task=action&action=delete&file=$files[$i]\">
535
+ <img border='0' src='images/tick.png'></a>";
536
+ else
537
+ echo "<a href=\"index2.php?option=com_cloner&task=action&action=copy&file=$files[$i]\">
538
+ <img border='0' src='images/publish_x.png'></a>";
539
+ ?>
540
+ </td>-->
541
+ <td align="left">
542
+ <?php echo $sizes[$i]; ?>
543
+ </td >
544
+ <td align="left">
545
+ <?php echo $date; ?>
546
+ </td>
547
+ </tr>
548
+ <?php
549
+ $k = 1 - $k;
550
+ }
551
+ ?>
552
+ </table>
553
+
554
+ <input type="hidden" name="option" value="com_cloner" />
555
+ <input type="hidden" name="task" value="" />
556
+ <input type="hidden" name="boxchecked" value="0" />
557
+ <input type="hidden" name="hidemainmenu" value="0" />
558
+ </form>
559
+ <br/>&nbsp;
560
+ <?php
561
+ }
562
+
563
+ function Config($option){
564
+ global $config_file,$_CONFIG, $lang_array, $database, $mosConfig_db;
565
+ ?>
566
+ <form name='adminForm' action='index2.php' method='POST'>
567
+ <table class='adminform'>
568
+ <tr><th colspan='2'>
569
+ <?php echo LM_CONFIG_EDIT?> <?php echo $config_file?>
570
+ </th></tr>
571
+ </table>
572
+ <?php
573
+ $tabs = new mosTabs(1);
574
+ $tabs->startTab(LM_TAB_GENERAL,"config-general-tab");
575
+ ?>
576
+ <table class='adminform'>
577
+
578
+
579
+ <tr>
580
+ <th colspan='2'>
581
+ <?php echo LM_CONFIG_BSETTINGS?>
582
+ </th>
583
+ </tr>
584
+
585
+ <tr>
586
+ <td>
587
+ <?php echo LM_CONFIG_UBPATH?>
588
+ </td>
589
+ <td>
590
+ <input type=text size=50 name='backup_path' value='<?php echo $_CONFIG[backup_path]?>'>
591
+ <br /><?php echo LM_CONFIG_UBPATH_SUB?>
592
+ </td>
593
+ </tr>
594
+
595
+ <tr>
596
+ <td width='250'>
597
+ <?php echo LM_CONFIG_BPATH?>
598
+ </td>
599
+ <td>
600
+ <input type=text size=50 name='clonerPath' value='<?php echo $_CONFIG[clonerPath]?>'>
601
+ <br /><?php echo LM_CONFIG_BPATH_SUB?>
602
+ </td>
603
+ </tr>
604
+
605
+
606
+ <tr>
607
+ <th colspan='2'>
608
+ <?php echo LM_CONFIG_BSETTINGS_OPTIONS?>
609
+ </th>
610
+ </tr>
611
+
612
+ <tr>
613
+ <td>
614
+ <?php echo LM_CONFIG_MANUAL_BACKUP;?>
615
+ </td>
616
+ <td>
617
+ <?php echo LM_YES?> <input type=radio size=50 value=1 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==1) echo 'checked';?>>
618
+ <?php echo LM_NO?> <input type=radio size=50 value=0 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==0) echo 'checked';?>>
619
+ <br><small><?php echo LM_CONFIG_MANUAL_BACKUP_SUB?></small>
620
+ </td>
621
+ </tr>
622
+
623
+ <tr>
624
+ <td>
625
+ <?php echo LM_CRON_COMPRESS?>
626
+ </td>
627
+ <td>
628
+ <?php echo LM_YES?> <input type=radio size=50 value=1 name='backup_compress' <?php if($_CONFIG[backup_compress]==1) echo 'checked';?>>
629
+ <?php echo LM_NO?> <input type=radio size=50 value=0 name='backup_compress' <?php if($_CONFIG[backup_compress]==0) echo 'checked';?>>
630
+ <br /> <small>set it to Yes in order to compress the files into smaller backups</small>
631
+ </td>
632
+ </tr>
633
+
634
+ <tr>
635
+ <td>
636
+ <?php echo LM_CRON_DB_BACKUP?>
637
+ </td>
638
+ <td>
639
+ Yes <input type=radio size=50 value=1 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==1) echo 'checked';?>>
640
+ No <input type=radio size=50 value=0 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==0) echo 'checked';?>>
641
+ <br />
642
+ <?php echo LM_CRON_DB_BACKUP_SUB?>
643
+ </td>
644
+ </tr>
645
+
646
+ <tr>
647
+ <td>
648
+ <?php echo LM_CONFIG_SYSTEM_MBACKUP?>
649
+ </td>
650
+ <td>
651
+ Yes <input type=radio size=50 value=1 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==1) echo 'checked';?>>
652
+ No <input type=radio size=50 value=0 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==0) echo 'checked';?>>
653
+ <br />
654
+ <?php echo LM_CONFIG_SYSTEM_MBACKUP_SUB?>
655
+ </td>
656
+ </tr>
657
+
658
+ <tr>
659
+ <th colspan='2'>
660
+ <?php echo LM_CONFIG_BSETTINGS_SERVER?>
661
+ </th>
662
+ </tr>
663
+
664
+
665
+ <tr >
666
+ <td>
667
+ <?php echo LM_CONFIG_MEM?>
668
+ </td>
669
+ <td align='left'>
670
+ <table width='85%' cellpadding='0' cellspacing='2' border='1'>
671
+ <tr bgcolor='#efefef'><td valign='middle'>
672
+ <?php echo LM_ACTIVE;?> <input type=checkbox value=1 name='mem' <?php if($_CONFIG[mem]==1) echo 'checked';?>>
673
+ </td><td align='left'>
674
+
675
+ <table width='100%' cellpadding='0' cellspacing='0'>
676
+ <tr><td>
677
+ <?php echo LM_TAR_PATH;?> <br /><input size='50' type=text name=tarpath value='<?php echo $_CONFIG[tarpath]?>'><br />
678
+ <?php echo LM_TAR_PATH_SUB;?>
679
+ </td></tr>
680
+
681
+ </table>
682
+
683
+ </td></tr>
684
+
685
+ <tr bgcolor='#dedede'><td>
686
+ <?php echo LM_ACTIVE?> <input type=checkbox value=1 name='sql_mem' <?php if($_CONFIG[sql_mem]==1) echo 'checked';?>>
687
+ </td><td align='left'>
688
+ <?php echo LM_MYSQLDUMP_PATH;?> <br /><input type=text size='50' name='sqldump' value='<?php echo $_CONFIG[sqldump]?>'>
689
+
690
+ </td></tr>
691
+ </table>
692
+
693
+ <?php echo LM_CONFIG_MEM_SUB?>
694
+
695
+ </td>
696
+ </tr>
697
+
698
+ <tr>
699
+ <th colspan='2'>
700
+ <?php echo "License Management"?>
701
+ </th>
702
+ </tr>
703
+ <tr>
704
+ <td>
705
+ <?php echo "License Code - optional*
706
+ <br />*only for support purposes"?>
707
+ </td>
708
+ <td>
709
+ <textarea cols=40 rows='7' name='license_code' ><?php echo $_CONFIG[license_code]?></textarea>
710
+ <br />Copy/Paste the license code from <a target='_blank' href='http://www.xcloner.com/'>XCloner.com Members area</a>
711
+ </td>
712
+ </tr>
713
+
714
+
715
+ </table>
716
+ <?php
717
+ $tabs->endTab();
718
+ $tabs->startTab(LM_TAB_MYSQL,"config-mysql-tab");
719
+ ?>
720
+ <table class='adminform'>
721
+
722
+
723
+ <tr>
724
+ <th colspan='2'>
725
+ <?php echo LM_CONFIG_MYSQL?>
726
+ </th>
727
+ </tr>
728
+
729
+ <tr>
730
+ <td>
731
+ <?php echo LM_CONFIG_MYSQLH?>
732
+ </td>
733
+ <td>
734
+ <input type=text size=50 name='mysql_host' value='<?php echo $_CONFIG[mysql_host]?>'>
735
+ <br /><?php echo LM_CONFIG_MYSQLH_SUB?>
736
+ </td>
737
+ </tr>
738
+
739
+ <tr>
740
+ <td>
741
+ <?php echo LM_CONFIG_MYSQLU?>
742
+ </td>
743
+ <td>
744
+ <input type=text size=50 name='mysql_user' value='<?php echo $_CONFIG[mysql_user]?>'>
745
+ <br /><?php echo LM_CONFIG_MYSQLU_SUB?>
746
+ </td>
747
+ </tr>
748
+
749
+ <tr>
750
+ <td>
751
+ <?php echo LM_CONFIG_MYSQLP?>
752
+ </td>
753
+ <td>
754
+ <input type=text size=50 name='mysql_pass' value='<?php echo $_CONFIG[mysql_pass]?>'>
755
+ <br /><?php echo LM_CONFIG_MYSQLP_SUB?>
756
+ </td>
757
+ </tr>
758
+
759
+ <tr>
760
+ <td>
761
+ <?php echo LM_CONFIG_MYSQLD?>
762
+ </td>
763
+ <td>
764
+ <input type=text size=50 name='mysql_database' value='<?php echo $_CONFIG[mysql_database]?>'>
765
+ <br /><?php echo LM_CONFIG_MYSQLD_SUB?>
766
+ </td>
767
+ </tr>
768
+
769
+ <tr>
770
+ <td width='200'>
771
+ <?php echo LM_CONFIG_SYSTEM_MDATABASES?>
772
+ </td>
773
+ <td>
774
+ <?php echo LM_YES?> <input type=radio name='system_mdatabases' value='0' <?php if(abs($_CONFIG[system_mdatabases])==0) echo "checked";?>>
775
+ <?php echo LM_NO?> <input type=radio name='system_mdatabases' value='1' <?php if(abs($_CONFIG[system_mdatabases])==1) echo "checked";?>>
776
+ <br>
777
+
778
+ <br /><?php echo LM_CONFIG_SYSTEM_MDATABASES_SUB?>
779
+ </td>
780
+ </tr>
781
+
782
+ </table>
783
+ <?php
784
+ $tabs->endTab();
785
+ $tabs->startTab(LM_TAB_AUTH,"config-mysql-tab");
786
+ ?>
787
+ <table class='adminform'>
788
+
789
+
790
+ <tr>
791
+ <th colspan='2'>
792
+ <?php echo LM_CONFIG_AUTH?>
793
+ </th>
794
+ </tr>
795
+
796
+ <tr>
797
+ <td>
798
+ <?php echo LM_CONFIG_AUTH_USER?>
799
+ </td>
800
+ <td>
801
+ <input type=text size=30 name='jcuser' value='<?php echo $_CONFIG[jcuser]?>'>
802
+ <br /><?php echo LM_CONFIG_AUTH_USER_SUB?>
803
+ </td>
804
+ </tr>
805
+
806
+ <tr>
807
+ <td>
808
+ <?php echo LM_CONFIG_AUTH_PASS?>
809
+ </td>
810
+ <td>
811
+ <input type=text size=30 name='jcpass' value=''> <?php if($_CONFIG['jcpass'] == md5('admin')) echo "<font color=red>please change the default password 'admin'</font>"?>
812
+ <br /><?php echo LM_CONFIG_AUTH_PASS_SUB?>
813
+ </td>
814
+ </tr>
815
+
816
+
817
+ </table>
818
+ <?
819
+ $tabs->endTab();
820
+ $tabs->startTab(LM_TAB_SYSTEM,"config-system-tab");
821
+ ?>
822
+ <table class='adminform'>
823
+ <tr>
824
+ <th colspan='2'>
825
+ <?php echo LM_CONFIG_DISPLAY?>
826
+ </th>
827
+ </tr>
828
+
829
+ <tr>
830
+ <td width='200'>
831
+ <?php echo LM_CONFIG_SYSTEM_LANG?>
832
+ </td>
833
+ <td>
834
+ <select name='select_lang'>
835
+ <option value=''><?php echo LM_CONFIG_SYSTEM_LANG_DEFAULT;?></option>
836
+ <?php
837
+ foreach($lang_array as $value)
838
+ if($_CONFIG['select_lang'] == $value)
839
+ echo "<option value='$value' selected>$value</option>\n";
840
+ else
841
+ echo "<option value='$value'>$value</option>\n";
842
+ ?>
843
+ </select>
844
+ <br>
845
+ <br /><?php echo LM_CONFIG_SYSTEM_LANG_SUB?>
846
+ </td>
847
+ </tr>
848
+
849
+
850
+ <!--<tr>
851
+ <td width='200'>
852
+ <?php echo LM_CONFIG_SYSTEM_DOWNLOAD?>
853
+ </td>
854
+ <td>
855
+ <?php echo LM_YES?> <input type=radio name='system_dlink' value='1' <?php if(abs($_CONFIG[system_dlink])==1) echo "checked";?>>
856
+ <?php echo LM_NO?> <input type=radio name='system_dlink' value='0' <?php if(abs($_CONFIG[system_dlink])==0) echo "checked";?>>
857
+ <br>
858
+
859
+ <br /><?php echo LM_CONFIG_SYSTEM_DOWNLOAD_SUB?>
860
+ </td>
861
+ </tr>-->
862
+
863
+
864
+ <tr>
865
+ <th colspan='2'>
866
+ <?php echo LM_CONFIG_SYSTEM?>
867
+ </th>
868
+ </tr>
869
+
870
+ <tr>
871
+ <td width='200'>
872
+ <?php echo LM_CONFIG_SYSTEM_FTP?>
873
+ </td>
874
+ <td>
875
+ Direct <input type=radio name='system_ftptransfer' value='0' <?php if(abs($_CONFIG[system_ftptransfer])==0) echo "checked";?>>
876
+ Passive <input type=radio name='system_ftptransfer' value='1' <?php if(abs($_CONFIG[system_ftptransfer])==1) echo "checked";?>> <br>
877
+
878
+ <br /><?php echo LM_CONFIG_SYSTEM_FTP_SUB?>
879
+ </td>
880
+ </tr>
881
+ <tr>
882
+ <td>
883
+ <?php echo LM_FTP_TRANSFER_MORE?>
884
+ </td>
885
+ <td>
886
+ Normal <input type=radio size=50 value=0 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==0) echo 'checked';?>>
887
+ Secure <input type=radio size=50 value=1 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==1) echo 'checked';?>>
888
+ </td>
889
+ </tr>
890
+
891
+ <th colspan='2'>
892
+ <?php echo LM_CONFIG_MANUAL?>
893
+ </th>
894
+ </tr>
895
+
896
+ <tr>
897
+ <td>
898
+ <?php echo LM_CONFIG_MANUAL_FILES;?>
899
+ </td>
900
+ <td>
901
+ <input type=text size=20 name='backup_refresh_number' value=<?php echo $_CONFIG[backup_refresh_number];?>>
902
+
903
+ </td>
904
+ </tr>
905
+
906
+ <tr>
907
+ <td>
908
+ <?php echo LM_CONFIG_MANUAL_REFRESH;?>
909
+ </td>
910
+ <td>
911
+ <input type=text size=20 name='refresh_time' value=<?php echo $_CONFIG[refresh_time];?>> seconds
912
+
913
+ </td>
914
+ </tr>
915
+
916
+ </table>
917
+ <?php
918
+ $tabs->endTab();
919
+ $tabs->startTab(LM_TAB_CRON,"config-cron-tab");
920
+ ?>
921
+ <table class='adminform'>
922
+ <tr>
923
+ <th colspan='2'>
924
+ <?php echo LM_CRON_SETTINGS_M?> - all configs are saved in configs/
925
+ </th>
926
+ </tr>
927
+
928
+ <tr>
929
+ <td>
930
+ <?php echo LM_CRON_MCRON?>
931
+ </td>
932
+ <td>
933
+ <input type=text size=30 value="<?php echo $_CONFIG[cron_save_as]?>" name='cron_save_as' >.php <br />
934
+ <?php echo LM_CRON_MCRON_SUB?>
935
+ </td>
936
+ </tr>
937
+
938
+ <tr>
939
+ <td>
940
+ <?php echo LM_CRON_MCRON_AVAIL?>
941
+ </td>
942
+ <td>
943
+ <?php
944
+
945
+ if ($handle = @opendir($_CONFIG['multiple_config_dir'])) {
946
+
947
+ while (false !== ($file = readdir($handle))) {
948
+ if( ($file!=".") && ($file!="..") &&($file!="") && (strstr($file, '.php'))){
949
+ $fcron = "cloner.cron.php?config=$file";
950
+
951
+ echo "<b>$fcron</b>";
952
+
953
+ echo " - <a href='$fcron' target='_blank'>execute cron</a>";
954
+
955
+ echo " | <a href='index2.php?option=com_cloner&task=cron_delete&fconfig=$file'>delete config</a>";
956
+
957
+ echo "\n<br />";
958
+ }
959
+ }
960
+
961
+ closedir($handle);
962
+ }
963
+ ?>
964
+ </td>
965
+ </tr>
966
+
967
+ <tr>
968
+ <th colspan='2'>
969
+ <?php echo LM_CRON_SETTINGS?>
970
+ </th>
971
+ </tr>
972
+
973
+ <tr>
974
+ <td>
975
+ <?php echo LM_CRON_SEMAIL?>
976
+ </td>
977
+ <td>
978
+ <input type=text size=30 value="<?php echo $_CONFIG[cron_logemail]?>" name='cron_logemail' > <br />
979
+ <?php echo LM_CRON_SEMAIL_SUB?>
980
+ </td>
981
+ </tr>
982
+
983
+ <tr>
984
+ <td width='200'>
985
+ <?php echo LM_CRON_MODE?>
986
+ </td>
987
+ <td>
988
+ <input type=radio size=50 value=0 name='cron_send' <?php if($_CONFIG[cron_send]==0) echo 'checked';?>>
989
+ <?php echo LM_CONFIG_CRON_LOCAL?><br />
990
+ <input type=radio size=50 value=1 name='cron_send' <?php if($_CONFIG[cron_send]==1) echo 'checked';?>>
991
+ <?php echo LM_CONFIG_CRON_REMOTE?><br />
992
+ <input type=radio size=50 value=2 name='cron_send' <?php if($_CONFIG[cron_send]==2) echo 'checked';?>>
993
+ <?php echo LM_CONFIG_CRON_EMAIL?> <br />
994
+ <?php echo LM_CRON_MODE_INFO?>
995
+ </td>
996
+ </tr>
997
+ <tr>
998
+ <td>
999
+ <?php echo LM_CRON_TYPE?>
1000
+ </td>
1001
+ <td>
1002
+ <input type=radio size=50 value=0 name='cron_btype' <?php if($_CONFIG[cron_btype]==0) echo 'checked';?>>
1003
+ <?php echo LM_CONFIG_CRON_FULL?> <br />
1004
+ <input type=radio size=50 value=1 name='cron_btype' <?php if($_CONFIG[cron_btype]==1) echo 'checked';?>>
1005
+ <?php echo LM_CONFIG_CRON_FILES?><br />
1006
+ <input type=radio size=50 value=2 name='cron_btype' <?php if($_CONFIG[cron_btype]==2) echo 'checked';?>>
1007
+ <?php echo LM_CONFIG_CRON_DATABASE?> <br />
1008
+ <?php echo LM_CRON_TYPE_INFO?>
1009
+ </td>
1010
+ </tr>
1011
+
1012
+ <tr>
1013
+ <td>
1014
+ <?php echo LM_CRON_BNAME?>
1015
+ </td>
1016
+ <td>
1017
+ <input type=text size=50 value="<?php echo $_CONFIG[cron_bname]?>" name='cron_bname' > <br />
1018
+ <?php echo LM_CRON_BNAME_SUB?>
1019
+ </td>
1020
+ </tr>
1021
+
1022
+
1023
+ <tr>
1024
+ <td>
1025
+ <?php echo LM_CRON_IP?>
1026
+ </td>
1027
+ <td>
1028
+ <textarea type=text size=50 name='cron_ip' cols='30' rows='5'><?php echo $_CONFIG[cron_ip]?></textarea> <br />
1029
+ <?php echo LM_CRON_IP_SUB?>
1030
+ </td>
1031
+ </tr>
1032
+
1033
+ </table>
1034
+ <table class='adminform'>
1035
+ <tr>
1036
+ <th colspan='2'>
1037
+ <?php echo LM_CRON_FTP_DETAILS?>
1038
+ </th>
1039
+ </tr>
1040
+ </tr>
1041
+ <tr>
1042
+ <td width='200'>
1043
+ <?php echo LM_CRON_FTP_SERVER?>
1044
+ </td>
1045
+ <td>
1046
+ <input type=text size=50 name='cron_ftp_server' value='<?php echo $_CONFIG[cron_ftp_server]?>'>
1047
+ </td>
1048
+ </tr>
1049
+ <tr>
1050
+ <td>
1051
+ <?php echo LM_CRON_FTP_USER?>
1052
+ </td>
1053
+ <td>
1054
+ <input type=text size=50 name='cron_ftp_user' value='<?php echo $_CONFIG[cron_ftp_user]?>'>
1055
+ </td>
1056
+ </tr>
1057
+ <tr>
1058
+ <td>
1059
+ <?php echo LM_CRON_FTP_PASS?>
1060
+ </td>
1061
+ <td>
1062
+ <input type=text size=50 name='cron_ftp_pass' value='<?php echo $_CONFIG[cron_ftp_pass]?>'>
1063
+ </td>
1064
+ </tr>
1065
+ <tr>
1066
+ <td>
1067
+ <?php echo LM_CRON_FTP_PATH?>
1068
+ </td>
1069
+ <td>
1070
+ <input type=text size=50 name='cron_ftp_path' value='<?php echo $_CONFIG[cron_ftp_path]?>'>
1071
+ </td>
1072
+ </tr>
1073
+ <tr>
1074
+ <td>
1075
+ <?php echo LM_CRON_FTP_DELB?>
1076
+ </td>
1077
+ <td>
1078
+ <input type=checkbox name='cron_ftp_delb' <?php if($_CONFIG[cron_ftp_delb]==1) echo "checked";?> value='1'>
1079
+ </td>
1080
+ </tr>
1081
+ </table>
1082
+ <table class='adminform'>
1083
+ <tr>
1084
+ <th colspan='2'>
1085
+ <?php echo LM_CRON_EMAIL_DETAILS?>
1086
+ </th>
1087
+ </tr>
1088
+ </tr>
1089
+ <tr>
1090
+ <td width='200'>
1091
+ <?php echo LM_CRON_EMAIL_ACCOUNT?>
1092
+ </td>
1093
+ <td>
1094
+ <input type=text size=50 name='cron_email_address' value='<?php echo $_CONFIG[cron_email_address]?>'>
1095
+ </td>
1096
+ </tr>
1097
+
1098
+
1099
+ </table>
1100
+
1101
+ <table class='adminform'>
1102
+ <tr>
1103
+ <th colspan='2'>
1104
+ <?php echo LM_CRON_MYSQL_DETAILS?>
1105
+ </th>
1106
+ </tr>
1107
+ </tr>
1108
+ <tr bgcolor='#ffffff'>
1109
+ <td width='200'>
1110
+ <?php echo LM_CRON_MYSQL_DROP?>
1111
+ </td>
1112
+ <td>
1113
+ <input type=checkbox name='cron_sql_drop' value='1' <?php if($_CONFIG[cron_sql_drop]) echo "checked";?> >
1114
+ </td>
1115
+ </tr>
1116
+
1117
+ <?php
1118
+ if((abs($_CONFIG[system_mdatabases])==0) && ($_CONFIG[enable_db_backup]==1)){
1119
+ ?>
1120
+ <tr><td valign='top'>
1121
+ <?php echo LM_DATABASE_INCLUDE_DATABASES?>
1122
+ </td><td>
1123
+ <select name='databases_incl[]' MULTIPLE SIZE=5>
1124
+ <?php
1125
+
1126
+ $curent_dbs = explode(",", $_CONFIG['databases_incl_list']);
1127
+
1128
+ $query = @mysql_query("SHOW databases");
1129
+ while($row = @mysql_fetch_array($query)){
1130
+
1131
+ $table = $row[0];
1132
+
1133
+ if($table != $_CONFIG['mysql_database'])
1134
+
1135
+ if(in_array($table, $curent_dbs)){
1136
+
1137
+ echo "<option value='".$table."' selected>$table</option>";
1138
+
1139
+ }else{
1140
+
1141
+ echo "<option value='".$table."'>$table</option>";
1142
+
1143
+ }
1144
+ }
1145
+ ?>
1146
+ </select><br />
1147
+ <?php echo LM_DATABASE_INCLUDE_DATABASES_SUB?>
1148
+ </td></tr>
1149
+ <?php
1150
+ }
1151
+ ?>
1152
+
1153
+ <tr><th colspan=2>
1154
+ <?php echo LM_CRON_DELETE_FILES?>
1155
+ </th></tr>
1156
+ <tr>
1157
+ <td width='200'>
1158
+ <?php echo LM_CRON_DELETE_FILES_SUB_ACTIVE?>
1159
+ </td>
1160
+ <td>
1161
+ <input type=checkbox name='cron_file_delete_act' <?php if ($_CONFIG['cron_file_delete_act'] == 1) echo 'checked';?> value='1'>
1162
+ </td>
1163
+ </tr>
1164
+ <tr>
1165
+ <td width='200'>
1166
+ <?php echo LM_CRON_DELETE_FILES_SUB?>
1167
+ </td>
1168
+ <td>
1169
+ <input size=5 name='cron_file_delete' value='<?php echo $_CONFIG[cron_file_delete]?>'> days:
1170
+ </td>
1171
+ </tr>
1172
+ </table>
1173
+
1174
+ <table class='adminform'>
1175
+ <tr>
1176
+ <th colspan='2'>
1177
+ <?php echo LM_CRON_EXCLUDE?>
1178
+ </th>
1179
+ </tr>
1180
+ </tr>
1181
+ <tr>
1182
+ <td width='200'>
1183
+ <?php echo LM_CRON_EXCLUDE_DIR?>
1184
+ </td>
1185
+ <td>
1186
+ <textarea cols=50 rows=5 name='cron_exclude'><?php echo $_CONFIG[cron_exclude]?></textarea>
1187
+ </td>
1188
+ </tr>
1189
+
1190
+ </table>
1191
+ <?php
1192
+ $tabs->endTab();
1193
+ $tabs->startTab(LM_TAB_INFO,"config-info-tab");
1194
+ ?>
1195
+ <table class='adminform'>
1196
+ <tr>
1197
+ <th colspan='2'>
1198
+ <?php echo LM_CONFIG_INFO_PHP?>
1199
+ </th>
1200
+ </tr>
1201
+
1202
+ <tr>
1203
+ <td width='200'>
1204
+ <?php echo LM_CONFIG_INFO_T_SAFEMODE?>
1205
+ </td>
1206
+ <td>
1207
+ <b><?php $val = (ini_get('safe_mode') != "")? ini_get('safe_mode'):"Off";
1208
+ echo HTML_cloner::get_color($val, 'On');
1209
+ ?></b>
1210
+ <br />
1211
+ <?php echo LM_CONFIG_INFO_SAFEMODE?>
1212
+ </td>
1213
+ </tr>
1214
+
1215
+ <tr>
1216
+ <td width='200'>
1217
+ <?php echo LM_CONFIG_INFO_T_MTIME?>
1218
+ </td>
1219
+ <td>
1220
+ <b><?php echo (ini_get('max_execution_time') != "")? ini_get('max_execution_time'):"no value";
1221
+
1222
+ ?></b>
1223
+ <br />
1224
+ <?php echo LM_CONFIG_INFO_TIME?>
1225
+ </td>
1226
+ </tr>
1227
+
1228
+ <tr>
1229
+ <td width='200'>
1230
+ <?php echo LM_CONFIG_INFO_T_MEML?>
1231
+ </td>
1232
+ <td>
1233
+ <b><?php echo (ini_get('memory_limit') != "")? ini_get('memory_limit'):"no value";?> </b>
1234
+ <br />
1235
+ <?php echo LM_CONFIG_INFO_MEMORY?>
1236
+ </td>
1237
+ </tr>
1238
+
1239
+ <tr>
1240
+ <td width='200'>
1241
+ <?php echo LM_CONFIG_INFO_T_BDIR?>
1242
+ </td>
1243
+ <td>
1244
+ <b><?php $val = (ini_get('open_basedir') != "")? ini_get('open_basedir'):"no value";
1245
+ echo HTML_cloner::get_color($val, '/');
1246
+ ?> </b>
1247
+ <br />
1248
+ <?php echo LM_CONFIG_INFO_BASEDIR?>
1249
+ </td>
1250
+ </tr>
1251
+
1252
+ <tr>
1253
+ <td width='200'>
1254
+ <?php echo LM_CONFIG_INFO_T_EXEC?>
1255
+ </td>
1256
+ <td>
1257
+ <b><?php
1258
+ $out = "";
1259
+ if(function_exists("exec")){
1260
+ $out = @exec("ls -al");
1261
+ }
1262
+ $val = ($out != "")? "ENABLED":"<font color='red'>DISABLED</font>";
1263
+ echo HTML_cloner::get_color($val, 'DISABLED');
1264
+ ?> </b>
1265
+ <br />
1266
+ <?php echo LM_CONFIG_INFO_EXEC?>
1267
+ </td>
1268
+ </tr>
1269
+
1270
+ <tr>
1271
+ <th colspan='2'>
1272
+ <?php echo LM_CONFIG_INFO_PATHS?>
1273
+ </td>
1274
+ <td>
1275
+ </tr>
1276
+
1277
+ <tr>
1278
+ <td width='200'>
1279
+ <?php echo LM_CONFIG_INFO_ROOT_BPATH_TMP?>
1280
+ </td>
1281
+ <td>
1282
+ <b><?php $tmp_dir = $_CONFIG['backup_path']."/administrator/backups";
1283
+ echo (@is_writeable( $tmp_dir ))? $tmp_dir . " is <font color=green>writeable</font>":$tmp_dir. " <font color=red>incorrect or unreadable</font>";?></b>
1284
+ <br />
1285
+ <?php echo LM_CONFIG_INFO_ROOT_PATH_TMP_SUB?>
1286
+ </td>
1287
+ </tr>
1288
+
1289
+ <tr>
1290
+ <td width='200'>
1291
+ <?php echo LM_CONFIG_INFO_ROOT_BPATH?>
1292
+ </td>
1293
+ <td>
1294
+ <b><?php echo (@is_readable($_CONFIG['backup_path']) )? $_CONFIG['backup_path'] . " is <font color=green>readable</font>":$_CONFIG['backup_path']. " <font color=red>incorrect or unreadable</font>";?></b>
1295
+ <br />
1296
+ <?php echo LM_CONFIG_INFO_ROOT_PATH_SUB?>
1297
+ </td>
1298
+ </tr>
1299
+
1300
+
1301
+ <tr>
1302
+ <td width='200'>
1303
+ <?php echo LM_CONFIG_INFO_T_BPATH?>
1304
+ </td>
1305
+ <td>
1306
+ <b><?php echo (@is_writeable($_CONFIG['clonerPath']) )? $_CONFIG['clonerPath'] . " is <font color=green>writeable</font>":$_CONFIG['clonerPath']. " <font color=red>unwriteable</font>";?></b>
1307
+ <br />
1308
+ <?php echo LM_CONFIG_INFO_BPATH?>
1309
+ </td>
1310
+ </tr>
1311
+
1312
+
1313
+ <tr>
1314
+ <td width='200'>
1315
+ <?php echo LM_CONFIG_INFO_T_TAR?>
1316
+ </td>
1317
+ <td>
1318
+ <b><?php
1319
+ if(function_exists("exec")){
1320
+ $info_tar_path = explode(" ", @exec("whereis tar"));
1321
+ }
1322
+ echo ($info_tar_path['1'] != "")? $info_tar_path['1']:"unable to determine";
1323
+ ?> </b>
1324
+ <br />
1325
+ <?php echo LM_CONFIG_INFO_TAR?>
1326
+ </td>
1327
+ </tr>
1328
+
1329
+
1330
+ <tr>
1331
+ <td width='200'>
1332
+ <?php echo LM_CONFIG_INFO_T_MSQL?>
1333
+ </td>
1334
+ <td>
1335
+ <b><?php
1336
+ if(function_exists("exec")){
1337
+ $info_msql_path = explode(" ", @exec("whereis mysqldump"));
1338
+ }
1339
+ echo ($info_msql_path['1'] != "")? $info_msql_path['1']:"unable to determine";
1340
+ ?> </b>
1341
+ <br />
1342
+ <?php echo LM_CONFIG_INFO_MSQL?>
1343
+ </td>
1344
+ </tr>
1345
+
1346
+
1347
+ </table>
1348
+ <?php
1349
+ $tabs->endTab();
1350
+ $tabs->endPane();
1351
+ ?>
1352
+ <input type="hidden" name="option" value="com_cloner" />
1353
+ <input type="hidden" name="task" value="config" />
1354
+ <input type="hidden" name='action' value='save'>
1355
+ </form>
1356
+
1357
+ <?php
1358
+ }
1359
+
1360
+ function get_color($val, $comp){
1361
+
1362
+ if(!stristr($val, $comp))
1363
+ echo "<span style='color:green'>$val</span>";
1364
+ else
1365
+ echo "<span style='color:red'>$val</span>";
1366
+
1367
+ }
1368
+
1369
+ function TransferForm($option, $files){
1370
+ global $baDownloadPath, $mosConfig_absolute_path, $clonerPath, $task;
1371
+
1372
+ ?>
1373
+ <form action="index2.php" method="GET" name="adminForm">
1374
+ <script language="javascript" type="text/javascript">
1375
+
1376
+
1377
+ function submitbutton(pressbutton) {
1378
+ var form = document.adminForm;
1379
+ if (pressbutton == 'cancel') {
1380
+ submitform( pressbutton );
1381
+ return;
1382
+ }
1383
+
1384
+ submitform( pressbutton );
1385
+
1386
+ }
1387
+
1388
+ function gotocontact( id ) {
1389
+ var form = document.adminForm;
1390
+ form.contact_id.value = id;
1391
+ submitform( 'contact' );
1392
+ }
1393
+ </script>
1394
+ <table class='adminform'>
1395
+ <tr><td colspan='2'>
1396
+ <b>Transfer <?php echo $file;?> details:</b>
1397
+ <br /><b>Attempting to
1398
+ <?php echo (($_REQUEST[task]=='move')||($_REQUEST[task2]=='move'))?'Move':'Clone';?> backup(s):</b><br /><?php echo implode("<br />",$files)?>
1399
+
1400
+ </td></tr>
1401
+ <tr><td colspan='2'><?php echo LM_CLONE_FORM_TOP?></td></tr>
1402
+ <?php
1403
+ if(($_REQUEST[task]=='move')||($_REQUEST[task2]=='move')){
1404
+ }
1405
+ else{
1406
+
1407
+ ?>
1408
+ <tr>
1409
+ <td width='110'><b><?php echo LM_TRANSFER_URL?></b> </td>
1410
+ <td><input type='text' size='30' name='ftp_url' value='<?php echo $_REQUEST[ftp_url]?>'></td>
1411
+ </tr>
1412
+ <tr>
1413
+ <td colspan='2'><?php echo LM_TRANSFER_URL_SUB?></td>
1414
+ </tr>
1415
+ <?php } ?>
1416
+ <tr>
1417
+ <td width='110'><b><?php echo LM_TRANSFER_FTP_HOST?></b> </td>
1418
+ <td><input type='text' size='30' name='ftp_server' value='<?php echo $_REQUEST[ftp_server]?>'></td>
1419
+ </tr>
1420
+ <tr>
1421
+ <td colspan='2'><small><?php echo LM_TRANSFER_FTP_HOST_SUB?></small></td></tr>
1422
+ <tr>
1423
+ <td width='110'><b><?php echo LM_TRANSFER_FTP_USER?></b> </td>
1424
+ <td><input type='text' size='30' name='ftp_user' value='<?php echo $_REQUEST[ftp_user]?>'></td>
1425
+ </tr>
1426
+ <tr>
1427
+ <td colspan='2'><small><?php echo LM_TRANSFER_FTP_USER_SUB?></small></td></tr>
1428
+ <tr>
1429
+ <td width='110'><b><?php echo LM_TRANSFER_FTP_PASS?></b> </td>
1430
+ <td><input type='text' size='30' name='ftp_pass' value='<?php echo $_REQUEST[ftp_pass]?>'></td>
1431
+ </tr>
1432
+ <tr>
1433
+ <td colspan='2'><small><?php echo LM_TRANSFER_FTP_PASS_SUB?></small></td></tr>
1434
+ <tr>
1435
+ <td width='110'><b><?php echo LM_TRANSFER_FTP_DIR?></b> </td>
1436
+ <td><input type='text' size='30' name='ftp_dir' value='<?php echo $_REQUEST[ftp_dir]?>'></td>
1437
+ </tr>
1438
+ <tr>
1439
+ <td colspan='2'><small><?php echo LM_TRANSFER_FTP_DIR_SUB?></small></td></tr>
1440
+
1441
+ <tr>
1442
+ <td width='140'><b><?php echo LM_TRANSFER_FTP_INCT?></b> </td>
1443
+ <td><input type='checkbox' name='ftp_inct' value='1' <?php if($_REQUEST[ftp_inct] ==1 ) echo "checked";?>></td>
1444
+ </tr>
1445
+ <tr>
1446
+ <td colspan='2'><small><?php echo LM_TRANSFER_FTP_INCT_SUB?></small></td></tr>
1447
+
1448
+ </table>
1449
+ <input type="hidden" name="option" value="com_cloner" />
1450
+ <input type="hidden" name="task" value="" />
1451
+ <input type="hidden" name="task2" value="<?php if($_REQUEST[task2]!="") echo $_REQUEST[task2]; else echo $task;?>" />
1452
+ <?php
1453
+ foreach($files as $key=>$value)
1454
+ {
1455
+ ?>
1456
+ <input type="hidden" name="files[<?php echo $key;?>]" value="<?php echo $value?>" />
1457
+ <input type="hidden" name="cid[<?php echo $key;?>]" value="<?php echo $value?>" />
1458
+ <?php
1459
+ }
1460
+ ?>
1461
+ <input type="hidden" name="action" value="connect" />
1462
+ <input type="hidden" name="hidemainmenu" value="0" />
1463
+ </form>
1464
+ <?php
1465
+ }
1466
+ function confirmBackups( &$folders, &$sizes, $path, $option ) {
1467
+ // ----------------------------------------------------------
1468
+ // Presentation of the confirmation screen
1469
+ // ----------------------------------------------------------
1470
+ global $baDownloadPath, $mosConfig_absolute_path, $clonerPath, $_CONFIG, $database, $mosConfig_db;
1471
+
1472
+ ?>
1473
+ <form action="index2.php" method="post" name="adminForm">
1474
+ <?php
1475
+ $tabs = new mosTabs(1);
1476
+ #$tabs->startPane("BGeneratePane");
1477
+ if($_CONFIG['enable_db_backup']){
1478
+ $tabs->startTab(LM_TAB_G_DATABASE,"users-databse-options-tab");
1479
+ ?>
1480
+
1481
+
1482
+ <table class="adminform">
1483
+ <tr>
1484
+ <th colspan=2>
1485
+ <b><?php echo LM_DATABASE_ARCHIVE; ?></b>
1486
+ </th>
1487
+ </tr>
1488
+ <tr>
1489
+ <td><input type="checkbox" id="dbbackup" name="dbbackup" checked value="1" />&nbsp;<?php echo LM_CONFIRM_DATABASE; ?></td>
1490
+ </tr>
1491
+ <tr>
1492
+ <td><input type="checkbox" id="dbbackup_drop" name="dbbackup_drop" value="1" />&nbsp;<?php echo "Add DROP SYNTAX"; ?></td>
1493
+ </tr>
1494
+ <tr>
1495
+ <td><?php echo "Mysql Compatibility"; ?> &nbsp;
1496
+ <select name='dbbackup_comp'>
1497
+ <option value=''>Default</option>
1498
+ <option value='MYSQL40'>MYSQL40</option>
1499
+ <option balue='MYSQL323'>MYSQL323</option>
1500
+ </select>
1501
+ </td>
1502
+ </tr>
1503
+ <tr><th colspan=2>
1504
+ <?php echo LM_DATABASE_EXCLUDE_TABLES?>
1505
+ </th></tr>
1506
+ <tr><td>
1507
+ <?php echo LM_DATABASE_CURRENT?> <b><?php echo $mosConfig_db;?></b><br />
1508
+ <select name='excltables[]' MULTIPLE SIZE=15>
1509
+ <?php
1510
+
1511
+ $query = mysql_query("SHOW tables");
1512
+ while($row = mysql_fetch_array($query)){
1513
+
1514
+ echo "<option value='".$row[0]."'>$row[0]</option>";
1515
+
1516
+ }
1517
+ ?>
1518
+ </select>
1519
+ </td></tr>
1520
+
1521
+ <?php
1522
+ if(abs($_CONFIG[system_mdatabases])==0){
1523
+ ?>
1524
+
1525
+ <tr><th colspan=2>
1526
+ <?php echo LM_DATABASE_INCLUDE_DATABASES?>
1527
+ </th></tr>
1528
+ <tr><td>
1529
+ <select name='databases_incl[]' MULTIPLE SIZE=5>
1530
+ <?php
1531
+
1532
+ $query = mysql_query("SHOW databases");
1533
+
1534
+ while($row = mysql_fetch_array($query)){
1535
+
1536
+ echo "<option value='".$row[0]."'>$row[0]</option>";
1537
+
1538
+ }
1539
+
1540
+ ?>
1541
+ </select><br />
1542
+ <?php echo LM_DATABASE_INCLUDE_DATABASES_SUB?>
1543
+ </td></tr>
1544
+
1545
+ <?php
1546
+ }
1547
+ ?>
1548
+
1549
+ </table>
1550
+ <?php
1551
+ $tabs->endTab();
1552
+ }
1553
+ $tabs->startTab(LM_TAB_G_FILES,"users-files-options-tab");
1554
+ ?>
1555
+ <table class="adminform">
1556
+ <tr>
1557
+ <th>
1558
+ <b><?php echo LM_BACKUP_NAME; ?></b>
1559
+ </th>
1560
+ </tr>
1561
+ <tr>
1562
+ <td>
1563
+ <input type=text name='bname' value='' size=40><br/>
1564
+ <?php echo LM_BACKUP_NAME_SUB?>
1565
+ </td>
1566
+ </tr>
1567
+
1568
+ <tr>
1569
+ <td width="50%"><?php echo LM_CONFIRM_INSTRUCTIONS ?></td>
1570
+ </tr>
1571
+ </table>
1572
+ <table class="adminlist" >
1573
+ <tr>
1574
+ <th width="200" valign='top' colspan='2' align='left'>
1575
+
1576
+ <?php echo LM_COL_FOLDER ?>
1577
+ <?php
1578
+ {
1579
+ ?>
1580
+ <tr><td>
1581
+ <link href="browser/filebrowser.css" rel="stylesheet" type="text/css">
1582
+
1583
+ <script type="text/javascript" src="browser/xmlhttp.js"></script>
1584
+
1585
+
1586
+ <div id="browser">
1587
+ <?php require_once("browser/files_inpage.php"); ?>
1588
+ </div>
1589
+ <script>do_browser()</script>
1590
+
1591
+ </td></tr>
1592
+ <?php
1593
+ }
1594
+ ?>
1595
+
1596
+ </table>
1597
+ <?php
1598
+ $tabs->endTab();
1599
+ $tabs->endPane();
1600
+ ?>
1601
+ <input type="hidden" name="option" value="com_cloner" />
1602
+ <input type="hidden" name="task" value="" />
1603
+ <input type="hidden" name="boxchecked" value="0" />
1604
+ <input type="hidden" name="hidemainmenu" value="0" />
1605
+ </form>
1606
+ <br/>&nbsp;
1607
+ <?php
1608
+ }
1609
+
1610
+
1611
+ function generateBackup( $archiveName, $archiveSize, $originalSize, $d, $f, $databaseResult, $option ) {
1612
+ // ----------------------------------------------------------
1613
+ // Presentation of the final report screen
1614
+ // ----------------------------------------------------------
1615
+
1616
+
1617
+ ?>
1618
+ <table cellpadding="4" cellspacing="0" border="0" width="100%">
1619
+
1620
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
1621
+ </tr>
1622
+ <tr>
1623
+ <td width="20%"><strong>&nbsp;</strong></td><td>&nbsp;</td>
1624
+ </tr>
1625
+ <tr>
1626
+ <td><strong>&nbsp;<?php echo LM_ARCHIVE_NAME; ?></strong></td><td><?php echo $archiveName; ?></td>
1627
+ </tr>
1628
+ <tr>
1629
+ <td><strong>&nbsp;<?php echo LM_NUMBER_FILES; ?></strong></td><td><?php echo $f; ?></td>
1630
+ </tr>
1631
+ <tr>
1632
+ <td><strong>&nbsp;<?php echo LM_SIZE_ORIGINAL; ?></strong></td><td><?php echo $originalSize; ?></td>
1633
+ </tr>
1634
+ <tr>
1635
+ <td><strong>&nbsp;<?php echo LM_SIZE_ARCHIVE; ?></strong></td><td><?php echo $archiveSize; ?></td>
1636
+ </tr>
1637
+ <tr>
1638
+ <td><strong>&nbsp;<?php echo LM_DATABASE_ARCHIVE; ?></strong></td><td><?php echo $databaseResult; ?></td>
1639
+ </tr>
1640
+
1641
+
1642
+ <tr>
1643
+ <td><strong>&nbsp;</strong></td><td>&nbsp;</td>
1644
+ </tr>
1645
+ </table>
1646
+ <form action="index2.php" name="adminForm" method="post">
1647
+ <input type=hidden name=files[1] value='<?php echo $archiveName?>'>
1648
+ <input type=hidden name=cid[1] value='<?php echo $archiveName?>'>
1649
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
1650
+ <input type="hidden" name="task" value=""/>
1651
+ </form>
1652
+ <?php
1653
+ }
1654
+
1655
+ function generateBackup_text( $archiveName, $archiveSize, $originalSize, $d, $f, $databaseResult, $option ) {
1656
+ // ----------------------------------------------------------
1657
+ // Presentation of the final report screen in text mode
1658
+ // ----------------------------------------------------------
1659
+
1660
+ ob_start();
1661
+ ?>
1662
+ <?php echo LM_ARCHIVE_NAME; ?>: <?php echo $archiveName."\r\n"; ?><br />
1663
+ <?php echo LM_NUMBER_FILES; ?>: <?php echo $f."\r\n"; ?><br />
1664
+ <?php echo LM_SIZE_ORIGINAL; ?>: <?php echo $originalSize."\r\n"; ?><br />
1665
+ <?php echo LM_SIZE_ARCHIVE; ?>: <?php echo $archiveSize."\r\n"; ?><br />
1666
+ <?php echo LM_DATABASE_ARCHIVE; ?>: <?php echo $databaseResult."\r\n"; ?><br />
1667
+ ### END REPORT
1668
+ <?php
1669
+ $content = ob_get_contents();
1670
+ ob_end_clean();
1671
+
1672
+ return $content;
1673
+ }
1674
+
1675
+ function showHelp( $option ) {
1676
+ ?>
1677
+
1678
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
1679
+ <tr><th>
1680
+ <?php echo LM_CREDIT_TOP?>
1681
+ </th></tr>
1682
+ <tr>
1683
+ <td>
1684
+ <?php echo LM_CLONER_ABOUT?>
1685
+ </td>
1686
+ </tr>
1687
+ </table>
1688
+ <form action="index2.php" name="adminForm" method="post">
1689
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
1690
+ <input type="hidden" name="task" value=""/>
1691
+ </form>
1692
+ <?php
1693
+ }
1694
+
1695
+ function Restore( $option ) {
1696
+ // ----------------------------------------------------------
1697
+ // Presentation of the Help Screem
1698
+ // ----------------------------------------------------------
1699
+
1700
+ ?>
1701
+
1702
+
1703
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
1704
+ <tr><th>
1705
+ <?php echo LM_RESTORE_TOP?>
1706
+ </th></tr>
1707
+ <tr>
1708
+ <td>
1709
+ <?php echo LM_CLONER_RESTORE?>
1710
+ </td>
1711
+ </tr>
1712
+ </table>
1713
+ <form action="index2.php" name="adminForm" method="post">
1714
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
1715
+ <input type="hidden" name="task" value=""/>
1716
+ </form>
1717
+ <?php
1718
+ }
1719
+ function showCredits( $option ) {
1720
+ // ----------------------------------------------------------
1721
+ // Presentation of the Help Screem
1722
+ // ----------------------------------------------------------
1723
+
1724
+ ?>
1725
+
1726
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
1727
+ <tr><th>
1728
+ <?php echo LM_CREDIT_TOP?>
1729
+ </th></tr>
1730
+ <tr>
1731
+ <td>
1732
+
1733
+ <?echo LM_CLONER_CREDITS?>
1734
+ </td>
1735
+ </tr>
1736
+ </table>
1737
+ <form action="index2.php" name="adminForm" method="post">
1738
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
1739
+ <input type="hidden" name="task" value=""/>
1740
+ </form>
1741
+ <?php
1742
+ }
1743
+
1744
+
1745
+ function Rename($files, $option){
1746
+ global $_CONFIG;
1747
+
1748
+ ?>
1749
+ <form action="index2.php" method="post" name="adminForm">
1750
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
1751
+ <tr><th colspan='2'>
1752
+ <?php echo LM_RENAME_TOP?>
1753
+ </th></tr>
1754
+ <?php
1755
+
1756
+ foreach($files as $key=>$file){
1757
+ echo "<tr>
1758
+ <td >
1759
+ ".LM_RENAME." <input type=hidden name='cfile[]' value='$file' ><b>$file</b>
1760
+ </td>
1761
+ <td align='left'>
1762
+ ".LM_RENAME_TO." <input type=text name='dfile[]' value='$file' size=100>
1763
+ </td>
1764
+ </tr>";
1765
+ }
1766
+
1767
+ ?>
1768
+ </table>
1769
+ <form action="index2.php" name="adminForm" method="post">
1770
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
1771
+ <input type="hidden" name="task" value="rename_save"/>
1772
+ </form>
1773
+
1774
+ <?php
1775
+ }
1776
+
1777
+ }
1778
+ ?>
admin.cloner.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ @session_start();
14
+
15
+ @set_time_limit("3600");
16
+ @error_reporting(E_ALL^E_NOTICE);
17
+
18
+ define("_VALID_MOS",1);
19
+
20
+ #load configuration
21
+ $config_file = "cloner.config.php";
22
+ require_once($config_file);
23
+ require_once ("restore/TAR.php");
24
+ require_once( "cloner.functions.php" );
25
+ require_once( "admin.cloner.html.php" );
26
+ require_once( "common.php" );
27
+
28
+
29
+ #Doing some basic authentification
30
+ if((!isset($_SESSION['clone']))&&($task != 'dologin')){
31
+
32
+ $task = 'login';
33
+
34
+ HTML_cloner::header();
35
+
36
+ HTML_cloner::Login();
37
+
38
+ HTML_cloner::footer();
39
+
40
+ exit;
41
+
42
+ }elseif($task == 'dologin'){
43
+
44
+ if(($_REQUEST['username'] == $_CONFIG['jcuser']) && (md5($_REQUEST['password']) == $_CONFIG['jcpass'])){
45
+
46
+ if(function_exists('session_register')) {
47
+ @session_register('clone');
48
+ }
49
+ $_SESSION['clone'] = 1;
50
+
51
+ mosRedirect( 'index2.php?option='.$option, "Welcome to XCloner backend" );
52
+
53
+ }else{
54
+
55
+ mosRedirect( 'index2.php?option='.$option, "Incorrect username and/or password" );
56
+
57
+ }
58
+
59
+ }
60
+
61
+
62
+
63
+ ############GLOBALS in effect
64
+ $GLOBALS['lang_dir'] = $lang_dir;
65
+ ############
66
+ $lang_array = get_avalaible_langs();
67
+
68
+
69
+ # retrieve row selection from forms
70
+ $cid = $_REQUEST['cid'];
71
+ if (!is_array( $cid )) {
72
+ $cid = array(0);
73
+ }
74
+
75
+
76
+ if($task != 'download')
77
+ HTML_cloner::header();
78
+
79
+
80
+ ########### SETTING THE GLOBALS VARIABLES #########################
81
+
82
+ $GLOBALS['joomla_compatible'] = $joomla_compatible;
83
+
84
+ $GLOBALS['_CONFIG'] = $_CONFIG;
85
+
86
+ $GLOBALS['clonerPath'] = $clonerPath;
87
+
88
+ $GLOBALS['baDownloadPath'] = $baDownloadPath;
89
+
90
+ $GLOBALS['config_file']=$config_file;
91
+
92
+ $GLOBALS['lang_array'] = $lang_array;
93
+
94
+ # process the workflow selection
95
+ switch ($task) {
96
+ case 'rename_save':
97
+
98
+ case 'rename':
99
+ clone_rename($option);
100
+ break;
101
+ case 'action':
102
+ action($option);
103
+ break;
104
+
105
+
106
+ case 'cancel_lang':
107
+ mosRedirect( 'index2.php?option='.$option."&task=lang" );
108
+ break;
109
+ case 'add_lang':
110
+ case 'add_lang_new':
111
+ translator_add($option, $task);
112
+ break;
113
+ case 'save_lang_apply':
114
+ case 'save_lang':
115
+ case 'edit_lang':
116
+ translator_edit($option, $task);
117
+ break;
118
+
119
+
120
+ case 'del_lang':
121
+ case 'lang':
122
+ translator($option);
123
+ break;
124
+
125
+ case 'refresh':
126
+ generateBackuprefresh( $cid, $option, $_REQUEST['backup'] );
127
+ break;
128
+
129
+ case 'generate':
130
+ generateBackup( $cid, $option );
131
+ break;
132
+
133
+ case 'confirm':
134
+ confirmBackup( $option );
135
+ break;
136
+ case 'download':
137
+ downloadBackup($_REQUEST[file]);
138
+ break;
139
+ case 'cron':
140
+ HTML_cloner::Cron();
141
+ break;
142
+ case 'about':
143
+ case 'credits':
144
+ showHelp( $option );
145
+ break;
146
+ case 'restore':
147
+ HTML_cloner::Restore( $option );
148
+ break;
149
+
150
+ case 'cron_delete':
151
+ if(unlink($_CONFIG['multiple_config_dir']."/".$_REQUEST['fconfig']))
152
+ $msg = " was deleted";
153
+ else
154
+ $msg = " was not deleted, please delete it manually!";
155
+
156
+ mosRedirect( 'index2.php?option='.$option."&task=config", $_REQUEST['fconfig'].$msg );
157
+ break;
158
+
159
+ case 'remove':
160
+ deleteBackups( $cid, $option );
161
+ break;
162
+ case 'continue':
163
+ case 'move':
164
+ case 'clone':
165
+ moveBackup( $option );
166
+ break;
167
+
168
+ case 'cancel':
169
+ mosRedirect( 'index2.php?option='.$option );
170
+ break;
171
+ case 'config':
172
+ config( $option );
173
+ break;
174
+ case 'rename_cancel':
175
+ mosRedirect( 'index2.php?option='.$option."&task=view" );
176
+ break;
177
+ case 'show':
178
+ case 'view':
179
+ showBackups( $option );
180
+ break;
181
+ case 'logout':
182
+ doLogout();
183
+ break;
184
+ default:
185
+ fdefault();
186
+ break;
187
+ }
188
+
189
+ HTML_cloner::footer();
190
+
191
+ ?>
admin.xcloner.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // no direct access
4
+ if(!defined( '_VALID_MOS' ) && !defined('_JEXEC'))
5
+
6
+ die( 'Restricted access' );
7
+
8
+ print "<iframe src='components/com_xcloner/index.php' width='100%' height='900' frameborder=0 marginWidth=0 frameSpacing=0 marginHeight=110 ></iframe>";
9
+
10
+ ?>
administrator/backups/.excl ADDED
File without changes
administrator/backups/index.html ADDED
File without changes
administrator/index.html ADDED
File without changes
browser/file.gif ADDED
Binary file
browser/filebrowser.css ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{
2
+ font-family:Arial, Helvetica, sans-serif;
3
+ font-size: 76%;
4
+ }
5
+ #browser{
6
+ width: 90%;
7
+ border: 1px solid #ddd;
8
+ padding: 0.2em 1em;
9
+ margin:1em;
10
+ }
11
+ .searching{
12
+ background: #efefef url(components/com_cloner/browser/timer.gif) no-repeat 46% 46%;
13
+ }
14
+ #header {
15
+ color: #FFFFFF;
16
+ background-color: #3571CA;
17
+ padding: 0.2em;
18
+ }
19
+ #content {
20
+ padding: 0.2em;
21
+ border: 1px solid #999999;
22
+ }
23
+ li.file {
24
+ white-space: nowrap;
25
+ }
26
+ li.folder {
27
+ white-space: nowrap;
28
+ }
29
+ li.folder a{
30
+ font-size: 16px;
31
+ color: #000000;
32
+ background: #efefef;
33
+
34
+ }
browser/files_inpage.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ @ini_set("error_reporting", "2");
3
+
4
+ $thisApp=$_SERVER['PHP_SELF'] . "?browse=true";
5
+
6
+ if(isset($_GET['browse'])){
7
+ $dir = isset($_GET['dir']) ? $_GET['dir'] : '/files';
8
+ if(strpos($dir, "../")===true){
9
+ exit;
10
+ }
11
+
12
+ }else{
13
+
14
+ echo "Please wait... we are loading the folder structure";
15
+
16
+ }
17
+
18
+ ?>
browser/files_xml.php ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
8
+ * Email: admin@joomlaplug.com
9
+ * Revision: 1.0
10
+ * Date: July 2007
11
+ **/
12
+
13
+ header("Cache-Control: no-cache");
14
+ header("Pragma: nocache");
15
+ header("Content-Type: text/xml");
16
+
17
+
18
+ ### testing the authenticity of access
19
+ if($_COOKIE["auth_clone"] != 1){
20
+ echo "Access denied to this location!";
21
+ exit;
22
+ }
23
+
24
+
25
+ @ini_set("error_reporting", "2");
26
+ include("../cloner.config.php");
27
+ include("../common.php");
28
+
29
+
30
+ if((strlen($_REQUEST['dir']) < strlen($_CONFIG['backup_path']))&&($_REQUEST[dir] != ''))
31
+
32
+ $dir = $_CONFIG['backup_path'];
33
+
34
+ else
35
+
36
+ $dir = ($_REQUEST['dir'] != '') ? $_REQUEST['dir'] : $_CONFIG['backup_path'];
37
+
38
+ $fulldir = $dir;
39
+ $f_arr = array();
40
+ $d_arr =array();
41
+ $exclude = array();
42
+ $_COOKIES = array();
43
+ $exfile = $_CONFIG['backup_path']."/administrator/backups/.excl";
44
+ $path = $_REQUEST['path'];
45
+ $loc = $_REQUEST['dir'];
46
+
47
+ if(!is_dir($_CONFIG['backup_path'])){
48
+
49
+ echo "<directory location=\"Error: Directory $_CONFIG[backup_path] does not exist!\"></directory>";
50
+ exit;
51
+
52
+ }elseif(!is_readable($_CONFIG['backup_path'])){
53
+
54
+ echo "<directory location=\"Error: Directory $_CONFIG[backup_path] is not readable!\"></directory>";
55
+ exit;
56
+
57
+ }
58
+
59
+
60
+ if($_REQUEST['act'] == "checkall"){
61
+
62
+ check($loc, $exfile, 1);
63
+
64
+ }
65
+ elseif($_REQUEST['act'] == "uncheckall"){
66
+
67
+ check($loc, $exfile, 0);
68
+
69
+ }
70
+
71
+ if($loc == "")
72
+ $loc = "/";
73
+
74
+
75
+ $data = "";
76
+
77
+ if($fp = @fopen($exfile,"r")){
78
+
79
+ while(!feof($fp)){
80
+ $data .= fread($fp, 1024);
81
+ }
82
+ fclose($fp);
83
+ }
84
+ $_COOKIES = explode("\r\n", $data);
85
+
86
+
87
+
88
+ $exc = 0;
89
+
90
+ if($fp = @fopen($exfile,"w")){
91
+
92
+ if(is_array($_COOKIES))
93
+
94
+ foreach($_COOKIES as $key=>$value)
95
+
96
+ if(trim($value!="")){
97
+
98
+ if($value!=$path){
99
+
100
+ fwrite($fp, $value."\r\n");
101
+
102
+ }else{
103
+
104
+ $exc = 1;
105
+ }
106
+ }
107
+
108
+ if((!$exc)&&(trim($path)!=''))
109
+
110
+ fwrite($fp, $path."\r\n");
111
+
112
+ fclose($fp);
113
+ }
114
+
115
+
116
+ $data = "";
117
+
118
+ if($fp = @fopen($exfile,"r")){
119
+
120
+ while(!feof($fp)){
121
+
122
+ $data .= fread($fp, 1024);
123
+
124
+ }
125
+
126
+ fclose($fp);
127
+
128
+ }
129
+ else{
130
+
131
+ echo "<directory location=\"Error: Unable to write to file $exfile\"></directory>";
132
+ exit;
133
+
134
+ }
135
+
136
+ $_COOKIES = explode("\r\n", $data);
137
+
138
+
139
+ if(is_array($_COOKIES))
140
+ foreach($_COOKIES as $key=>$value)
141
+ if($value!='')
142
+ {
143
+
144
+ $exclude[] = $value;
145
+
146
+
147
+ }
148
+
149
+ sort($exclude);
150
+
151
+ if (@is_dir($fulldir)){
152
+
153
+ if ($root=@opendir($fulldir)){
154
+ while ($file=@readdir($root)){
155
+ if(@is_dir($fulldir."/".$file)){
156
+ //is folder
157
+ if($file=="." || $file==".."){continue;}
158
+ else{
159
+ $d_arr[] = $file;
160
+ }
161
+ }else{
162
+ //is file
163
+ $type=substr($file, strrpos($file, '.'));
164
+ $f_arr[] = $file;
165
+ }
166
+ }
167
+ }
168
+
169
+ sort($f_arr);
170
+
171
+ sort($d_arr);
172
+
173
+
174
+ echo "<directory location=\"$dir\">";
175
+
176
+ foreach($d_arr as $file){
177
+ if(in_array($dir."/".$file, $_COOKIES))
178
+ $check = 'checked';
179
+ else
180
+ $check = '';
181
+ echo "<folder check='$check'>$file</folder>";
182
+
183
+ }
184
+
185
+ foreach($f_arr as $file){
186
+ if(in_array($dir."/".$file, $_COOKIES))
187
+ $check = 'checked';
188
+ else
189
+ $check = '';
190
+
191
+ echo "<file check='$check' link=\"#\">$file</file>";
192
+
193
+ }
194
+
195
+ foreach($exclude as $file)
196
+ echo "<message>$file</message>";
197
+
198
+ echo "</directory>";
199
+
200
+
201
+ }
202
+
203
+ function check($loc, $exfile, $act ){
204
+ global $_CONFIG;
205
+
206
+ $fulldir = $loc;
207
+ $flist = array();
208
+ $_COOKIES = array();
209
+ if (@is_dir($fulldir)){
210
+
211
+ if ($root=@opendir($fulldir)){
212
+
213
+ while ($file=readdir($root))
214
+ if(($file!='.')&&($file != '..'))
215
+ {
216
+
217
+ $flist[] = $loc ."/". $file;
218
+
219
+ }
220
+ }
221
+ }
222
+
223
+ if($fp = @fopen($exfile,"r")){
224
+
225
+ while(!feof($fp)){
226
+ $data .= fread($fp, 1024);
227
+ }
228
+ fclose($fp);
229
+ }
230
+
231
+ $_COOKIES = explode("\r\n", $data);
232
+
233
+
234
+
235
+ if($act == 1){
236
+
237
+ $flist = @array_merge($_COOKIES, $flist);
238
+
239
+ }
240
+ else{
241
+
242
+ $flist = @array_diff($_COOKIES, $flist);
243
+
244
+ }
245
+
246
+ $flist = @array_unique($flist);
247
+
248
+ if($fp = @fopen($exfile,"w")){
249
+
250
+ foreach($flist as $file){
251
+
252
+ fwrite($fp, $file."\r\n");
253
+
254
+ }
255
+
256
+ fclose($fp);
257
+ }
258
+
259
+
260
+
261
+
262
+ }
263
+
264
+ ?>
browser/folder.gif ADDED
Binary file
browser/timer.gif ADDED
Binary file
browser/xmlhttp.js ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var request;
2
+ var targetDiv;
3
+ function loadXMLDoc(url) {
4
+ // for Mozilla and othes who support XMLHttpRequest
5
+ if (window.XMLHttpRequest) {
6
+ request = new XMLHttpRequest();
7
+ request.onreadystatechange = processXMLRequest;
8
+ request.open("GET", url, true);
9
+ request.send(null);
10
+ // for Interweb Explorer
11
+ } else if (window.ActiveXObject) {
12
+ request = new ActiveXObject("Microsoft.XMLHTTP");
13
+ if(request){
14
+ request.onreadystatechange = processXMLRequest;
15
+ request.open("GET", url, true);
16
+ request.send();
17
+ }
18
+ } else{
19
+ return false;
20
+ }
21
+ }
22
+
23
+ function processXMLRequest() {
24
+ // only if data is loaded
25
+ if (request.readyState == 4) {
26
+ // only if result of HTTP request was an OK
27
+ if (request.status == 200 || request.readyState ==304) {
28
+ useXML(request.responseXML);
29
+ } else{
30
+ targetDiv=document.getElementById("browser");
31
+ targetDiv.innerHTML="Unable to load XML";
32
+ }
33
+ }
34
+ }
35
+
36
+ function do_browser(){
37
+ targetDiv=document.getElementById("browser");
38
+
39
+ if(loadXMLDoc("browser/files_xml.php")){
40
+ targetDiv.className="searching";
41
+ targetDiv.innerHTML="";
42
+ }
43
+ }
44
+
45
+ function createCookie(name,value,days)
46
+ {
47
+ if (days)
48
+ {
49
+ var date = new Date();
50
+ date.setTime(date.getTime()+(days*24*60*60*1000));
51
+ var expires = "; expires="+date.toGMTString();
52
+ }
53
+ else var expires = "";
54
+ document.cookie = name+"="+value+expires+"; path=/";
55
+ }
56
+
57
+ function readCookie(name)
58
+ {
59
+ var nameEQ = name + "=";
60
+ var ca = document.cookie.split(';');
61
+
62
+ for(var i=0;i < ca.length;i++)
63
+ {
64
+ var c = ca[i];
65
+ while (c.charAt(0)==' ') c = c.substring(1,c.length);
66
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
67
+ }
68
+ return null;
69
+ }
70
+
71
+ function eraseCookie(name)
72
+ {
73
+ createCookie(name,"",-1);
74
+ }
75
+
76
+ function checkp(value, loc){
77
+ if(readCookie('path_'+value)){
78
+ eraseCookie('path_'+value);
79
+ }
80
+ else{
81
+ createCookie('path_'+value,value,'1');
82
+ }
83
+
84
+
85
+
86
+
87
+ }
88
+ function checkc(value){
89
+ if(readCookie(value)){
90
+ check = 'checked';
91
+ }
92
+ else{
93
+ check = '';
94
+ }
95
+ return check;
96
+ }
97
+
98
+
99
+
100
+
101
+
102
+ function useXML(xmlInfo){
103
+ targetDiv.className="";
104
+ message = "";
105
+
106
+ var infoTags=xmlInfo.getElementsByTagName("directory");
107
+ var loc=infoTags[0].getAttribute("location");
108
+ if(loc == "")
109
+ loc1 = 'Path Root';
110
+ else
111
+ loc1 = loc;
112
+
113
+ var newloc1="browser/files_xml.php?dir=" + loc ;
114
+
115
+ var stringHTML="<p><b>" + loc1 +"</b> <br /><br /></p>";
116
+
117
+ if(loc.indexOf("/")!=-1){
118
+ var newfile="browser/files_xml.php?dir=" + loc.slice(0, loc.lastIndexOf("/"));
119
+ stringHTML=stringHTML+"<p><a href=\"#\" onclick=\"loadXMLDoc('" + newfile +"')\">[Up a level]</a> <a href='#' onclick=\"loadXMLDoc('" + newloc1 +"&amp;act=checkall')\" >[check all]</a> <a href='#' onclick=\"loadXMLDoc('" + newloc1 +"&amp;act=uncheckall')\" >[uncheck all]</a></p><br />"
120
+ }
121
+ if(infoTags[0].hasChildNodes){
122
+ stringHTML=stringHTML+"<ul>";
123
+ for(node=infoTags[0].firstChild; node!=null; node=node.nextSibling){
124
+
125
+ var newloc="browser/files_xml.php?dir=" + loc ;
126
+ path = loc+"/"+node.firstChild.nodeValue;
127
+
128
+ if(node.nodeName=="file"){
129
+
130
+ stringHTML=stringHTML+"<li class=\"file\"><img src='browser/file.gif' border='0'><input type=checkbox "+node.getAttribute('check')+" onclick=\"loadXMLDoc('" + newloc +"&amp;path="+path+"')\" name=cid[] value='"+path+"'><a href=\"" +node.getAttribute('link')+ "\">"+node.firstChild.nodeValue+"</a></li>";
131
+
132
+ }
133
+ if(node.nodeName=="message"){
134
+
135
+
136
+ message = message + "<a href='#' onclick=\"loadXMLDoc('" + newloc+"&amp;path="+node.firstChild.nodeValue+"')\">"+node.firstChild.nodeValue+"</a><br />";
137
+
138
+ }
139
+ if(node.nodeName=="folder"){
140
+
141
+
142
+ var newfile="browser/files_xml.php?dir=" + loc + "/" + node.firstChild.nodeValue;
143
+ stringHTML=stringHTML+"<li class=\"folder\"><img src='browser/folder.gif' border='0'><input type=checkbox "+node.getAttribute('check')+" onclick=\"loadXMLDoc('" + newloc +"&amp;path="+path+"')\" name=cid[] value='"+path+"'><a href='#' class=\"folder\" onclick=\"loadXMLDoc('" + newfile+"')\">"+node.firstChild.nodeValue+"</a></li>";
144
+ }
145
+ }
146
+ stringHTML=stringHTML+"</ul>";
147
+ }
148
+ else{
149
+ stringHTML=stringHTML+"<p>No files in this directory</p>";
150
+ }
151
+
152
+ //stringHTML = stringHTML+ "</form>";
153
+ targetDiv.innerHTML= "<table align='right' width='200'><tr><td align='right'><b>" + "Excluded items list:" + "</b><br />"+ message+"</td></tr></table>" + stringHTML ;
154
+ }
cloner.config.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_CONFIG['license_code']="";
3
+ $_CONFIG['backup_path']="./";
4
+ $_CONFIG['clonerPath']="./";
5
+ $_CONFIG['mysql_host']="localhost";
6
+ $_CONFIG['mysql_user']="root";
7
+ $_CONFIG['mysql_pass']="";
8
+ $_CONFIG['mysql_database']="";
9
+ $_CONFIG['select_folders']="";
10
+ $_CONFIG['select_lang']="english";
11
+ $_CONFIG['secure_ftp']="0";
12
+ $_CONFIG['backup_compress']="";
13
+ $_CONFIG['cron_logemail']="";
14
+ $_CONFIG['cron_exclude']="";
15
+ $_CONFIG['cron_send']="0";
16
+ $_CONFIG['cron_btype']="0";
17
+ $_CONFIG['cron_bname']="";
18
+ $_CONFIG['cron_ip']="";
19
+ $_CONFIG['cron_ftp_server']="";
20
+ $_CONFIG['cron_ftp_user']="";
21
+ $_CONFIG['cron_ftp_pass']="";
22
+ $_CONFIG['cron_ftp_path']="";
23
+ $_CONFIG['cron_ftp_delb']="";
24
+ $_CONFIG['databases_incl_list']="";
25
+ $_CONFIG['cron_sql_drop']="";
26
+ $_CONFIG['cron_email_address']="";
27
+ $_CONFIG['cron_file_delete']="";
28
+ $_CONFIG['cron_file_delete_act']="";
29
+ $_CONFIG['mem']="";
30
+ $_CONFIG['backup_refresh']="1";
31
+ $_CONFIG['refresh_time']="1";
32
+ $_CONFIG['backup_refresh_number']="100";
33
+ $_CONFIG['sql_mem']="";
34
+ $_CONFIG['enable_db_backup']="1";
35
+ $_CONFIG['zippath']="";
36
+ $_CONFIG['tarpath']="tar";
37
+ $_CONFIG['sqldump']="mysqldump --quote-names ";
38
+ $_CONFIG['system_dlink']="";
39
+ $_CONFIG['system_ftptransfer']="0";
40
+ $_CONFIG['system_mdatabases']="0";
41
+
42
+ ### Defaults
43
+ $script_dir = str_replace("\\","/",dirname(__FILE__));
44
+
45
+ $_CONFIG['jcuser'] = 'admin';
46
+ $_CONFIG['jcpass'] = md5('admin');
47
+ $_CONFIG['mem']="0";
48
+ $_CONFIG['archive_type']="0";
49
+ $_CONFIG['backup_refresh'] = "1";
50
+ $_CONFIG['backup_path'] = $script_dir;
51
+ $_CONFIG['clonerPath'] = $script_dir."/backups";
52
+ $_CONFIG['enable_db_backup'] = '0';
53
+
54
+ ###Wordpress specific configuration
55
+
56
+ /*if(@include("../../../wp-config.php")){
57
+
58
+ $_CONFIG["enable_db_backup"] = 1;
59
+ $_CONFIG['mysql_host'] = DB_HOST;
60
+ $_CONFIG['mysql_user'] = DB_USER;
61
+ $_CONFIG['mysql_pass'] = DB_PASSWORD;
62
+ $_CONFIG['mysql_database'] = DB_NAME;
63
+
64
+
65
+ }*/
66
+
67
+ if(@file_exists("../../../wp-config.php")){
68
+
69
+ $content = file_get_contents("../../../wp-config.php");
70
+ $content = str_replace("require_once","#require_once", $content);
71
+ $content = str_replace(array("<?php","<?","?>"),array("","",""), $content);
72
+ eval($content);
73
+
74
+ $_CONFIG["enable_db_backup"] = 1;
75
+ $_CONFIG['mysql_host'] = DB_HOST;
76
+ $_CONFIG['mysql_user'] = DB_USER;
77
+ $_CONFIG['mysql_pass'] = DB_PASSWORD;
78
+ $_CONFIG['mysql_database'] = DB_NAME;
79
+
80
+
81
+ }
82
+
83
+ $script_dir = str_replace("wp-content/plugins/xcloner-backup-and-restore","", $script_dir);
84
+
85
+ $_CONFIG['backup_path'] = $script_dir;
86
+ $_CONFIG['clonerPath'] = $script_dir."/administrator/backups";
87
+ $_CONFIG['mosConfig_live_site']=$_SERVER['HTTP_HOST'];
88
+
89
+
90
+ ?>
cloner.cron.php ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
8
+ * Email: admin@joomlaplug.com
9
+ * Revision: 1.0
10
+ * Date: July 2007
11
+ **/
12
+
13
+ // Set flag that this is a parent file
14
+ @error_reporting(E_ALL^E_NOTICE);
15
+ @set_time_limit('3600');
16
+ define( '_VALID_MOS', 1 );
17
+
18
+ include_once("admin.cloner.html.php");
19
+ include_once("cloner.functions.php");
20
+ $script_dir = str_replace("\\","/",dirname(__FILE__));
21
+ if(is_dir($script_dir)){
22
+
23
+ chdir($script_dir);
24
+
25
+ }
26
+
27
+
28
+ if($_REQUEST['config'] != ""){
29
+
30
+ require_once( './configs/'.$_REQUEST['config'] );
31
+
32
+ $smsg = "Using configs/".$_REQUEST['config']." as configuration file";
33
+
34
+ }
35
+ else{
36
+
37
+ @require_once( './cloner.config.php' );
38
+
39
+ $smsg = "Using default configuration file";
40
+
41
+ }
42
+
43
+ require_once("common.php");
44
+ require_once("restore/TAR.php");
45
+
46
+ $mosConfig_live_site = $_CONFIG['mosConfig_live_site'];
47
+
48
+ logxx($smsg);
49
+
50
+
51
+
52
+
53
+
54
+ logxx("Starting ".$script_dir."/cloner.cron.php");
55
+
56
+ if($_REQUEST['config'] == ""){
57
+
58
+ if($argv[1] != ""){
59
+
60
+ $_REQUEST['config'] = $argv[1];
61
+
62
+ }
63
+
64
+
65
+ }
66
+
67
+
68
+ # load language
69
+ if($_CONFIG['select_lang']!="")
70
+ $mosConfig_lang = $_CONFIG['select_lang'];
71
+ if (file_exists( "language/".$mosConfig_lang.".php" )) {
72
+ include_once( "language/".$mosConfig_lang.".php" );
73
+ @include_once( "language/english.php" );
74
+ }
75
+ else{
76
+ include_once( "language/english.php" );
77
+ }
78
+
79
+
80
+
81
+ ####### VERIFY IP ACCESS
82
+ $ip_list = @explode("\r\n", $_CONFIG['cron_ip']);
83
+ $ip_list[] = $_SERVER['SERVER_ADDR'];
84
+ $curent_ip = $_SERVER["REMOTE_ADDR"];
85
+
86
+ if(!in_array($curent_ip, $ip_list)){
87
+
88
+ echo "Access Denied for ip $curent_ip!";
89
+ exit;
90
+
91
+ }
92
+ #########################
93
+
94
+ $access=1;
95
+ $_REQUEST[cron_dbonly] = 0;
96
+ $_REQUEST[cron_access] = 1;
97
+ $_REQUEST['databases_incl'] = @explode(",",$_CONFIG[databases_incl_list]);
98
+
99
+
100
+
101
+
102
+ if($_CONFIG[cron_bname]!="")
103
+ $_REQUEST['bname'] = $_CONFIG[cron_bname];
104
+
105
+
106
+ function logxx($string){
107
+
108
+ global $mail_log;
109
+
110
+ $return = "<b>$string</b><br />\r\n";
111
+
112
+ $mail_log .= $return;
113
+
114
+ echo $return;
115
+ return;
116
+ }
117
+
118
+ $clonerPath = $_CONFIG['clonerPath'];
119
+ logxx("Starting JoomlaCloner for site $mosConfig_live_site at ".date("Y-m-d H:i"));
120
+
121
+ $excludedFolders = array();
122
+ $d_arr = array(); $d = 0;
123
+ $ds_arr = array();
124
+ $f_arr = array(); $f = 0;
125
+ $s_arr = array(); $s = 0;
126
+ $d_arr[$d] = $_CONFIG['backup_path'];
127
+ #logxx("Reading the file structure");
128
+ #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludefolders, '');
129
+ #$excludedFolders = confirmBackup('nohtml');
130
+ #logxx("Done");
131
+
132
+
133
+
134
+ if($_CONFIG['cron_btype']==0){
135
+ $_REQUEST[dbbackup] = 1;
136
+
137
+ logxx("Creating a fullbackup");
138
+ $msg = 'full backup';
139
+ }
140
+ if($_CONFIG['cron_btype']==1){
141
+ $_REQUEST[dbbackup] = 0;
142
+
143
+ logxx("Creating a files only backup");
144
+ $msg = 'file backup';
145
+ }
146
+ if($_CONFIG['cron_btype']==2){
147
+ $_REQUEST[dbbackup] = 1;
148
+
149
+ #for ($i=0, $n=count($excludedFolders); $i < $n; $i++) {
150
+ $_CONFIG['cron_exclude'] = $_CONFIG['backup_path'];
151
+ $GLOBALS['_CONFIG'] = $_CONFIG;
152
+ $_REQUEST[cron_dbonly] = 1;
153
+ #}
154
+
155
+ logxx("Creating an sql only backup");
156
+ $msg = "database backup";
157
+ }
158
+
159
+
160
+ logxx("Generating Backup ...");
161
+ $file = generateBackup( $excludedFolders, 'nohtml' );
162
+ logxx("Backup Done");
163
+
164
+ $source_file = $clonerPath."/".$file;
165
+
166
+ logxx("Backup file: ".$source_file);
167
+ $bsize = getFileSizeText(filesize($source_file));
168
+
169
+ if($_CONFIG['cron_send']==1){
170
+ ######################################STARTING FTP TRANSFER##################
171
+
172
+ logxx("Starting ftp transfer:");
173
+
174
+ $source_files[] = $source_file;
175
+ $destination_files[] = $_CONFIG[cron_ftp_path]."/".$file;
176
+
177
+
178
+
179
+ // set up basic connection details
180
+ list($fhost, $fport) = explode(":",$_CONFIG[cron_ftp_server]);
181
+ if($fport == "")
182
+ $fport = '21';
183
+
184
+ $ftp_timeout = '3600';
185
+
186
+ // set up basic connection
187
+ if(!$_CONFIG[secure_ftp]){
188
+ $conn_id = ftp_connect($fhost, (int)$fport, (int)$ftp_timeout);
189
+ $connect = "Normal";
190
+ }
191
+ else{
192
+ $conn_id = ftp_ssl_connect($fhost, (int)$fport, (int)$ftp_timeout);
193
+ $connect = "Secure";
194
+ }
195
+
196
+ //$conn_id = ftp_connect($_CONFIG[cron_ftp_server]) or die("Could not connect to the ftp server ".$_CONFIG[cron_ftp_server]);
197
+
198
+ // login with username and password
199
+ $login_result = ftp_login($conn_id, $_CONFIG[cron_ftp_user], $_CONFIG[cron_ftp_pass])
200
+ or die("Authentification failed when connecting to the ftp server for user ".$_CONFIG[cron_ftp_user]." with pass".$_CONFIG[cron_ftp_pass]);
201
+
202
+ // check connection
203
+ if ((!$conn_id) || (!$login_result)) {
204
+ echo "<b style='color:red'>FTP connection has failed!</b>";
205
+ echo "<b style='color:red'>Attempted to connect to ".$_CONFIG[cron_ftp_server]." for user ".$_CONFIG[cron_ftp_user]."</b>";
206
+ return;
207
+ } else {
208
+ #echo "Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user]";
209
+ }
210
+
211
+ if($_CONFIG['system_ftptransfer']==1)
212
+ {
213
+ // turn passive mode on
214
+ @ftp_pasv($conn_id, true);
215
+ $mode = "Passive";
216
+ }
217
+ else
218
+ {
219
+ // turn passive mode off
220
+ @ftp_pasv($conn_id, false);
221
+ $mode = "Active";
222
+ }
223
+ echo "Connected to $connect <b>$_CONFIG[cron_ftp_server] Mode: $mode</b><br />";
224
+ for($i=0;$i<sizeof($source_files);$i++)
225
+ {
226
+ // upload the file
227
+ $upload = ftp_put($conn_id, $destination_files[$i], $source_files[$i], FTP_BINARY);
228
+
229
+ // check upload status
230
+ if (!$upload) {
231
+ echo "<b style='color:red'>FTP upload has failed for file $source_files[$i] ! Stopping ....<br /></b>";return;
232
+ } else {
233
+ echo "<b>Upload success from file <i>$source_files[$i]</i> <br />to <i>$destination_files[$i]</i> ...<br /></b>";
234
+ }
235
+
236
+ }
237
+
238
+ // close the FTP stream
239
+ ftp_close($conn_id);
240
+
241
+ logxx("Ftp transfer finished succesfully!");
242
+
243
+ if($_CONFIG[cron_ftp_delb]==1){
244
+
245
+ @unlink($source_file);
246
+ logxx("Backup succesfully deleted from the original server!");
247
+ }
248
+
249
+ ##############################################################################
250
+ }
251
+ elseif($_CONFIG['cron_send']==2){
252
+ #######################################STARTING Email TRANSFER################
253
+ logxx("Sending mail with backup");
254
+
255
+ $date = date("Y-m-d H:i");
256
+ $mode = '1';
257
+ $message = "
258
+ <pre>
259
+ Attached is the backup generated on $date
260
+ Source Filename: $source_file
261
+ Server: $mosConfig_live_site
262
+
263
+ Powered by http://www.joomlaplug.com - JoomlaCloner site backup solution for everybody!
264
+ </pre>
265
+
266
+ ";
267
+
268
+ $ok = send_mail($mosConfig_mailfrom, "JoomlaCloner $msg", $message, $_CONFIG['cron_email_address'], $source_file);
269
+
270
+ #echo mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $_CONFIG['cron_email_address'], "JoomlaCloner $msg", $message, $mode, '', '' );
271
+ if($ok)
272
+ logxx("Mail sent to ".$_CONFIG['cron_email_address']);
273
+ else
274
+ logxx("There was an error in sending the mail cron to ".$_CONFIG['cron_email_address']);
275
+
276
+ ##############################################################################
277
+ }
278
+ logxx("Total backup size:".$bsize);
279
+
280
+
281
+ ######## DELETING OLDER BACKUPS ##############################################
282
+
283
+ if($_CONFIG['cron_file_delete_act']){
284
+
285
+ logxx("<br />\nDeleting older backups than ".$_CONFIG['cron_file_delete']." days: ");
286
+ delete_older_backups($clonerPath);
287
+
288
+ }
289
+
290
+
291
+ ###################END OLDER BACKUPS
292
+
293
+ $logemail = explode(";", $_CONFIG['cron_logemail']);
294
+ if(sizeof($logemail)>0){
295
+
296
+ for($i=0; $i<sizeof($logemail);$i++){
297
+
298
+ $email = trim($logemail[$i]);
299
+ if($email != ""){
300
+
301
+ $email_subject = "cron log ".time();
302
+
303
+ $headers ="From: \"Cronlog JoomlaCloner\" <nobody@noreply.com>\n";
304
+
305
+ if(mail($email, $email_subject, strip_tags($mail_log), $headers)){
306
+
307
+ logxx ("Notification Mail was sent to $email");
308
+
309
+ }
310
+
311
+
312
+ }
313
+
314
+ }
315
+
316
+ }
317
+
318
+ logxx("<br />\n\nALL DONE! I will exit now from cron.");
319
+ exit;
320
+
321
+ ?>
322
+ <?php
323
+
324
+ function delete_older_backups($clonerPath){
325
+ global $_CONFIG;
326
+ # initialise list arrays, directories and files separately and array counters for them
327
+ $d_arr = array(); $d = 0;
328
+ $f_arr = array(); $f = 0;
329
+ $s_arr = array(); $s = 0;
330
+
331
+ # obtain the list of backup archive files
332
+ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
333
+
334
+ if(is_array($f_arr))
335
+ foreach($f_arr as $file)
336
+ if(($file!='.')&&($file != '..')){
337
+
338
+ #logxx("Processing backup file $file");
339
+ $cfile = $_CONFIG['clonerPath']."/".$file;
340
+
341
+ $filemtime = filemtime($cfile) ;
342
+
343
+ $ftime= $filemtime + $_CONFIG['cron_file_delete']*24*60*60;
344
+
345
+ $ctime = time();
346
+
347
+ if($ftime < $ctime){
348
+
349
+ if(unlink($cfile))
350
+ logxx("Deleted backup file $file created on ".date("Y-m-d", $filemtime));
351
+ else
352
+ logxx("Could not delete backup file $file, please delete it manually");
353
+
354
+ }
355
+
356
+ }
357
+
358
+ }
359
+
360
+ function send_mail($email_from, $email_subject, $email_txt, $email_to, $fileatt){
361
+ $fileatt_type = "application/octet-stream"; // File Type
362
+ $fileatt_name = basename($fileatt); // Filename that will be used for the file as the attachment
363
+ $data = "";
364
+
365
+ $headers = "From: \"Cronbackup JoomlaCloner\" <".$email_from.">";
366
+
367
+ if($fileatt != ""){
368
+
369
+ if($file = @fopen($fileatt,'rb')){
370
+
371
+ $data = fread($file,filesize($fileatt));
372
+
373
+ fclose($file);
374
+
375
+ }
376
+ else{
377
+ logxx("Unable to open file $fileatt");
378
+ }
379
+
380
+ }
381
+
382
+ $semi_rand = md5(time());
383
+ $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
384
+
385
+ $headers .= "\nMIME-Version: 1.0\n" .
386
+ "Content-Type: multipart/mixed;\n" .
387
+ " boundary=\"{$mime_boundary}\"";
388
+
389
+ $email_message .= "This is a multi-part message in MIME format.\n\n" .
390
+ "--{$mime_boundary}\n" .
391
+ "Content-Type:text/html; charset=\"iso-8859-1\"\n" .
392
+ "Content-Transfer-Encoding: 7bit\n\n" .
393
+ $email_txt . "\n\n";
394
+
395
+ $data = chunk_split(base64_encode($data));
396
+
397
+ $email_message .= "--{$mime_boundary}\n" .
398
+ "Content-Type: {$fileatt_type};\n" .
399
+ " name=\"{$fileatt_name}\"\n" .
400
+ //"Content-Disposition: attachment;\n" .
401
+ //" filename=\"{$fileatt_name}\"\n" .
402
+ "Content-Transfer-Encoding: base64\n\n" .
403
+ $data . "\n\n" .
404
+ "--{$mime_boundary}--\n";
405
+
406
+ $ok = mail($email_to, $email_subject, $email_message, $headers);
407
+
408
+ return $ok;
409
+
410
+ }
411
+ ?>
cloner.functions.php ADDED
@@ -0,0 +1,1946 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*processing the Logout task*/
14
+ function doLogout(){
15
+
16
+ if(function_exists('session_unregister')) {
17
+ @session_unregister('clone');
18
+ }
19
+
20
+ unset($_SESSION['clone']);
21
+
22
+ mosRedirect("index.php?option=com_cloner","");
23
+
24
+ }
25
+ /*Error printing function*/
26
+ function E_print($message){
27
+
28
+ print "<center><font color='red' size='4'>$message</font></center>";
29
+
30
+ }
31
+
32
+ /*Simple redirect function*/
33
+ function mosRedirect($url, $msg=""){
34
+
35
+
36
+ echo "<script>
37
+
38
+ window.location = '$url&mosmsg=$msg';
39
+
40
+ </script>";
41
+
42
+ }
43
+
44
+ function fdefault(){
45
+
46
+ HTML_cloner::_FDefault();
47
+
48
+ }
49
+
50
+ function config($option){
51
+ global $mosConfig_absolute_path, $_CONFIG, $config_file;
52
+
53
+
54
+ if(@$_REQUEST['action']=='save'){
55
+ #print_r($_REQUEST);exit;
56
+ $databases_incl_list = "";
57
+ if(is_array($_REQUEST['databases_incl']))
58
+ foreach($_REQUEST['databases_incl'] as $database){
59
+
60
+ $databases_incl_list .= $database. ",";
61
+
62
+ }
63
+ if($fp = @fopen($config_file,'w')){
64
+
65
+ $cfg = '<?'.'php'."\n";
66
+
67
+ $cfg .= '$_CONFIG[\'license_code\']="'.$_REQUEST[license_code].'";'."\n";
68
+
69
+ $cfg .= '$_CONFIG[\'backup_path\']="'.$_REQUEST[backup_path].'";'."\n";
70
+
71
+ $cfg .= '$_CONFIG[\'clonerPath\']="'.$_REQUEST[clonerPath].'";'."\n";
72
+
73
+ $cfg .= '$_CONFIG[\'jcuser\']="'.$_REQUEST[jcuser].'";'."\n";
74
+
75
+ if($_REQUEST['jcpass'] == ''){
76
+
77
+ $jcpass = $_CONFIG['jcpass'];
78
+
79
+ }else{
80
+
81
+ $jcpass = md5($_REQUEST['jcpass']);
82
+
83
+ }
84
+
85
+ $cfg .= '$_CONFIG[\'jcpass\']=\''.$jcpass.'\';'."\n";
86
+
87
+ $cfg .= '$_CONFIG[\'mysql_host\']="'.$_REQUEST[mysql_host].'";'."\n";
88
+
89
+ $cfg .= '$_CONFIG[\'mysql_user\']="'.$_REQUEST[mysql_user].'";'."\n";
90
+
91
+ $cfg .= '$_CONFIG[\'mysql_pass\']=\''.$_REQUEST[mysql_pass].'\';'."\n";
92
+
93
+ $cfg .= '$_CONFIG[\'mysql_database\']="'.$_REQUEST[mysql_database].'";'."\n";
94
+
95
+ $cfg .= '$_CONFIG[\'select_folders\']="'.$_REQUEST[select_folders].'";'."\n";
96
+
97
+ $cfg .= '$_CONFIG[\'select_lang\']="'.$_REQUEST[select_lang].'";'."\n";
98
+
99
+ $cfg .= '$_CONFIG[\'secure_ftp\']="'.$_REQUEST[secure_ftp].'";'."\n";
100
+
101
+ $cfg .= '$_CONFIG[\'backup_compress\']="'.$_REQUEST[backup_compress].'";'."\n";
102
+
103
+ $cfg .= '$_CONFIG[\'cron_logemail\']="'.$_REQUEST[cron_logemail].'";'."\n";
104
+
105
+ $cfg .= '$_CONFIG[\'cron_exclude\']="'.$_REQUEST[cron_exclude].'";'."\n";
106
+
107
+ $cfg .= '$_CONFIG[\'cron_send\']="'.$_REQUEST[cron_send].'";'."\n";
108
+
109
+ $cfg .= '$_CONFIG[\'cron_btype\']="'.$_REQUEST[cron_btype].'";'."\n";
110
+
111
+ $cfg .= '$_CONFIG[\'cron_bname\']="'.$_REQUEST[cron_bname].'";'."\n";
112
+
113
+ $cfg .= '$_CONFIG[\'cron_ip\']="'.$_REQUEST[cron_ip].'";'."\n";
114
+
115
+ $cfg .= '$_CONFIG[\'cron_ftp_server\']="'.$_REQUEST[cron_ftp_server].'";'."\n";
116
+
117
+ $cfg .= '$_CONFIG[\'cron_ftp_user\']="'.$_REQUEST[cron_ftp_user].'";'."\n";
118
+
119
+ $cfg .= '$_CONFIG[\'cron_ftp_pass\']=\''.$_REQUEST[cron_ftp_pass].'\';'."\n";
120
+
121
+ $cfg .= '$_CONFIG[\'cron_ftp_path\']="'.$_REQUEST[cron_ftp_path].'";'."\n";
122
+
123
+ $cfg .= '$_CONFIG[\'cron_ftp_delb\']="'.$_REQUEST[cron_ftp_delb].'";'."\n";
124
+
125
+ $cfg .= '$_CONFIG[\'databases_incl_list\']="'.$databases_incl_list.'";'."\n";
126
+
127
+ $cfg .= '$_CONFIG[\'cron_sql_drop\']="'.$_REQUEST[cron_sql_drop].'";'."\n";
128
+
129
+ $cfg .= '$_CONFIG[\'cron_email_address\']="'.$_REQUEST[cron_email_address].'";'."\n";
130
+
131
+ $cfg .= '$_CONFIG[\'cron_file_delete\']="'.$_REQUEST[cron_file_delete].'";'."\n";
132
+
133
+ $cfg .= '$_CONFIG[\'cron_file_delete_act\']="'.$_REQUEST[cron_file_delete_act].'";'."\n";
134
+
135
+ $cfg .= '$_CONFIG[\'mem\']="'.$_REQUEST[mem].'";'."\n";
136
+
137
+ $cfg .= '$_CONFIG[\'backup_refresh\']="'.$_REQUEST[backup_refresh].'";'."\n";
138
+
139
+ $cfg .= '$_CONFIG[\'refresh_time\']="'.$_REQUEST[refresh_time].'";'."\n";
140
+
141
+ $cfg .= '$_CONFIG[\'backup_refresh_number\']="'.$_REQUEST[backup_refresh_number].'";'."\n";
142
+
143
+ $cfg .= '$_CONFIG[\'sql_mem\']="'.$_REQUEST[sql_mem].'";'."\n";
144
+
145
+ $cfg .= '$_CONFIG[\'enable_db_backup\']="'.$_REQUEST[enable_db_backup].'";'."\n";
146
+
147
+ $cfg .= '$_CONFIG[\'zippath\']="'.$_REQUEST[zippath].'";'."\n";
148
+
149
+ $cfg .= '$_CONFIG[\'tarpath\']="'.$_REQUEST[tarpath].'";'."\n";
150
+
151
+ $cfg .= '$_CONFIG[\'sqldump\']="'.$_REQUEST[sqldump].'";'."\n";
152
+
153
+ $cfg .= '$_CONFIG[\'system_dlink\']="'.$_REQUEST[system_dlink].'";'."\n";
154
+
155
+ $cfg .= '$_CONFIG[\'mosConfig_live_site\']="'.$_SERVER['HTTP_HOST'].'";'."\n";
156
+
157
+ $cfg .= '$_CONFIG[\'system_ftptransfer\']="'.$_REQUEST[system_ftptransfer].'";'."\n";
158
+
159
+ $cfg .= '$_CONFIG[\'system_mdatabases\']="'.$_REQUEST[system_mdatabases].'";'."\n";
160
+
161
+ $cfg .= '$_CONFIG[\'add_backups_dir\']="'.$_REQUEST[add_backups_dir].'";'."\n";
162
+
163
+ $cfg .= '?'.'>';
164
+
165
+ fwrite($fp, $cfg);
166
+
167
+ fclose($fp);
168
+
169
+ $msg = LM_MSG_BACK_1;
170
+
171
+ if($_REQUEST['cron_save_as'] != ""){
172
+
173
+ $fcron = $_CONFIG['multiple_config_dir']."/".$_REQUEST['cron_save_as'].".php";
174
+
175
+ if($fp = @fopen($fcron, "w")){
176
+
177
+ fwrite($fp, $cfg);
178
+
179
+ fclose($fp);
180
+
181
+ }
182
+ else{
183
+
184
+ $msg = "Unable to save $fcron file, please make sure the folder is writeable!";
185
+
186
+ }
187
+
188
+ }
189
+
190
+
191
+ mosRedirect( 'index2.php?option='.$option."&task=config" , $msg);
192
+ }
193
+ else
194
+ {
195
+ $msg ="<font color='red'>ERROR... Unable to write to $config_file, please change the permissions!</font>";
196
+ E_print($msg);
197
+ }
198
+
199
+ }
200
+ HTML_cloner::Config($option);
201
+ }
202
+
203
+ ### JoomlaCloner Language Manager
204
+ function translator($option){
205
+ global $mosConfig_absolute_path, $lang_array, $lang_dir;
206
+
207
+ $langs = array();
208
+ $cid = $_REQUEST['cid'];
209
+ $files = $_REQUEST['files'];
210
+
211
+ if(is_array($cid))
212
+ foreach($cid as $value){
213
+
214
+ $langs[] = $files[$value];
215
+
216
+ }
217
+
218
+ if($_REQUEST['task'] == 'del_lang'){
219
+
220
+ foreach($langs as $lang){
221
+
222
+ @unlink ($lang_dir."/".$lang.".php");
223
+
224
+ }
225
+
226
+ $msg = LM_LANG_MSG_DEL;
227
+ mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
228
+
229
+ }
230
+
231
+ HTML_cloner::Translator($option, $lang_array);
232
+ }
233
+
234
+ function translator_add($option, $task){
235
+ global $_CONFIG, $lang_array, $lang_dir;
236
+
237
+ if($task == 'add_lang_new') {
238
+
239
+ $lfile = $lang_dir."/".strtolower($_REQUEST['lname']).".php";
240
+
241
+ if(file_exists($lfile)){
242
+
243
+ $msg = "Language ".$_REQUEST['lname']." already exists!";
244
+ }
245
+ else
246
+ if($fp = @fopen($lfile, 'w')){
247
+
248
+ fwrite($fp, "");
249
+
250
+ fclose($fp);
251
+
252
+ $msg = "Language ".ucfirst($_REQUEST['language'])." successfully added!";
253
+
254
+ }
255
+ else{
256
+
257
+ $msg = "File $lfile could not be updated, please check it's permissions'!";
258
+
259
+ }
260
+
261
+ mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
262
+
263
+ }
264
+
265
+
266
+ HTML_cloner::Translator_Add($option);
267
+ }
268
+ function translator_edit($option, $task){
269
+ global $_CONFIG, $lang_array, $lang_dir;
270
+
271
+ if(($task == 'save_lang')||($task == 'save_lang_apply')){
272
+
273
+ $lfile = $lang_dir."/".$_REQUEST['language'].".php";
274
+
275
+ if($_REQUEST['language'] == 'english'){
276
+
277
+ if($fp = @fopen($lfile, 'w')){
278
+
279
+ fwrite($fp, stripslashes($_REQUEST['def_content']));
280
+
281
+ fclose($fp);
282
+
283
+ $msg = "Language ".ucfirst($_REQUEST['language'])." successfully updated!";
284
+
285
+ }
286
+ else{
287
+
288
+ $msg = "File $lfile could not be created, please check it's permissions'!";
289
+
290
+ }
291
+ if($task == 'save_lang_apply')
292
+ mosRedirect( 'index2.php?option='.$option."&task=edit_lang&langx=".$_REQUEST['language'] , $msg);
293
+ else
294
+ mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
295
+
296
+ }
297
+ else{
298
+
299
+ $lfile = $_REQUEST['lfile'];
300
+ $ldata = $_REQUEST['lang'];
301
+
302
+ if($fp = @fopen($lfile, 'w')){
303
+
304
+ fwrite($fp, "<"."?php\n");
305
+ foreach($ldata as $key=>$value){
306
+
307
+ fwrite($fp, "define(\"".$key."\",\"".stripslashes($value)."\");\n");
308
+
309
+ }
310
+
311
+ fwrite($fp, "?".">");
312
+
313
+ fclose($fp);
314
+
315
+ $msg = "Language ".ucfirst($_REQUEST['language'])." successfully updated!";
316
+
317
+ }
318
+ else{
319
+
320
+ $msg = "File $lfile could not be updated, please check it's permissions'!";
321
+
322
+ }
323
+
324
+
325
+ }
326
+ if($task == 'save_lang_apply')
327
+ mosRedirect( 'index2.php?option='.$option."&task=edit_lang&langx=".$_REQUEST['language'] , $msg);
328
+ else
329
+ mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
330
+
331
+ }
332
+
333
+ $content = "";
334
+ $lang = "";
335
+ $cid = $_REQUEST['cid'];
336
+ $files = $_REQUEST['files'];
337
+
338
+ if(is_array($cid))
339
+ foreach($cid as $value){
340
+
341
+ $lang = $files[$value];
342
+
343
+ }
344
+
345
+ if($_REQUEST['langx']){
346
+
347
+ $lang = $_REQUEST['langx'];
348
+
349
+ }
350
+
351
+ if($fp = fopen($lang_dir."/english.php", 'r')){
352
+
353
+ while(!feof($fp)){
354
+
355
+ $content .= fread($fp, 1024);
356
+
357
+ }
358
+
359
+ fclose($fp);
360
+
361
+ }
362
+
363
+ $file = $lang_dir."/".$lang.".php";
364
+ $dfile = $lang_dir."/english.php";
365
+
366
+
367
+
368
+ if($lang == 'english') {
369
+
370
+ HTML_cloner::Translator_Edit_DEFAULT($option, $content, $file, $lang);
371
+
372
+ }
373
+ else {
374
+
375
+ $def_data = get_lang_data($dfile);
376
+ $cur_data = get_lang_data($file);
377
+
378
+ $data = array_merge($def_data, $cur_data);
379
+
380
+ HTML_cloner::Translator_Edit($option, $data, $def_data, $file, $lang);
381
+
382
+ }
383
+
384
+ }
385
+
386
+ function get_lang_data($file){
387
+ global $_CONFIG;
388
+
389
+ if($fp = fopen($file, 'r')){
390
+
391
+ while(!feof($fp)){
392
+
393
+ $content .= fread($fp, 1024);
394
+
395
+ }
396
+
397
+ fclose($fp);
398
+
399
+ }
400
+
401
+ $data = array();
402
+
403
+ $tmp = explode("define(\"", $content);
404
+ foreach($tmp as $key=>$value){
405
+
406
+ $temp = explode("\",", $value);
407
+
408
+ $tst = explode("\");", $temp[1]);
409
+ $data[$temp[0]] = substr(trim($tst[0]), 1, strlen($tst[0]));
410
+
411
+ }
412
+
413
+ return $data;
414
+
415
+ }
416
+
417
+ function get_avalaible_langs(){
418
+ global $_CONFIG, $lang_dir;
419
+
420
+ $lang_arr = array();
421
+
422
+ if ($handle = @opendir($lang_dir)) {
423
+
424
+ /* This is the correct way to loop over the directory. */
425
+ while (false !== ($file = readdir($handle)))
426
+ if(($file != 'index.html') &&($file != '..')&&($file != '.'))
427
+ {
428
+ $lang_arr[] = str_replace(".php", "", $file);
429
+ }
430
+
431
+ closedir($handle);
432
+
433
+ }
434
+
435
+ return $lang_arr;
436
+ }
437
+
438
+ function showBackups( $option ) {
439
+ // ----------------------------------------------------------
440
+ // Generate a selectable list of the files in Backup Folder
441
+ // ----------------------------------------------------------
442
+ global $_CONFIG;
443
+
444
+ if(!is_dir($_CONFIG['clonerPath'])){
445
+ E_print( "Your backup directory ".$_CONFIG['clonerPath']." is not correct! Unable to continue...");
446
+ return ;
447
+ }
448
+
449
+ # initialise list arrays, directories and files separately and array counters for them
450
+ $d_arr = array(); $d = 0;
451
+ $f_arr = array(); $f = 0;
452
+ $s_arr = array(); $s = 0;
453
+
454
+ # obtain the list of backup archive files
455
+ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
456
+
457
+ # load presentation layer
458
+ HTML_cloner::showBackups( $f_arr, $s_arr, $_CONFIG['clonerPath'], $option );
459
+ }
460
+
461
+ function moveBackup($option){
462
+ global $task;
463
+ $files_out = array();
464
+ if(is_array($_REQUEST[files]))
465
+ {
466
+
467
+ foreach($_REQUEST[files] as $key=>$value)
468
+ if($_REQUEST[cid][$key]!="")
469
+ $files_out[] = $value;
470
+ }
471
+
472
+ if($_REQUEST['action']=="connect"){
473
+
474
+ $ret = start_connect($_REQUEST[files]);
475
+
476
+ }
477
+ if(!$ret)
478
+ HTML_cloner::TransferForm($option, $files_out);
479
+ }
480
+
481
+ function start_connect($files){
482
+ global $task, $_CONFIG;
483
+
484
+
485
+ if(($_REQUEST[task]=='move')||($_REQUEST[task2]=='move')){
486
+ }
487
+ else{
488
+ $source_file[0] = "restore/XCloner.php";
489
+ $destination_file[0] = $_REQUEST[ftp_dir]."/XCloner.php";
490
+
491
+ $source_file[1] = "restore/TAR.php";
492
+ $destination_file[1] = $_REQUEST[ftp_dir]."/TAR.php";
493
+
494
+ }
495
+
496
+ foreach($files as $file){
497
+ $source_file[] = $_CONFIG['clonerPath']."/".$file;
498
+ $destination_file[] = $_REQUEST[ftp_dir]."/".$file;
499
+ }
500
+
501
+
502
+
503
+ list($fhost, $fport) = explode(":",$_REQUEST[ftp_server]);
504
+ if($fport == "")
505
+ $fport = '21';
506
+
507
+ $ftp_timeout = '3600';
508
+ // set up basic connection
509
+ if(!$_CONFIG[secure_ftp]){
510
+ $conn_id = ftp_connect($fhost, (int)$fport, (int)$ftp_timeout);
511
+ $connect = "Normal";
512
+ }
513
+ else{
514
+ $conn_id = ftp_ssl_connect($fhost, (int)$fport, (int)$ftp_timeout);
515
+ $connect = "Secure";
516
+ }
517
+
518
+ // login with username and password
519
+ $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]);
520
+
521
+ // check connection
522
+ if ((!$conn_id) || (!$login_result)) {
523
+ echo "<b style='color:red'>".LM_MSG_BACK_2."</b>";
524
+ echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server]." for user ".$_REQUEST[ftp_user]."</b>";
525
+ return;
526
+ } else {
527
+ #echo "Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user]";
528
+ }
529
+
530
+ if($_CONFIG[system_ftptransfer]==1)
531
+ {
532
+ // turn passive mode on
533
+ @ftp_pasv($conn_id, true);
534
+ $mode = "Passive";
535
+ }
536
+ else
537
+ {
538
+ // turn passive mode off
539
+ @ftp_pasv($conn_id, false);
540
+ $mode = "Active";
541
+ }
542
+
543
+ echo "Connected to $connect ftp server <b>$_REQUEST[ftp_server] - $mode Mode</b><br />";
544
+ for($i=0;$i<sizeof($source_file);$i++)
545
+ {
546
+ echo "<br />Moving source file <b>".$source_file[$i]."</b>";
547
+ // upload the file
548
+ if(!$_REQUEST['ftp_inct']){
549
+
550
+ $ret = ftp_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY);
551
+
552
+ if ($ret) echo "<br /><b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
553
+ else {echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";return;}
554
+
555
+
556
+ }
557
+
558
+ if($_REQUEST['ftp_inct']){
559
+
560
+ $size = filesize($source_file[$i]);
561
+ $dsize = ftp_size($conn_id, $destination_file[$i]);
562
+ $perc = sprintf("%.2f", ($dsize*100)/$size);
563
+
564
+ echo " - uploaded $perc% from $size bytes <br>";
565
+ $ret = ftp_nb_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY , FTP_AUTORESUME);
566
+
567
+
568
+
569
+ // check upload status
570
+ if ($ret == FTP_FAILED ) {
571
+ echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";return;
572
+
573
+ } else {
574
+
575
+ $j = 1;
576
+
577
+ while ($ret == FTP_MOREDATA) {
578
+
579
+ // Do whatever you want
580
+ #echo ". ";
581
+
582
+
583
+ // Continue uploading...
584
+ $ret = ftp_nb_continue($conn_id);
585
+
586
+ if($j++ % 500 == 0){
587
+
588
+ @ftp_close($conn_id);
589
+
590
+ echo "<script>
591
+ var sURL = unescape('".$_SERVER[REQUEST_URI]."');
592
+
593
+ function refresh()
594
+ {
595
+ // This version of the refresh function will cause a new
596
+ // entry in the visitor's history. It is provided for
597
+ // those browsers that only support JavaScript 1.0.
598
+ //
599
+ window.location.href = sURL;
600
+ }
601
+
602
+ setTimeout( \"refresh()\", 2*1000 );
603
+
604
+ </script>";
605
+ return 1;
606
+
607
+ break;
608
+
609
+ }
610
+
611
+ }
612
+ if ($ret == FTP_FINISHED) {
613
+ echo "<b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
614
+ }
615
+
616
+ }
617
+
618
+ }
619
+
620
+ }
621
+ // close the FTP stream
622
+ @ftp_close($conn_id);
623
+
624
+ $redurl = $_REQUEST[ftp_url]."/XCloner.php";
625
+
626
+ if((substr($redurl, 0, 7)!= "http://") && (substr($redurl, 0, 8)!="https://") )
627
+ $redurl = "http://".trim($redurl);
628
+
629
+ if($_REQUEST['ftp_inct']){
630
+
631
+ if($_REQUEST['refresh_done'] != 1){
632
+ echo "<script>
633
+ var sURL = unescape('".$_SERVER[REQUEST_URI]."&refresh_done=1');
634
+
635
+ function refresh()
636
+ {
637
+ // This version of the refresh function will cause a new
638
+ // entry in the visitor's history. It is provided for
639
+ // those browsers that only support JavaScript 1.0.
640
+ //
641
+ window.location.href = sURL;
642
+ }
643
+
644
+ setTimeout( \"refresh()\", 2*1000 );
645
+
646
+ </script>";
647
+ return 1;
648
+ }
649
+
650
+ }
651
+ else{
652
+
653
+ $_REQUEST['refresh_done'] = 1;
654
+
655
+ }
656
+ if($_REQUEST['refresh_done'] == 1)
657
+
658
+ if(($_REQUEST[task]=='move')||($_REQUEST[task2]=='move')){
659
+ echo "<br><br><h2>".LM_MSG_BACK_3."</h2>"; return 1;
660
+ }
661
+ else{
662
+ echo "<br><br><h2>".LM_MSG_BACK_4." <br /><a href='".$redurl."'>click here to continue...</a></h2>"; return 1;
663
+ }
664
+
665
+
666
+ return 0;
667
+
668
+ }
669
+ function copyls($source, $dest){
670
+
671
+ $handle = fopen($dest, "a");
672
+ if($handle){
673
+ fclose($handle);
674
+ return 1;
675
+ }
676
+ else{
677
+ return 0;
678
+ }
679
+
680
+ }
681
+
682
+ function action($option){
683
+ global $_CONFIG;
684
+
685
+ $userfile = $_CONFIG['baDownloadPath']."/".$_REQUEST[file];
686
+ $localfile = $_CONFIG['clonerPath']."/".$_REQUEST[file];
687
+
688
+
689
+ if($_REQUEST[action]=='delete'){
690
+
691
+ if(@unlink($userfile))
692
+ $msg = LM_MSG_BACK_5;
693
+ else
694
+ $msg = LM_MSG_BACK_6;
695
+ }
696
+ elseif($_REQUEST[action]=='copy'){
697
+
698
+ if(@copyls($localfile, $userfile))
699
+ $msg = LM_MSG_BACK_7;
700
+ else
701
+ $msg = LM_MSG_BACK_8;
702
+ }
703
+ mosRedirect( 'index2.php?option='.$option."&task=view" , $msg);
704
+
705
+ }
706
+
707
+ function clone_rename($option){
708
+ global $_CONFIG;
709
+
710
+ if($_REQUEST[task] == 'rename_save'){
711
+ $files = $_REQUEST['cfile'];
712
+ foreach($files as $key=>$value){
713
+ @rename($_CONFIG[clonerPath]."/".$_REQUEST[cfile][$key],$_CONFIG[clonerPath]."/".$_REQUEST[dfile][$key]);
714
+ @rename($_CONFIG[baDownloadPath]."/".$_REQUEST[cfile][$key],$_CONFIG[baDownloadPath]."/".$_REQUEST[dfile][$key]);
715
+ }
716
+
717
+ $msg = LM_MSG_BACK_9;
718
+ mosRedirect( 'index2.php?option='.$option."&task=view" , $msg);
719
+ }
720
+
721
+ $files = array();
722
+
723
+ foreach($_REQUEST[cid] as $key=>$value){
724
+ $files[] = $_REQUEST[files][$key];
725
+ }
726
+
727
+
728
+
729
+ HTML_Cloner::Rename($files, $option);
730
+
731
+ }
732
+ function downloadBackup($file){
733
+
734
+ global $_CONFIG;
735
+
736
+ $file = $_CONFIG['clonerPath']."/$file";
737
+
738
+ //First, see if the file exists
739
+ if (!is_file($file)) { die("<b>404 File $file was not found!</b>"); }
740
+
741
+ //File Info
742
+ $len = filesize($file);
743
+ $filename = basename($file);
744
+ $file_extension = strtolower(substr(strrchr($filename,"."),1));
745
+
746
+ //Setam Content-Type-urile pentru fisierul in cauza
747
+ switch( $file_extension ) {
748
+ case "pdf": $ctype="application/pdf"; break;
749
+ case "exe": $ctype="application/octet-stream"; break;
750
+ case "zip": $ctype="application/zip"; break;
751
+ case "doc": $ctype="application/msword"; break;
752
+ case "xls": $ctype="application/vnd.ms-excel"; break;
753
+ case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
754
+ case "gif": $ctype="image/gif"; break;
755
+ case "png": $ctype="image/png"; break;
756
+ case "jpeg":
757
+ case "jpg": $ctype="image/jpg"; break;
758
+ case "mp3": $ctype="audio/mpeg"; break;
759
+ case "wav": $ctype="audio/x-wav"; break;
760
+ case "mpeg":
761
+ case "mpg":
762
+ case "mpe": $ctype="video/mpeg"; break;
763
+ case "mov": $ctype="video/quicktime"; break;
764
+ case "avi": $ctype="video/x-msvideo"; break;
765
+
766
+ default: $ctype="application/force-download";
767
+ }
768
+
769
+ //Writing Headers
770
+ header("Pragma: public");
771
+ header("Expires: 0");
772
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
773
+ header("Cache-Control: public");
774
+ header("Content-Description: File Transfer");
775
+
776
+ //Content-Type-ul
777
+ header("Content-Type: $ctype");
778
+
779
+ //Force Download
780
+ $header="Content-Disposition: attachment; filename=".$filename.";";
781
+ header($header );
782
+ header("Content-Transfer-Encoding: binary");
783
+ header("Content-Length: ".$len);
784
+ @readfile($file);
785
+ exit;
786
+ }
787
+
788
+
789
+ function confirmBackup( $option ) {
790
+ // ----------------------------------------------------------
791
+ // Routine to display a confirmation screen prior to backup
792
+ // containing the selectable folders and a confirmation for
793
+ // backing up the database
794
+ // ----------------------------------------------------------
795
+ global $_CONFIG;
796
+
797
+ if(!is_writeable($_CONFIG['clonerPath'])){
798
+ E_print( "Your backup directory $_CONFIG[clonerPath] is not writeable or does not exists!");
799
+ return;
800
+ }
801
+
802
+ # Initialise list arrays, directories and files separately and array counters for them
803
+ $excludedFolders = array();
804
+ $d_arr = array(); $d = 0;
805
+ $ds_arr = array();
806
+ $f_arr = array(); $f = 0;
807
+ $s_arr = array(); $s = 0;
808
+ $d_arr[$d] = $_CONFIG['backup_path'];
809
+
810
+ #if($_CONFIG['select_folders']==0){
811
+ # obtain the list of folders by recursing the mambo file store
812
+ #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders, '');
813
+ #}
814
+
815
+ if($_CONFIG['select_folders'] == 2)
816
+ if($fp = @fopen($_CONFIG['exfile'], 'w')){
817
+
818
+ $excl = explode("\r\n", $_CONFIG['cron_exclude']);
819
+ foreach($excl as $value)
820
+ if($value != ""){
821
+
822
+ $value = str_replace($_CONFIG['backup_path'], "", $value);
823
+ if($value [0] !='/')
824
+ $value = '/'.$value;
825
+
826
+ if((substr($value, strlen($value)-1, 1) == '/')&&(strlen($value)!=1))
827
+ $value = substr($value, 0 , strlen($value)-1);
828
+
829
+ fwrite($fp, $value."\r\n");
830
+ }
831
+ fclose($fp);
832
+ }
833
+
834
+ # load presentation layer
835
+ if($option != 'nohtml')
836
+ HTML_cloner::confirmBackups( $d_arr, $ds_arr, $_CONFIG['clonerPath'], $option );
837
+ else
838
+ return $d_arr;
839
+ }
840
+
841
+
842
+ function deleteBackups( $cid, $option ) {
843
+ // ----------------------------------------------------------
844
+ // Routine to delete the Backup Sets selected in the list
845
+ // backup sets screen
846
+ // ----------------------------------------------------------
847
+ global $_CONFIG;
848
+
849
+
850
+ # Cycle through all the selected Backups and Deleted them
851
+ foreach ($cid as $key=>$value) {
852
+
853
+ $file = $_CONFIG['clonerPath'].'/'. $_REQUEST['f'.$value];
854
+
855
+
856
+ if ( unlink( $file ) ) {
857
+ $msg .= $_REQUEST['f'.$value].' - '.LM_DELETE_FILE_SUCCESS;
858
+ } else {
859
+ $msg .= $_REQUEST['f'.$value].' - '.LM_DELETE_FILE_FAILED ;
860
+ }
861
+ }
862
+
863
+ # redirect to list screen
864
+ #$msg = _DELETE_FILE_SUCCESS;
865
+ mosRedirect( 'index2.php?option='.$option."&task=view" , $msg );
866
+ }
867
+
868
+ function generateBackuprefresh($cid, $option, $backup_file){
869
+
870
+ global $_CONFIG;
871
+ global $databases_incl, $back_path, $sql_file, $perm_file, $htaccess;
872
+
873
+ $perm_file = $_CONFIG['backups_dir']."/perm.txt";
874
+
875
+
876
+ $lines = $_REQUEST['lines'];
877
+
878
+ $fperm = fopen($perm_file,"r");
879
+
880
+
881
+ $startf = (int)$_REQUEST['startf'];
882
+
883
+ $endf = $startf + $_CONFIG['backup_refresh_number'];
884
+
885
+ $excluded_cmd = "";
886
+
887
+ if($fp = @fopen($_REQUEST['excl_manual'], "r")){
888
+
889
+ while(!feof($fp))
890
+ $excluded_cmd .= fread($fp, 1024);
891
+
892
+ fclose($fp);
893
+ }
894
+
895
+
896
+ $url = "index2.php?option=com_cloner&task=refresh&startf=$endf&lines=$lines&backup=$backup_file&excl_manual=".$_REQUEST['excl_manual'];
897
+
898
+
899
+ if($endf>=$lines)
900
+ $endf = $lines;
901
+ else
902
+ echo "Continue link: <a href='$url'>click here&gt;&gt;</a><br />";
903
+
904
+ if((int)$lines!=0)
905
+ $percent = sprintf("%d",($endf*100)/(int)$lines);
906
+
907
+
908
+ echo "Total process: $percent% out of $lines files<br />";
909
+ echo "Processing files $startf to $endf for backup file $backup_file!<br />";
910
+ echo "Current backup size: ".getFileSizeText(filesize($backup_file))."<br /><br />";
911
+
912
+ chdir($_CONFIG['backup_path']);
913
+
914
+ if($fperm){
915
+ while ((!feof($fperm))&&($line < $endf)) {
916
+
917
+ $line++;
918
+
919
+ $buffer = explode("|", fgets($fperm, 4096));
920
+
921
+ if(($line < $endf) && ($line >= $startf)){
922
+
923
+
924
+ echo $inc_message = "<br />$line. ";
925
+
926
+ if(($buffer[0]!="")&&(is_file($buffer[0]))){
927
+
928
+ $file = $buffer[0];
929
+
930
+ ### appending files
931
+ echo $inc_message = "file - $file";
932
+
933
+
934
+ if(!$_CONFIG['mem']){
935
+ #### CREATE BACKUP USING TAR LIBRARIES
936
+ $file_path_full = $buffer[0];
937
+
938
+ {
939
+
940
+ #$return = PclTarAddList($backup_file, array($file_path_full), '', $_CONFIG['backup_path'], "tar");
941
+ $tar_object = new Archive_Tar($backup_file);
942
+ $return = $tar_object->addModify(array($file_path_full), '', $_CONFIG['backup_path']);
943
+
944
+ }
945
+
946
+ #### END TAR #########################
947
+ }
948
+ else{
949
+ #### CREATE BACKUP USING SERVER UTILITIES
950
+
951
+ $file = str_replace(" ","\ ", $file);
952
+
953
+ exec($_CONFIG[tarpath]." $excluded_cmd -".$_CONFIG['tarcompress']."vf $backup_file --update $file");
954
+
955
+
956
+ #### END SERVER UTILITIES
957
+ }
958
+
959
+ }
960
+ else{
961
+
962
+ echo $inc_message = "directory - <b>".$buffer[0]."</b>";
963
+
964
+ }
965
+
966
+ }
967
+
968
+ }
969
+
970
+
971
+ #exit;
972
+
973
+ echo "<br />New backup size: ".getFileSizeText(filesize($backup_file))."<br />";
974
+
975
+
976
+ if($endf>=$lines){
977
+
978
+ ## ALL DONE
979
+ echo LM_MSG_BACK_11;
980
+ @fclose($fperm);
981
+
982
+
983
+ }
984
+ else{
985
+ ## REDIRECTING
986
+ @fclose($fperm);
987
+
988
+ echo "<br>All done, redirecting in ".$_CONFIG['refresh_time']." seconds, or <a href='$url'>click here </a>";
989
+
990
+ echo "
991
+ <script language='javascript'>
992
+ function redirect(){
993
+ window.location = '".$url."';
994
+ }
995
+
996
+ setTimeout(\"redirect()\",".$_CONFIG['refresh_time']."000);
997
+
998
+ </script>";
999
+
1000
+
1001
+ }
1002
+
1003
+ }
1004
+ else{
1005
+
1006
+ echo "Unable to continue, could not open file $perm_file for reading!";
1007
+
1008
+ }
1009
+
1010
+ if($endf>=$lines){
1011
+ $back_path = $_CONFIG['backups_dir'];
1012
+ @unlink($back_path."/database-sql.sql");
1013
+ @unlink($back_path."/perm.txt");
1014
+ @unlink($back_path."/htaccess.txt");
1015
+ @unlink($back_path."/.excl");
1016
+ @unlink($back_path."/.excl_tar");
1017
+ }
1018
+ return;
1019
+
1020
+ }
1021
+
1022
+
1023
+ function generateBackup( $cid, $option ) {
1024
+ // ----------------------------------------------------------
1025
+ // Routine to generate recurse a folder structure and record
1026
+ // the files, their sizes and parent folders
1027
+ // ----------------------------------------------------------
1028
+ global $_CONFIG;
1029
+
1030
+
1031
+ # generate database backup if required
1032
+
1033
+ if(!$_CONFIG['enable_db_backup']){
1034
+
1035
+ $backupDatabase = 0;
1036
+
1037
+ }else{
1038
+
1039
+ $backupDatabase = $_REQUEST['dbbackup'];
1040
+
1041
+ }
1042
+
1043
+ if($_REQUEST[cron_access]){
1044
+
1045
+ $_CONFIG['backup_refresh'] = 0;
1046
+
1047
+ $_REQUEST['dbbackup_drop'] = $_CONFIG['cron_sql_drop'];
1048
+
1049
+ if($_CONFIG[cron_btype] == '1')
1050
+ $backupDatabase = 0;
1051
+ }
1052
+
1053
+
1054
+ if(!is_writeable($_CONFIG['clonerPath'])){
1055
+ E_print( "Your backup directory ".$_CONFIG['clonerPath']." is not writeable or does not exists!");
1056
+ return;
1057
+ }
1058
+ if(!is_writeable($_CONFIG['backups_dir'])){
1059
+ E_print( "Required sql backup directory ".$_CONFIG['backups_dir']." is not writeable or does not exists!");
1060
+ return;
1061
+ }
1062
+
1063
+
1064
+ # generate the backup set filename
1065
+ #$urlinfo = parse_url($mosConfig_live_site);
1066
+ #$domainname = strtolower(str_replace('.','_',$urlinfo[host]));
1067
+ #$domainname= $_SERVER['HTTP_HOST'];
1068
+ $domainname= $_CONFIG['mosConfig_live_site'];
1069
+
1070
+
1071
+ if(($_CONFIG['mem']) && ($_CONFIG['backup_refresh'])){
1072
+
1073
+ $f_ext = '.tar';
1074
+ $_CONFIG['tarcompress'] = '';
1075
+
1076
+ }elseif($_CONFIG['backup_compress']){
1077
+
1078
+ $f_ext = '.tgz';
1079
+ $_CONFIG['tarcompress'] = 'z';
1080
+
1081
+ }else{
1082
+
1083
+ $f_ext = '.tar';
1084
+ $_CONFIG['tarcompress'] = '';
1085
+ }
1086
+
1087
+ /*if($_CONFIG['backup_refresh']){
1088
+ $f_ext = ".tar";
1089
+ }
1090
+ elseif($_REQUEST[cron_dbonly]){
1091
+ $f_ext = ".tar";
1092
+ }
1093
+ else{
1094
+ $f_ext = ".tgz";
1095
+ }*/
1096
+
1097
+ if($_REQUEST['bname']==""){
1098
+
1099
+ if($backupDatabase == 1){
1100
+ if($_REQUEST['dbbackup_drop']){
1101
+ $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-sql-drop'.$f_ext;
1102
+ }
1103
+ else{
1104
+ $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-sql-nodrop'.$f_ext;
1105
+ }
1106
+ }
1107
+ else
1108
+ $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-nosql'.$f_ext;
1109
+ }
1110
+ else{
1111
+ $filename1 = $_REQUEST['bname'].$f_ext;
1112
+ }
1113
+
1114
+ $sql_file = array();
1115
+
1116
+ if ($backupDatabase == 1) {
1117
+ $tables = array(); $tables[0] = 'all';
1118
+ $excltables = $_REQUEST['excltables'];
1119
+
1120
+ $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult, 'database' , $excltables, $_CONFIG['mysql_database']);
1121
+
1122
+ $databaseResult = "<b>".$_CONFIG['mysql_database'].":</b> ".$databaseResult;
1123
+ ############## ADD multiple databases #######################
1124
+ $databases_incl = $_REQUEST['databases_incl'];
1125
+
1126
+ if(is_array($databases_incl)){
1127
+ foreach($databases_incl as $database_name)
1128
+ if($database_name!=''){
1129
+
1130
+ $excltables = "";
1131
+ mysql_query("USE $database_name");
1132
+
1133
+ $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult_incl, $database_name , $excltables, $database_name);
1134
+
1135
+ $databaseResult .= "<br /> <b>$database_name:</b> ".$databaseResult_incl;
1136
+
1137
+ }
1138
+
1139
+ mysql_query("USE ".$_CONFIG['mysql_database']);
1140
+
1141
+ }
1142
+
1143
+
1144
+ } else {
1145
+ $databaseResult = LM_DATABASE_EXCLUDED;
1146
+ }
1147
+
1148
+
1149
+ $excluded = array();
1150
+
1151
+ $data = "";
1152
+
1153
+ $excluded[] = $_CONFIG['backups_dir']."/".$filename1;
1154
+
1155
+ if($_REQUEST['cron_access']){
1156
+
1157
+ $data = $_CONFIG['cron_exclude'];
1158
+
1159
+ }
1160
+ elseif($_CONFIG[select_folders] == 1){
1161
+
1162
+ $data = $_REQUEST['exluded'];
1163
+
1164
+ }
1165
+
1166
+ ##### START THE EXCLUSION FILTER
1167
+ if(($fp = @fopen($_CONFIG['exfile'],"r"))&&(!$_REQUEST['cron_access'])){
1168
+
1169
+ while(!feof($fp)){
1170
+ $data .= fread($fp, 1024);
1171
+ }
1172
+ fclose($fp);
1173
+ }
1174
+
1175
+ if(sizeof($_REQUEST[cid])>0)
1176
+ $data .=implode("\r\n", $_REQUEST[cid]);
1177
+
1178
+ $_COOKIES = explode("\r\n", $data);
1179
+
1180
+
1181
+ if(is_array($_COOKIES))
1182
+ foreach($_COOKIES as $key=>$value)
1183
+ if($value != ""){
1184
+
1185
+ $value = str_replace($_CONFIG['backup_path'], "", $value);
1186
+ if($value [0] !='/')
1187
+ $value = '/'.$value;
1188
+
1189
+ if((substr($value, strlen($value)-1, 1) == '/')&&(strlen($value)!=1))
1190
+ $value = substr($value, 0 , strlen($value)-1);
1191
+
1192
+ if(($value!="")&&($value!='/administrator/backups')){
1193
+
1194
+ if(trim($value) != '/administrator')
1195
+ $excluded[] = str_replace("//","/",$_CONFIG['backup_path']."/".$value);
1196
+ else{
1197
+ if ($handle = opendir($_CONFIG['backup_path'].'/administrator')) {
1198
+ while (false !== ($file = readdir($handle))) {
1199
+ if ($file != "." && $file != ".." && $file != "backups") {
1200
+ $excluded[] = str_replace("//","/",$_CONFIG['backup_path']."/administrator/".$file);
1201
+ }
1202
+ }
1203
+ closedir($handle);
1204
+ }
1205
+
1206
+ }
1207
+
1208
+ }
1209
+
1210
+ }
1211
+ #### END EXCLUSION FILTER
1212
+
1213
+ if(!$_CONFIG['add_backups_dir'])
1214
+ {
1215
+ # initialise list arrays, directories and files separately and array counters for them
1216
+ $d_arr = array(); $d = 0;
1217
+ $f_arr = array(); $f = 0;
1218
+ $s_arr = array(); $s = 0;
1219
+
1220
+ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);;
1221
+ $i = 0;
1222
+ while($i<sizeof($f_arr)){
1223
+
1224
+ $excluded[] = $_CONFIG['clonerPath']."/".$f_arr[$i];
1225
+ $i++;
1226
+
1227
+ }
1228
+
1229
+ }
1230
+ # obtain list of folders included in the backup
1231
+ $includeFolder = array();
1232
+
1233
+ #print_r($excluded);exit;
1234
+
1235
+ #$includeFolder = confirmBackup('nohtml');
1236
+
1237
+ #initialise list arrays, directories and files separately and array counters for them
1238
+ $d_arr = array(); $d = 0;
1239
+ $ds_arr = array();
1240
+ $f_arr = array(); $f = 0;
1241
+ $s_arr = array(); $s = 0;$mdir=0;
1242
+
1243
+ $perm_file = $_CONFIG['backups_dir']."/perm.txt";
1244
+ @unlink($perm_file);
1245
+ $fperm = fopen($perm_file,"w");
1246
+
1247
+ for($i=0; $i<sizeof($excluded); $i++ ){
1248
+
1249
+ $excluded[$i] = str_replace("//", "/", $excluded[$i]);
1250
+ }
1251
+ #print_r($excluded);exit;
1252
+ # obtain the list of files by recursing the mambo file store
1253
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includeFolder, '', $excluded, $fperm);
1254
+
1255
+ @fclose($fperm);
1256
+
1257
+ @chmod($perm_file, 0777);
1258
+
1259
+
1260
+ # format total archive size
1261
+ $originalSize = getFileSizeText($s);
1262
+
1263
+ # extend the file locations to include the full path
1264
+
1265
+ for( $i=0; $i < count( $f_arr ); $i++ ) {
1266
+
1267
+ if(!file_exists($f_arr[$i])){
1268
+ unset($f_arr[$i]);
1269
+ }
1270
+
1271
+
1272
+ }
1273
+
1274
+
1275
+
1276
+
1277
+ #if((file_exists($perm_file))&&(!in_array($perm_file, $f_arr)))
1278
+ # $f_arr[] = $perm_file;
1279
+
1280
+
1281
+ # add sql file to the backup
1282
+
1283
+ if($_REQUEST[cron_access]){
1284
+
1285
+ if(is_array($sql_file))
1286
+ foreach($sql_file as $key=>$sqlfile)
1287
+ if(($backupDatabase == 1)&&(!in_array($_CONFIG['backups_dir'].$sqlfile, $f_arr)))
1288
+ $f_arr[] = $sqlfile;
1289
+
1290
+ }
1291
+
1292
+
1293
+
1294
+ $filename = $_CONFIG['clonerPath'].'/'.$filename1;
1295
+
1296
+ $f_arr = array_unique($f_arr);
1297
+
1298
+ # create the Zip file from the fileset array
1299
+ @unlink($filename);
1300
+
1301
+ $perm_lines = 0;
1302
+
1303
+ $handle = @fopen($perm_file, "r");
1304
+
1305
+ if ($handle) {
1306
+
1307
+ while (!feof($handle)) {
1308
+ fgets($handle, 4096);
1309
+ $perm_lines++;
1310
+ }
1311
+
1312
+ fclose($handle);
1313
+
1314
+ }
1315
+
1316
+
1317
+ if(!$_CONFIG['mem']){
1318
+ #### START TAR MANUAL MODE ############################################################
1319
+
1320
+ if($_CONFIG['backup_refresh']){
1321
+
1322
+ $f_arr = array($_CONFIG['backups_dir']."/index.html");
1323
+
1324
+ }
1325
+
1326
+
1327
+ if($_CONFIG['backup_refresh'])
1328
+ $tar_type= "tar";
1329
+ else
1330
+ $tar_type= "tgz";
1331
+
1332
+
1333
+ $tar_object = new Archive_Tar($filename, compression($tar_type));
1334
+ #$tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
1335
+ $return = $tar_object->addModify($f_arr, '', $_CONFIG['backup_path']);
1336
+
1337
+ if($return != 1){
1338
+
1339
+ echo "Backup failed using tar mode, error code $return!";
1340
+
1341
+ }
1342
+
1343
+
1344
+
1345
+ if($_CONFIG['backup_refresh']){
1346
+
1347
+ echo "Starting the manual backup process!<br />";
1348
+ echo "Database backup: ".$databaseResult."<br /><br />";
1349
+
1350
+ if(file_exists($filename))
1351
+ {
1352
+
1353
+ echo "Backup $filename created, we may continue!<br />";
1354
+ #echo "Database backup: ".$databaseResult ."<br />";
1355
+ echo "<a href='index2.php?option=com_cloner&lines=".$perm_lines."&task=refresh&backup=$filename&excl_manual=$excl_manual'>Please click here to continue!</a>";
1356
+ return;
1357
+
1358
+ }
1359
+ else
1360
+ {
1361
+
1362
+ E_print( "Backup failed, please check your tar server utility support!");
1363
+ return ;
1364
+
1365
+ }
1366
+
1367
+ }
1368
+
1369
+
1370
+ #### END TAR MODE ############################################################
1371
+ }
1372
+ else{
1373
+ #### CREATE BACKUP USING SERVER UTILITIES
1374
+ $i=0;
1375
+ chdir($_CONFIG['backup_path']);
1376
+
1377
+ $excl_files = "";
1378
+ while($i<sizeof($excluded)){
1379
+ $file = $excluded[$i];
1380
+ $file = str_replace($_CONFIG['backup_path'],"",$file);
1381
+ $file = "##".$file;
1382
+ $file = str_replace("##//","",$file);
1383
+ $file = str_replace("##/","",$file);
1384
+ $file = str_replace("##","",$file);
1385
+
1386
+ $excl_files .= "/".$file."* ";
1387
+
1388
+ $i++;
1389
+ }
1390
+
1391
+
1392
+ chdir($_CONFIG['backup_path']);
1393
+
1394
+ $excl_cmd = "";
1395
+
1396
+ if($fp = fopen($_CONFIG['exfile_tar'], "w")){
1397
+ $i = 0;
1398
+ while($i<sizeof($excluded)){
1399
+ $file = $excluded[$i];
1400
+ $file = str_replace($_CONFIG['backup_path'],"",$file);
1401
+ $file = "##".$file;
1402
+ $file = str_replace("##//","",$file);
1403
+ $file = str_replace("##/","",$file);
1404
+ $file = str_replace("##","",$file);
1405
+
1406
+ $excl_cmd .= " --exclude=./".$file." ";
1407
+
1408
+ $excl_files = "./".$file."\r\n";
1409
+ fwrite($fp, $excl_files);
1410
+ $i++;
1411
+ }
1412
+
1413
+ fclose($fp);
1414
+ }
1415
+
1416
+
1417
+
1418
+ if($_CONFIG['backup_refresh']){
1419
+ ########## STARTING THE MANUAL BACKUP ######################################################
1420
+
1421
+
1422
+ $exclude = $excl_cmd ." -X ".$_CONFIG['exfile_tar'];
1423
+
1424
+ $excl_manual = $_CONFIG['exfile_tar']."_manual";
1425
+
1426
+ if($fp = fopen($excl_manual, "w")){
1427
+
1428
+ fwrite($fp, $exclude);
1429
+
1430
+ fclose($fp);
1431
+ }
1432
+
1433
+
1434
+
1435
+ echo "Starting the manual backup process!<br />";
1436
+ echo "Database backup: ".$databaseResult."<br /><br />";
1437
+
1438
+ chdir($_CONFIG['backup_path']);
1439
+
1440
+ #$filename = str_replace(".tgz",".tar",$filename);
1441
+
1442
+ exec($_CONFIG[tarpath]." $exclude -c".$_CONFIG['tarcompress']."vf $filename ./administrator/backups/index.html");
1443
+ exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/database-sql.sql");
1444
+ exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/htaccess.txt");
1445
+ exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/perm.txt");
1446
+
1447
+ if(file_exists($filename))
1448
+ {
1449
+ echo "Backup $filename created, we may continue!<br />";
1450
+ #echo "Database backup: ".$databaseResult."<br />" ;
1451
+ echo "<a href='index2.php?option=com_cloner&lines=".$perm_lines."&task=refresh&backup=$filename&excl_manual=$excl_manual'>Please click here to continue!</a>";
1452
+ return;
1453
+ }
1454
+ else{
1455
+ E_print( "Backup failed, please check your tar server utility support!"); return ;
1456
+ }
1457
+
1458
+ return;
1459
+
1460
+ }
1461
+
1462
+
1463
+ if($_REQUEST[cron_dbonly]!=1){
1464
+
1465
+ exec($_CONFIG[tarpath]." $excl_cmd "." -X ".$_CONFIG['exfile_tar']." -chv".$_CONFIG['tarcompress']."f $filename ./");
1466
+
1467
+ }else{
1468
+
1469
+ exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."cvf $filename ./administrator/backups/database-sql.sql");
1470
+
1471
+ if(is_array($databases_incl)){
1472
+ foreach($databases_incl as $database_name)
1473
+ if($database_name!="") {
1474
+ exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/".$database_name."-sql.sql");
1475
+ }
1476
+ }
1477
+
1478
+ }
1479
+
1480
+ #######END
1481
+
1482
+
1483
+ chdir($_CONFIG['script_path']);
1484
+ #### END
1485
+ }
1486
+
1487
+ if(!file_exists($filename)){
1488
+ if($_CONFIG[archive_type]==1)
1489
+ echo LM_MSG_BACK_12;
1490
+ else
1491
+ echo LM_MSG_BACK_13;
1492
+ return;
1493
+ }
1494
+ # format the compressed size of the fileset
1495
+ $archiveSize = getFileSizeText(filesize($filename));
1496
+
1497
+
1498
+
1499
+ # load presentation layer
1500
+ if($option!='nohtml'){
1501
+
1502
+ HTML_cloner::generateBackup($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option );
1503
+
1504
+ }else{
1505
+
1506
+ logxx(HTML_cloner::generateBackup_text($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option ));
1507
+
1508
+ }
1509
+
1510
+ if(is_array($databases_incl)){
1511
+ foreach($databases_incl as $database_name){
1512
+ @unlink($_CONFIG['backups_dir']."/".$database_name."-sql.sql");
1513
+ }
1514
+ }
1515
+ @unlink($_CONFIG['backups_dir']."/database-sql.sql");
1516
+ @unlink($sql_file);
1517
+ @unlink($perm_file);
1518
+ @unlink($htaccess);
1519
+ @unlink($_CONFIG['exfile']);
1520
+ @unlink($_CONFIG['exfile_tar']);
1521
+ return $filename1;
1522
+
1523
+
1524
+ }
1525
+
1526
+ function showHelp( $option ) {
1527
+ // ----------------------------------------------------------
1528
+ // Display the Help Screen
1529
+ // ----------------------------------------------------------
1530
+
1531
+ # load presentation layer
1532
+ HTML_cloner::showHelp( $option );
1533
+ }
1534
+
1535
+
1536
+ function multidimsort(&$a)
1537
+ {
1538
+ sort($a);
1539
+ $c = count($a);
1540
+ for($i = 0; $i < $c; $i++)
1541
+ if (is_array($a[$i]))
1542
+ multidimsort($a[$i]);
1543
+ }
1544
+
1545
+ function compression($ext){
1546
+
1547
+ switch ($ext){
1548
+
1549
+ case 'tar': $compresion = 'false'; break;
1550
+
1551
+ case 'tgz': $compresion = 'true'; break;
1552
+
1553
+ default: $compresion = 'false'; break;
1554
+
1555
+ }
1556
+
1557
+ return $compression;
1558
+ }
1559
+
1560
+ function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $excluded=array(), $fperm = '') {
1561
+ // ----------------------------------------------------------
1562
+ // Routine to recurse a folder structure and record the files
1563
+ // their sizes and parent folders
1564
+ // ----------------------------------------------------------
1565
+ global $mdir, $_CONFIG;
1566
+
1567
+ $currentfullpath = $_CONFIG['backup_path'].$path;
1568
+
1569
+ # Open possibly available directory
1570
+ if((is_dir( $currentfullpath ) )&&(!is_link($currentfullpath))) {
1571
+ if( $handle = @opendir( $currentfullpath ) ) {
1572
+ while( false !== ( $file = readdir( $handle ) ) ) {
1573
+ # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1574
+ if( ($file != "." && $file != "..") ) {
1575
+ $exc =0;
1576
+ $cfile = $currentfullpath . "/" . $file;
1577
+ if(sizeof($excluded)!=0)
1578
+ {
1579
+ foreach($excluded as $key=>$value){
1580
+
1581
+ if(($value!='')&&(!$exc)){
1582
+ $cfile = str_replace("//", "/", $cfile);
1583
+ if((strstr($cfile, $value)!='')||(strstr($cfile."/", $value)!='')){
1584
+ $exc=1; break;
1585
+ }
1586
+ }
1587
+ }
1588
+ }
1589
+ if(( @is_dir( $cfile ) ) && (!@is_link($currentfullpath))) {
1590
+
1591
+ # Create array for directories
1592
+ if(($fperm)&&(!$exc)){
1593
+
1594
+ $perm = substr(sprintf('%o', fileperms($cfile)), -4);
1595
+
1596
+ fwrite($fperm, str_replace($_CONFIG['backup_path'], "" , $cfile)."|".$perm."\n");
1597
+
1598
+ }
1599
+
1600
+ #$d_arr[++$d] = $cfile;
1601
+
1602
+ if(!$exc)
1603
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $excluded, $fperm);
1604
+ } else {
1605
+ #if ( in_array($currentfullpath, $includedFolders) )
1606
+ {
1607
+
1608
+ # Create array for files
1609
+
1610
+ if(($fperm)&&(!$exc)){
1611
+
1612
+ $perm = substr(sprintf('%o', @fileperms($cfile)), -4);
1613
+
1614
+ #$sfile = sprintf("%.2f",get_filesize($cfile)/1024);
1615
+
1616
+ fwrite($fperm, str_replace($_CONFIG['backup_path'], "" , $cfile)."|".$perm."\n");
1617
+
1618
+ }
1619
+ if(!$exc){
1620
+
1621
+ #$s_arr[$f] = @filesize($cfile);
1622
+
1623
+ if((!$_CONFIG['mem']) && ($_CONFIG['backup_refresh'] != 1 )){
1624
+
1625
+ $f_arr[$f++] = $cfile;
1626
+
1627
+ }else{
1628
+
1629
+ $f++;
1630
+
1631
+ }
1632
+
1633
+
1634
+ $s += @filesize($cfile);
1635
+
1636
+ }
1637
+
1638
+
1639
+
1640
+ }
1641
+ }
1642
+ }
1643
+ }
1644
+ }
1645
+ # Wrap things up if we're in a directory
1646
+ #if( is_dir( $currentfullpath ) )
1647
+ @closedir( $handle );
1648
+ }
1649
+ }
1650
+
1651
+ function get_filesize($path){
1652
+
1653
+ $sizeInBytes = filesize($path);
1654
+ if (!$sizeInBytes) {
1655
+ $command = "ls -l \"$path\" | cut -d \" \" -f 6";
1656
+ $sizeInBytes = @exec($command);
1657
+ }
1658
+
1659
+ return $sizeInBytes;
1660
+
1661
+ }
1662
+
1663
+ function getBackupFiles(&$d_arr, &$f_arr, &$s_arr, &$d, &$f) {
1664
+ // ----------------------------------------------------------
1665
+ // Routine to list the existing backup files in the Component
1666
+ // Backup folder
1667
+ // ----------------------------------------------------------
1668
+ global $_CONFIG;
1669
+
1670
+ $path = $_CONFIG['clonerPath'];
1671
+ # Open possibly available directory
1672
+ if( is_dir( $path ) ) {
1673
+ if( $handle = opendir( $path ) ) {
1674
+ while( false !== ( $file = readdir( $handle ) ) ) {
1675
+ # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1676
+ if( $file != "." && $file != ".." && $file[0] != "." ) {
1677
+ if( is_dir( $path . "/" . $file ) )
1678
+ # Create array for directories
1679
+ $d_arr[$d++] = $file;
1680
+ else
1681
+ if ((strstr($file, '.zip' ))||(strstr($file, '.tgz' ))||(strstr($file, '.tar' ))) {
1682
+ # Create array for files
1683
+ $f_arr[$f++] = $file;
1684
+ }
1685
+ }
1686
+ }
1687
+ }
1688
+ }
1689
+
1690
+ # Wrap things up if we're in a directory
1691
+ if( is_dir( $path ) )
1692
+ closedir( $handle );
1693
+ sort($f_arr);
1694
+ # Print file list
1695
+ for( $i=0; $i < count( $f_arr ); $i++ ) {
1696
+ $s_arr[$i] = getFileSizeText(get_filesize( $path . "/" . $f_arr[$i] ));
1697
+ }
1698
+ }
1699
+
1700
+
1701
+ function getFileSizeText($filesize) {
1702
+ // ----------------------------------------------------------
1703
+ // Routine to display a formatted version of a filesize
1704
+ // ----------------------------------------------------------
1705
+
1706
+ if( $filesize >= 1024 && $filesize < 1048576) {
1707
+ # Size in kilobytes
1708
+ return round( $filesize / 1024, 2 ) . " KB";
1709
+ } elseif( $filesize >= 1048576 ) {
1710
+ # Size in megabytes
1711
+ return round( $filesize / 1024 / 1024, 2 ) . " MB";
1712
+ } else {
1713
+ # Size in bytes
1714
+ return $filesize . " bytes";
1715
+ }
1716
+ }
1717
+
1718
+ function doBackup( $tables, $OutType, $OutDest, $toBackUp, $UserAgent, $local_backup_path, &$databaseResult, $backupname, $excltables = array(), $dbname) {
1719
+ global $database, $mosConfig_db, $mosConfig_sitename, $version,$option,$task, $mosConfig_dbprefix, $_CONFIG,$mosConfig_user,$mosConfig_password,$mosConfig_host;
1720
+
1721
+
1722
+ if (!$tables[0])
1723
+ {
1724
+ $databaseResult = LM_DATABASE_MISSING_TABLES;
1725
+ return;
1726
+ }
1727
+
1728
+
1729
+ /* Determine the mime type and file extension for the output file */
1730
+
1731
+ if ($OutType == "zip") {
1732
+ $filename = $backupname ."-sql". ".zip";
1733
+
1734
+ } elseif ($OutType == "html") {
1735
+ $filename = $backupname ."-sql". ".html";
1736
+
1737
+ } else {
1738
+ $filename = $backupname ."-sql". ".sql";
1739
+
1740
+ };
1741
+
1742
+
1743
+ $sqlfile = "$local_backup_path/$filename";
1744
+ @unlink($sqlfile);
1745
+ /* Store all the tables we want to back-up in variable $tables[] */
1746
+
1747
+ if ($tables[0] == "all") {
1748
+ array_pop($tables);
1749
+ $query = mysql_query("SHOW tables");
1750
+ while($row = mysql_fetch_array($query)){
1751
+
1752
+ $tables_list[] = $row[0];
1753
+
1754
+ }
1755
+
1756
+
1757
+ $tables = array_merge($tables, $tables_list);
1758
+ }
1759
+ $newtables = array();
1760
+
1761
+ #if(is_array($excltables))
1762
+ foreach($tables as $key=>$value){
1763
+ if(is_array($excltables)){
1764
+ if(!in_array($value, $excltables))
1765
+ $newtables[] = $value;
1766
+ }
1767
+ else
1768
+ $newtables[] = $value;
1769
+
1770
+ }
1771
+
1772
+
1773
+ if(sizeof($tables) == sizeof($newtables))
1774
+ $ex_dump = "";
1775
+ else
1776
+ $ex_dump = @implode(" ",$newtables);
1777
+ $tables = $newtables;
1778
+
1779
+ if($_REQUEST['dbbackup_drop']){
1780
+ $drop = " --add-drop-table";
1781
+ }
1782
+ else{
1783
+ $drop = "";
1784
+ }
1785
+
1786
+ if($_REQUEST['dbbackup_comp']){
1787
+
1788
+ $drop .= " --compatible=".strtolower($_REQUEST['dbbackup_comp'])." ";
1789
+
1790
+ }
1791
+
1792
+ if($_CONFIG['sql_mem']){
1793
+ exec ($_CONFIG[sqldump]." -h ".$_CONFIG['mysql_host']." -u ".$_CONFIG['mysql_user']." -p".$_CONFIG['mysql_pass']." ".$dbname." > ".$sqlfile ." $drop --allow-keywords ". $ex_dump);
1794
+
1795
+ if(filesize($sqlfile))
1796
+ $databaseResult = LM_DATABASE_BACKUP_COMPLETED.' ( '.getFileSizeText(filesize($sqlfile)).' )';
1797
+ else
1798
+ $databaseResult = LM_MSG_BACK_14;
1799
+
1800
+ exec("chmod 777 $sqlfile");
1801
+
1802
+ return $sqlfile;
1803
+ }
1804
+
1805
+ /*Added some default values for quotes and auto_increment problems*/
1806
+ mysql_query("SET SQL_QUOTE_SHOW_CREATE=1;");
1807
+ mysql_query("SET sql_mode = 0;");
1808
+
1809
+ if($_REQUEST['dbbackup_comp'])
1810
+ {
1811
+
1812
+ mysql_query("SET sql_mode=".$_REQUEST['dbbackup_comp'].";");
1813
+
1814
+ }
1815
+
1816
+
1817
+ /* Store the "Create Tables" SQL in variable $CreateTable[$tblval] */
1818
+ if ($toBackUp!="data")
1819
+ {
1820
+ foreach ($tables as $tblval)
1821
+ {
1822
+ $query = mysql_query("SHOW CREATE table `$tblval`");
1823
+ $row = mysql_fetch_array($query);
1824
+ $CreateTable[$tblval] = $row[1];
1825
+ }
1826
+ }
1827
+
1828
+ /* Store all the FIELD TYPES being backed-up (text fields need to be delimited) in variable $FieldType*/
1829
+ if ($toBackUp!="structure")
1830
+ {
1831
+ foreach ($tables as $tblval)
1832
+ {
1833
+ $query = mysql_query("SHOW FIELDS FROM $tblval");
1834
+ while($row = mysql_fetch_row($query)){
1835
+
1836
+ $fields[] = $row[0];
1837
+
1838
+ }
1839
+ foreach($fields as $field)
1840
+ {
1841
+ $FieldType[$tblval][$field->Field] = preg_replace("/[(0-9)]/",'', $field->Type);
1842
+ }
1843
+ }
1844
+ }
1845
+
1846
+
1847
+ if ($OutDest == "local") {
1848
+
1849
+
1850
+
1851
+ $fp = fopen($sqlfile, "w");
1852
+ if (!$fp) {
1853
+ $databaseResult = LM_DATABASE_BACKUP_FAILED;
1854
+ return ;
1855
+ }
1856
+ }
1857
+
1858
+ /* Build the fancy header on the dump file */
1859
+ $OutBuffer = "";
1860
+ if ($OutType == 'html') {
1861
+ } else {
1862
+ $OutBuffer .= "#\n";
1863
+ $OutBuffer .= "# Powered by XCloner Site Backup\n";
1864
+ $OutBuffer .= "# http://www.joomlaplug.com\n";
1865
+ $OutBuffer .= "#\n";
1866
+ $OutBuffer .= "# Host: ".$_SERVER['HTTP_HOST']."\n";
1867
+ $OutBuffer .= "# Generation Time: " . date("M j, Y \a\\t H:i") . "\n";
1868
+ $OutBuffer .= "# Server version: " . getVersion() . "\n";
1869
+ $OutBuffer .= "# PHP Version: " . phpversion() . "\n";
1870
+ $OutBuffer .= "# Database : `" . $dbname . "`\n# --------------------------------------------------------\n";
1871
+ }
1872
+ fwrite($fp, $OutBuffer);
1873
+ unset($OutBuffer);
1874
+
1875
+ /* Okay, here's the meat & potatoes */
1876
+ foreach ($tables as $tblval) {
1877
+ if ($toBackUp != "data") {
1878
+ if ($OutType == 'html') {
1879
+ } else {
1880
+ $OutBuffer .= "#\n# Table structure for table `$tblval`\n#\n";
1881
+ if($_REQUEST['dbbackup_drop'])
1882
+ $OutBuffer .= "#\nDROP table IF EXISTS $tblval;\n";
1883
+
1884
+ $OutBuffer .= $CreateTable[$tblval].";\r\n";
1885
+ }
1886
+ }
1887
+ fwrite($fp, $OutBuffer);
1888
+ unset($OutBuffer);
1889
+
1890
+
1891
+ if ($toBackUp != "structure") {
1892
+
1893
+ $OutBuffer .= "#\n# Dumping data for table `$tblval`\n#\n";
1894
+ $query = @mysql_query("SELECT * FROM $tblval");
1895
+
1896
+ while($row = @mysql_fetch_array($query, MYSQL_ASSOC))
1897
+ {
1898
+
1899
+ $InsertDump = "INSERT INTO $tblval VALUES (";
1900
+ $arr =$row;
1901
+ foreach($arr as $key => $value)
1902
+ {
1903
+ $value = addslashes( $value );
1904
+ $value = str_replace( "\n", '\r\n', $value );
1905
+ $value = str_replace( "\r", '', $value );
1906
+ #if (@preg_match ("/\b" . $FieldType[$tblval][$key] . "\b/i", "DATE TIME DATETIME CHAR VARCHAR TEXT TINYTEXT MEDIUMTEXT LONGTEXT BLOB TINYBLOB MEDIUMBLOB LONGBLOB ENUM SET"))
1907
+ {
1908
+ $InsertDump .= "'$value',";
1909
+ }
1910
+ /*else
1911
+ {
1912
+ $InsertDump .= "'$value',";
1913
+ } */
1914
+ }
1915
+ $OutBuffer .= rtrim($InsertDump,',') . ");\n";
1916
+ fwrite($fp, $OutBuffer);
1917
+ unset($OutBuffer);
1918
+ $i++;
1919
+ }
1920
+ }
1921
+ }
1922
+
1923
+ if ($OutDest == "local") {
1924
+
1925
+
1926
+ #fwrite($fp, $OutBuffer);
1927
+ fclose($fp);
1928
+
1929
+ @chmod($sqlfile, 0777);
1930
+
1931
+ $databaseResult = LM_DATABASE_BACKUP_COMPLETED.' ( '.getFileSizeText(filesize($sqlfile)).' )';
1932
+ return $sqlfile;
1933
+
1934
+ }
1935
+ }
1936
+
1937
+
1938
+ function getVersion(){
1939
+
1940
+ $query = mysql_query("SELECT version()");
1941
+ $row = mysql_fetch_array($query);
1942
+ return $row[0];
1943
+
1944
+ }
1945
+
1946
+ ?>
common.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
8
+ * Email: admin@joomlaplug.com
9
+ * Revision: 1.0
10
+ * Date: July 2007
11
+ **/
12
+ if ((!extension_loaded('zlib')) &&(function_exists('ob_start'))) {
13
+ ob_end_clean();
14
+ ob_start('ob_gzhandler');
15
+ }
16
+
17
+ ####################################
18
+
19
+ $_CONFIG['multiple_config_dir'] = "configs";
20
+ $strlen = strlen($_CONFIG['backup_path']);
21
+ if((substr($_CONFIG['backup_path'], $strlen-1, $strlen) != '/') && (substr($_CONFIG['backup_path'], $strlen-1, $strlen) != '\\'))
22
+ $_CONFIG['backup_path'] .= "/";
23
+
24
+ $_CONFIG['backups_dir'] = $_CONFIG['backup_path']."/administrator/backups";#$_CONFIG['clonerPath'];#$_CONFIG['backup_path']."/backups";
25
+ $_CONFIG['exfile'] = $_CONFIG['backups_dir']."/.excl";
26
+ $_CONFIG['exfile_tar'] = $_CONFIG['backups_dir']."/.excl_tar";
27
+ $_CONFIG['script_path'] = str_replace("\\","/",dirname(__FILE__));
28
+
29
+ $lang_dir = "language";
30
+
31
+ $task = $_REQUEST['task'];
32
+ ####################################
33
+
34
+
35
+ if($_CONFIG['enable_db_backup']){
36
+
37
+ ### Connecting to the mysql server
38
+ @mysql_connect($_CONFIG['mysql_host'], $_CONFIG['mysql_user'], $_CONFIG['mysql_pass']) or
39
+ E_print("Could not connect: " . mysql_error());
40
+ @mysql_select_db($_CONFIG['mysql_database']) or E_print("Unable to select database ".$_CONFIG['mysql_database']);
41
+ @mysql_query("SET NAMES 'utf8'");
42
+ }
43
+
44
+
45
+ ### loading language
46
+ if($_CONFIG['select_lang']!="")
47
+
48
+ $mosConfig_lang = $_CONFIG['select_lang'];
49
+
50
+ if (file_exists( "language/".$mosConfig_lang.".php" )) {
51
+
52
+ include_once( "language/".$mosConfig_lang.".php" );
53
+
54
+ @include_once( "language/english.php" );
55
+
56
+ }
57
+
58
+ else{
59
+
60
+ include_once( "language/english.php" );
61
+
62
+ }
63
+
64
+ ?>
configs/index.html ADDED
File without changes
css/dtree.css ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .dtree {
2
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
3
+ font-size: 11px;
4
+ color: #666;
5
+ white-space: nowrap;
6
+ }
7
+ .dtree img {
8
+ border: 0px;
9
+ vertical-align: middle;
10
+ }
11
+ .dtree a {
12
+ color: #333;
13
+ text-decoration: none;
14
+ }
15
+ .dtree a.node, .dtree a.nodeSel {
16
+ white-space: nowrap;
17
+ padding: 1px 2px 1px 2px;
18
+ }
19
+ .dtree a.node:hover, .dtree a.nodeSel:hover {
20
+ color: #333;
21
+ text-decoration: underline;
22
+ }
23
+ .dtree a.nodeSel {
24
+ background-color: #c0d2ec;
25
+ }
26
+
27
+ .menu_table {
28
+ border-width: 1px 1px 1px 1px;
29
+ border-spacing: 2px;
30
+ border-style: outset outset outset outset;
31
+ border-color: gray gray gray gray;
32
+ border-collapse: separate;
33
+ background-color: white;
34
+ }
css/main.css ADDED
@@ -0,0 +1,686 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ td.test a{
2
+
3
+ color: white;
4
+
5
+ }
6
+
7
+ td.test a.hover{
8
+
9
+ color: orange;
10
+
11
+ }
12
+
13
+
14
+ td.test {
15
+
16
+ border: 2px solid gray;
17
+
18
+ background: #a0a0a0;
19
+
20
+ padding: 20px 30px 20px 20px;
21
+
22
+ text-align:center;
23
+
24
+ color: red;
25
+
26
+ }
27
+
28
+ td.test2 {
29
+
30
+ border: 2px solid white;
31
+
32
+ background: #dcdcdc;
33
+
34
+ padding: 20px 30px 20px 20px;
35
+
36
+ text-align:center;
37
+
38
+ }
39
+
40
+
41
+
42
+ /**
43
+ * @version $Id: template_css.css 1594 2005-12-31 04:51:00Z stingrey $
44
+ * @package Joomla
45
+ * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
46
+ * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
47
+ * Joomla! is free software and parts of it may contain or be derived from works
48
+ * licensed under the GNU General Public License or other free or open source
49
+ * software licenses. See COPYRIGHT.php for copyright notices and details.
50
+ */
51
+
52
+ #wrapper {
53
+ border: 0px;
54
+ margin: 0px;
55
+ margin-left: auto;
56
+ margin-right: auto;
57
+ padding: 0px;
58
+ }
59
+
60
+ #header {
61
+ background-color: #FFF;
62
+ background-position: right top;
63
+ border-bottom: 4px solid #C64934;
64
+ background: url(../images/header_bg.png);
65
+ }
66
+
67
+ #joomla {
68
+ position: relative;
69
+ width: 100%;
70
+ background: url(../images/version.png) no-repeat;
71
+ background-position: bottom right;
72
+ margin: 0px;
73
+ padding: 0px;
74
+ }
75
+
76
+ #wrapper1 div {
77
+ border: 0px;
78
+ margin: 0px;
79
+ margin-left: auto;
80
+ margin-right: auto;
81
+ padding: 0px 5px 0px 5px;
82
+ display: inline;
83
+ }
84
+
85
+ body {
86
+ margin: 0px 0px 0px 0px;
87
+ color : #333;
88
+ background-color: #FFF;
89
+ font-family: Arial, Helvetica, sans-serif;
90
+ font-size: 12px;
91
+ }
92
+ a {
93
+ color: #C64934;
94
+ text-decoration: none;
95
+ }
96
+ a:hover {
97
+ color : #30569D;
98
+ text-decoration : underline;
99
+ }
100
+ a:active {
101
+ color : #333333;
102
+ text-decoration : underline;
103
+ }
104
+
105
+ table#toolbar {
106
+ margin-right: 10px;
107
+ }
108
+
109
+ table#toolbar a.toolbar {
110
+ color : #808080;
111
+ text-decoration : none;
112
+ display: block;
113
+ border: 1px solid #DDD;
114
+ width: 55px;
115
+ padding: 2px 1px 2px 1px;
116
+ }
117
+ table#toolbar a.toolbar:hover {
118
+ color : #C64934;
119
+ border: 1px solid #c24733;
120
+ background-color: #f1e8e6;
121
+ padding: 3px 0px 1px 2px;
122
+ }
123
+ table#toolbar a.toolbar:active {
124
+ color : #FF9900;
125
+ }
126
+ .pagenav {
127
+ font-size : 10px;
128
+ }
129
+ a.pagenav {
130
+ color : #808080;
131
+ font-size : 10px;
132
+ text-decoration : underline;
133
+ }
134
+ a.pagenav:hover {
135
+ color : #FFF;
136
+ font-size : 10px;
137
+ }
138
+ a.pagenav:active {
139
+ color : #333;
140
+ font-size : 10px;
141
+ }
142
+ .sectionname {
143
+ color : #FF9900;
144
+ font-family : Arial, Helvetica, sans-serif;
145
+ font-size : 18px;
146
+ font-weight: bold;
147
+ }
148
+ .button {
149
+ border-top : solid 1px #d5d5d5;
150
+ border-right : solid 1px #808080;
151
+ border-bottom : solid 1px #808080;
152
+ border-left : solid 1px #d5d5d5;
153
+ color : #333;
154
+ font-weight : bold;
155
+ }
156
+ .inputbox {
157
+ z-index: -3;
158
+ font-size: 11px;
159
+ }
160
+ .text_area {
161
+ border : 1px solid #ccc;
162
+ z-index: -3;
163
+ font-size: 11px;
164
+ }
165
+ input, textarea, select {
166
+ z-index : -3;
167
+ font-size: 11px;
168
+ }
169
+ .small {
170
+ color : #FF9900;
171
+ font-family : Arial, Helvetica, sans-serif;
172
+ font-size : 10px;
173
+ text-decoration : none;
174
+ }
175
+ .smallgrey {
176
+ color : #999;
177
+ font-size : 10px;
178
+ }
179
+ .error {
180
+ color : #C40000;
181
+ font-size : 11px;
182
+ font-weight : bold;
183
+ }
184
+ .contentheading, .componentheading, .moduleheading {
185
+ font-size: 14px;
186
+ font-weight: bold;
187
+ }
188
+ table.menubar {
189
+ width: 100%;
190
+
191
+ }
192
+ td {
193
+ font-size: 11px;
194
+ }
195
+ /* header block */
196
+ table.adminheading {
197
+ background-color: #FFF;
198
+ font-family : Arial, Helvetica, sans-serif;
199
+ margin: 0px;
200
+ padding: 0px;
201
+ border: 0px;
202
+ width: 100%;
203
+ border-collapse: collapse;
204
+ color: #C64934;
205
+ font-size : 18px;
206
+ font-weight: bold;
207
+ text-align: left;
208
+ }
209
+ table.adminheading th {
210
+ background: url(../../../images/generic.png) no-repeat left;
211
+ text-align: left;
212
+ height: 50px;
213
+ width: 99%;
214
+ padding-left: 50px;
215
+ border-bottom: 5px solid #fff;
216
+ }
217
+ table.adminheading th.checkin {
218
+ background: url(../../../images/checkin.png) no-repeat left;
219
+ }
220
+ table.adminheading th.cpanel {
221
+ background: url(../../../images/cpanel.png) no-repeat left;
222
+ }
223
+ table.adminheading th.config {
224
+ background: url(../../../images/config.png) no-repeat left;
225
+ }
226
+ table.adminheading th.modules {
227
+ background: url(../../../images/module.png) no-repeat left;
228
+ }
229
+ table.adminheading th.menus {
230
+ background: url(../../../images/menu.png) no-repeat left;
231
+ }
232
+ table.adminheading th.trash {
233
+ background: url(../../../images/trash.png) no-repeat left;
234
+ }
235
+ table.adminheading th.user {
236
+ background: url(../../../images/user.png) no-repeat left;
237
+ }
238
+ table.adminheading th.inbox {
239
+ background: url(../../../images/inbox.png) no-repeat left;
240
+ }
241
+ table.adminheading th.msgconfig {
242
+ background: url(../../../images/message_config.png) no-repeat left;
243
+ }
244
+ table.adminheading th.langmanager {
245
+ background: url(../../../images/langmanager.png) no-repeat left;
246
+ }
247
+ table.adminheading th.mediamanager {
248
+ background: url(../../../images/mediamanager.png) no-repeat left;
249
+ }
250
+ table.adminheading th.impressions {
251
+ background: url(../../../images/impressions.png) no-repeat left;
252
+ }
253
+ table.adminheading th.browser {
254
+ background: url(../../../images/browser.png) no-repeat left;
255
+ }
256
+ table.adminheading th.searchtext {
257
+ background: url(../../../images/searchtext.png) no-repeat left;
258
+ }
259
+ table.adminheading th.templates {
260
+ background: url(../../../images/templatemanager.png) no-repeat left;
261
+ }
262
+ table.adminheading th.massemail {
263
+ background: url(../../../images/massemail.png) no-repeat left;
264
+ }
265
+ table.adminheading th.frontpage {
266
+ background: url(../../../images/frontpage.png) no-repeat left;
267
+ }
268
+ table.adminheading th.sections {
269
+ background: url(../../../images/sections.png) no-repeat left;
270
+ }
271
+ table.adminheading th.edit {
272
+ background: url(../../../images/addedit.png) no-repeat left;
273
+ }
274
+ table.adminheading th.categories {
275
+ background: url(../../../images/categories.png) no-repeat left;
276
+ }
277
+ table.adminheading th.install {
278
+ background: url(../../../images/install.png) no-repeat left;
279
+ }
280
+ table.adminheading th.dbbackup {
281
+ background: url(../../../images/backup.png) no-repeat left;
282
+ }
283
+ table.adminheading th.dbrestore {
284
+ background: url(../../../images/dbrestore.png) no-repeat left;
285
+ }
286
+ table.adminheading th.dbquery {
287
+ background: url(../../../images/query.png) no-repeat left;
288
+ }
289
+ table.adminheading th.info {
290
+ background: url(../../../images/systeminfo.png) no-repeat left;
291
+ }
292
+
293
+ table.adminheading td {
294
+ color : #000;
295
+ }
296
+ /* standard list style table */
297
+ table.adminlist {
298
+ background-color: #FFFFFF;
299
+ margin: 0px;
300
+ padding: 0px;
301
+ border: 1px solid #ddd;
302
+ border-spacing: 0px;
303
+ width: 100%;
304
+ border-collapse: collapse;
305
+ }
306
+
307
+ table.adminlist th {
308
+ margin: 0px;
309
+ padding: 6px 4px 2px 4px;
310
+ height: 25px;
311
+ //background: url(../images/background.jpg);
312
+ background-repeat: repeat;
313
+ font-size: 11px;
314
+ color: #000;
315
+ }
316
+ table.adminlist th.title {
317
+ text-align: left;
318
+ }
319
+
320
+ table.adminlist th a:link, table.adminlist th a:visited {
321
+ color: #c64934;
322
+ text-decoration: none;
323
+ }
324
+
325
+ table.adminlist th a:hover {
326
+ text-decoration: underline;
327
+ }
328
+
329
+ table.adminlist tr.row0 {
330
+ background-color: #F9F9F9;
331
+ }
332
+ table.adminlist tr.row1 {
333
+ background-color: #FFF;
334
+ }
335
+ table.adminlist td {
336
+ border-bottom: 1px solid #e5e5e5;
337
+ padding: 4px;
338
+ }
339
+ table.adminlist tr.row0:hover {
340
+ background-color: #f1f1f1;
341
+ }
342
+ table.adminlist tr.row1:hover {
343
+ background-color: #f1f1f1;
344
+ }
345
+ table.adminlist td.options {
346
+ background-color: #ffffff;
347
+ font-size: 8px;
348
+ }
349
+ select.options, input.options {
350
+ font-size: 8px;
351
+ font-weight: normal;
352
+ border: 1px solid #999999;
353
+ }
354
+ /* standard form style table */
355
+ table.adminform {
356
+ background-color: #f9f9f9;
357
+ border: solid 1px #d5d5d5;
358
+ width: 100%;
359
+ padding: 10px;
360
+ border-collapse: collapse;
361
+ }
362
+ table.adminform tr.row0 {
363
+ background-color: #f9f9f9;
364
+ }
365
+ table.adminform tr.row1 {
366
+ background-color: #eeeeee;
367
+ }
368
+ table.adminform th {
369
+ font-size: 11px;
370
+ padding-top: 6px;
371
+ padding-bottom: 2px;
372
+ padding-left: 4px;
373
+ padding-right: 4px;
374
+ text-align: left;
375
+ height: 25px;
376
+ //background: url(../images/background.jpg);
377
+ color: #000;
378
+ background-repeat: repeat;
379
+ }
380
+ table.adminform td {
381
+ padding: 3px;
382
+ border: solid 1px #d5d5d5;
383
+ text-align: left;
384
+ }
385
+ table.adminform td.editor {
386
+ font-size: 9px;
387
+ }
388
+
389
+ table.cpanel td {
390
+ text-align: center;
391
+ }
392
+
393
+ form {
394
+ margin: 0px 0px 0px 0px;
395
+ }
396
+ /* Styles for dhtml tabbed-pages */
397
+ .ontab {
398
+ font-size: 12px;
399
+ background-color: #ffae00;
400
+ border: 1px solid #cccccc;
401
+ width: 14%;
402
+ text-align: center;
403
+ cursor: pointer;
404
+ font-weight: bold;
405
+ color: #FFFFFF;
406
+ }
407
+ .offtab {
408
+ font-size: 12px;
409
+ background-color : #e5e5e5;
410
+ border: 1px solid #cccccc;
411
+ width: 14%;
412
+ text-align: center;
413
+ cursor: pointer;
414
+ font-weight: normal;
415
+ }
416
+ .tabpadding {
417
+ /*border-bottom: solid 1px #D5D5D5;*/
418
+ }
419
+ .tabheading {
420
+ background-color: #FFAE00;
421
+ color: #FFF;
422
+ font-size: 10px;
423
+ text-align: left;
424
+ }
425
+ .pagetext {
426
+ visibility: hidden;
427
+ display: none;
428
+ position: relative;
429
+ top: 0;
430
+ }
431
+ .menubackgr {
432
+ background: #F1F3F5;
433
+ border-bottom: 1px solid #cccccc;
434
+
435
+ }
436
+ .menudottedline {
437
+ border-bottom: 1px solid #cccccc;
438
+ border-top: 1px solid #ffffff;
439
+ background-color: #F1F3F5;
440
+ }
441
+ .pathway {
442
+ margin-left: 15px;
443
+ }
444
+ .adminheader {
445
+ color : #c30;
446
+ font-size : 24px;
447
+ }
448
+ /* Text passed with mosmsg url parameter */
449
+ .message {
450
+ font-family : "Trebuchet MS", Arial, Helvetica, sans-serif;
451
+ font-weight: bold;
452
+ font-size : 14px;
453
+ color : #c30;
454
+ text-align: center;
455
+ }
456
+
457
+ div.centermain {
458
+ padding: 0 10px;
459
+ }
460
+
461
+ div.main {
462
+ width: 99%;
463
+ padding: 0;
464
+ }
465
+ .quote {
466
+ margin: 4px;
467
+ border: 1px solid #cccccc;
468
+ background-color: #E9ECEF;
469
+ padding: 10px;
470
+ font-size: 12px;
471
+ color: #254D78;
472
+ }
473
+
474
+
475
+ /* mod_quickicon */
476
+
477
+ #cpanel { text-align: center; vertical-align: middle; }
478
+
479
+ #cpanel div.icon { margin: 3px; }
480
+ #cpanel div.icon a {
481
+ display: block; float: left;
482
+ height: 97px !important;
483
+ height: 100px;
484
+ width: 108px !important;
485
+ width: 110px;
486
+ vertical-align: middle;
487
+ text-decoration : none;
488
+ border: 1px solid #DDD;
489
+ padding: 2px 5px 1px 5px;
490
+ }
491
+
492
+ #cpanel div.icon a:link { color : #808080; }
493
+ #cpanel div.icon a:hover {
494
+ color : #333;
495
+ background-color: #f1e8e6;
496
+ border: 1px solid #c24733;
497
+ padding: 3px 4px 0px 6px;
498
+ }
499
+ #cpanel div.icon a:active { color : #808080; }
500
+ #cpanel div.icon a:visited { color : #808080; }
501
+
502
+ #cpanel div.icon img { margin-top: 13px; }
503
+ #cpanel div.icon span { display: block; padding-top: 3px;}
504
+
505
+ /* Tooltips */
506
+ a.tooltip, a.tooltip:hover {
507
+ color: black;
508
+ text-decoration: none;
509
+ border-bottom: 1px dashed #aaa;
510
+ }
511
+
512
+ a.tooltiplink {
513
+ display: block;
514
+ width: 100%;
515
+ }
516
+ a.tooltiplink:hover {
517
+ text-decoration: none;
518
+ }
519
+
520
+ /* Fieldsets */
521
+ fieldset {
522
+ margin-bottom: 10px;
523
+ border: 1px #ccc solid;
524
+ padding: 5px;
525
+ text-align: left;
526
+ }
527
+
528
+ fieldset p {
529
+ margin: 10px 0px;
530
+ }
531
+
532
+ legend {
533
+ color: #c24733;
534
+ font-size: 1.1em;
535
+ font-weight: bold;
536
+ }
537
+
538
+ /* Two Pane Formatting */
539
+ #treecell {
540
+ width: 20%;
541
+ display: block;
542
+ position: relative;
543
+ float: left;
544
+ margin: 0;
545
+ padding: 2px;
546
+ overflow: hidden;
547
+ }
548
+
549
+ .expander {
550
+ float: right;
551
+ }
552
+
553
+ #datacell {
554
+ width: 78%;
555
+ display: block;
556
+ float: left;
557
+ margin: 0;
558
+ padding: 2px 0px 0px 0px;
559
+ }
560
+
561
+ #datacellfull {
562
+ width: 98%;
563
+ display: block;
564
+ float: left;
565
+ margin: 0;
566
+ padding: 2px;
567
+ }
568
+
569
+ #treecell fieldset {
570
+ }
571
+ #datacell fieldset {
572
+ border: 1px #ccc solid;
573
+ }
574
+
575
+ span.editlinktip {
576
+ text-decoration: none;
577
+ border-bottom: 1px dashed #aaa;
578
+ }
579
+
580
+ table.paramlist td {
581
+ height: 30px;
582
+ }
583
+
584
+ div.footer {
585
+ clear: both;
586
+ margin-top: 10px;
587
+ }
588
+
589
+
590
+
591
+
592
+ /* =GENERAL RULES */
593
+
594
+ * {
595
+ list-style:none;
596
+ text-decoration:none;
597
+ margin:0;
598
+ padding:0;
599
+ font-family:Verdana, Arial, Helvetica, sans-serif;
600
+ }
601
+
602
+
603
+ h1,h2,h3,h4,h5,h6 {
604
+ font-weight:normal;
605
+ }
606
+
607
+ /* Clear floats */
608
+ .clear {
609
+ clear:both;
610
+ }
611
+
612
+ /* Link rules */
613
+
614
+
615
+ /* -----------------------------------------------------------------------------*/
616
+
617
+ /* Hacks */
618
+
619
+ .clearfix:after {
620
+ content:".";
621
+ display:block;
622
+ height:0;
623
+ clear:both;
624
+ visibility:hidden;
625
+ }
626
+
627
+ .clearfix {
628
+ display:block;
629
+ }
630
+
631
+ /* Hides from IE-mac \*/
632
+ * html .clearfix {height: 1%;}
633
+ /* End hide from IE-mac */
634
+ /*
635
+ Theme Name: Flavor
636
+ Theme URI: http://www.cssflavour.com
637
+ Description: CSS Flavour Themes from DIT India
638
+ Version: 1.0
639
+ Author: Devdatt Gurjar
640
+ Author URI: http://www.ditindia.com
641
+ */
642
+
643
+
644
+
645
+ /* =GENERAL RULES */
646
+
647
+ * {
648
+ list-style:none;
649
+ text-decoration:none;
650
+ margin:0;
651
+ padding:0;
652
+ font-family:Verdana, Arial, Helvetica, sans-serif;
653
+ }
654
+
655
+
656
+ h1,h2,h3,h4,h5,h6 {
657
+ font-weight:normal;
658
+ }
659
+
660
+ /* Clear floats */
661
+ .clear {
662
+ clear:both;
663
+ }
664
+
665
+ /* Link rules */
666
+
667
+
668
+ /* -----------------------------------------------------------------------------*/
669
+
670
+ /* Hacks */
671
+
672
+ .clearfix:after {
673
+ content:".";
674
+ display:block;
675
+ height:0;
676
+ clear:both;
677
+ visibility:hidden;
678
+ }
679
+
680
+ .clearfix {
681
+ display:block;
682
+ }
683
+
684
+ /* Hides from IE-mac \*/
685
+ * html .clearfix {height: 1%;}
686
+ /* End hide from IE-mac */
css/tabber.css ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* $Id: example.css,v 1.5 2006/03/27 02:44:36 pat Exp $ */
2
+
3
+ /*--------------------------------------------------
4
+ REQUIRED to hide the non-active tab content.
5
+ But do not hide them in the print stylesheet!
6
+ --------------------------------------------------*/
7
+ .tabberlive .tabbertabhide {
8
+ display:none;
9
+ }
10
+
11
+ /*--------------------------------------------------
12
+ .tabber = before the tabber interface is set up
13
+ .tabberlive = after the tabber interface is set up
14
+ --------------------------------------------------*/
15
+ .tabber {
16
+ }
17
+ .tabberlive {
18
+ margin-top:1em;
19
+ }
20
+
21
+ /*--------------------------------------------------
22
+ ul.tabbernav = the tab navigation list
23
+ li.tabberactive = the active tab
24
+ --------------------------------------------------*/
25
+ ul.tabbernav
26
+ {
27
+ margin:0;
28
+ padding: 3px 0;
29
+ border-bottom: 1px solid #778;
30
+ font: bold 12px Verdana, sans-serif;
31
+ }
32
+
33
+ ul.tabbernav li
34
+ {
35
+ list-style: none;
36
+ margin: 0;
37
+ display: inline;
38
+ }
39
+
40
+ ul.tabbernav li a
41
+ {
42
+ padding: 3px 0.5em;
43
+ margin-left: 3px;
44
+ border: 1px solid #778;
45
+ border-bottom: none;
46
+ background: #DDE;
47
+ text-decoration: none;
48
+ }
49
+
50
+ ul.tabbernav li a:link { color: #448; }
51
+ ul.tabbernav li a:visited { color: #667; }
52
+
53
+ ul.tabbernav li a:hover
54
+ {
55
+ color: #000;
56
+ background: #AAE;
57
+ border-color: #227;
58
+ }
59
+
60
+ ul.tabbernav li.tabberactive a
61
+ {
62
+ background-color: #fff;
63
+ border-bottom: 1px solid #fff;
64
+ }
65
+
66
+ ul.tabbernav li.tabberactive a:hover
67
+ {
68
+ color: #000;
69
+ background: white;
70
+ border-bottom: 1px solid white;
71
+ }
72
+
73
+ /*--------------------------------------------------
74
+ .tabbertab = the tab content
75
+ Add style only after the tabber interface is set up (.tabberlive)
76
+ --------------------------------------------------*/
77
+ .tabberlive .tabbertab {
78
+ padding:5px;
79
+ border:1px solid #aaa;
80
+ border-top:0;
81
+
82
+ /* If you don't want the tab size changing whenever a tab is changed
83
+ you can set a fixed height */
84
+
85
+ /* height:200px; */
86
+
87
+ /* If you set a fix height set overflow to auto and you will get a
88
+ scrollbar when necessary */
89
+
90
+ /* overflow:auto; */
91
+ }
92
+
93
+ /* If desired, hide the heading since a heading is provided by the tab */
94
+ .tabberlive .tabbertab h2 {
95
+ display:none;
96
+ }
97
+ .tabberlive .tabbertab h3 {
98
+ display:none;
99
+ }
100
+
101
+ /* Example of using an ID to set different styles for the tabs on the page */
102
+ .tabberlive#tab1 {
103
+ }
104
+ .tabberlive#tab2 {
105
+ }
106
+ .tabberlive#tab2 .tabbertab {
107
+ height:200px;
108
+ overflow:auto;
109
+ }
images/about.png ADDED
Binary file
images/actions.gif ADDED
Binary file
images/actions.png ADDED
Binary file
images/backup.png ADDED
Binary file
images/css.png ADDED
Binary file
images/editions.png ADDED
Binary file
images/editionssm.png ADDED
Binary file
images/empty.gif ADDED
Binary file
images/filesave.png ADDED
Binary file
images/folder.png ADDED
Binary file
images/forum.png ADDED
Binary file
images/gen_settings.png ADDED
Binary file
images/help.png ADDED
Binary file
images/helpsm.png ADDED
Binary file
images/join.gif ADDED
Binary file
images/joinbottom.gif ADDED
Binary file
images/keep_icon.gif ADDED
Binary file
images/lang.png ADDED
Binary file
images/lhelp.png ADDED
Binary file
images/line.gif ADDED
Binary file
images/logo.gif ADDED
Binary file
images/logo.png ADDED
Binary file
images/minus.gif ADDED
Binary file
images/minusbottom.gif ADDED
Binary file
images/nolines_minus.gif ADDED
Binary file
images/nolines_plus.gif ADDED
Binary file
images/page.gif ADDED
Binary file
images/plus.gif ADDED
Binary file
images/plusbottom.gif ADDED
Binary file
images/publish_x.png ADDED
Binary file
images/settings.png ADDED
Binary file
images/support.png ADDED
Binary file
images/templatessm.png ADDED
Binary file
images/website.png ADDED
Binary file
images/wizard.png ADDED
Binary file
images/wizardsm.png ADDED
Binary file
images/wizardsm_restore.gif ADDED
Binary file
images/wizardsm_restore.png ADDED
Binary file
images/xcloner.png ADDED
Binary file
index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ include "admin.cloner.php";
3
+ ?>
index2.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ include "admin.cloner.php";
3
+ ?>
install.xcloner.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @version $Id: install.xcloner.php 57 2007-07-08 18:05:52Z soeren $
4
+ * @package XCloner
5
+ * @copyright (C) 2005-2007 JoomlaPlug.com
6
+ * @license JoomalPlug.com
7
+ * @author Ovidiu
8
+ */
9
+ function com_install(){
10
+ global $database;
11
+
12
+ if( is_callable( array( 'JFactory', 'getDBO' ))) {
13
+ $database = JFactory::getDBO();
14
+ }
15
+ $mypath = dirname(__FILE__);
16
+
17
+ @chmod("components/com_xcloner/cloner.config.php", 0777);
18
+ @mkdir("backups", 0777);
19
+ @chmod("backups", 0777);
20
+ @chmod("components/com_xcloner/configs", 0777);
21
+ @chmod("components/com_xcloner/browser", 0755);
22
+ @chmod("components/com_xcloner/", 0755);
23
+ @chmod("components/com_xcloner/index.php", 0755);
24
+ @chmod("components/com_xcloner/index2.php", 0755);
25
+ @chmod("components/com_xcloner/cloner.cron.php", 0755);
26
+
27
+ error_reporting( E_ALL ^ E_NOTICE );
28
+
29
+ //add new admin menu images
30
+ $database->setQuery("UPDATE #__components SET admin_menu_img = 'components/com_xcloner/images/xcloner.png' WHERE admin_menu_link = 'option=com_xcloner'");
31
+ $database->query();
32
+ }
33
+ ?>
javascript/dtree.js ADDED
@@ -0,0 +1,672 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ // Node object
3
+
4
+ function Node(id, pid, name, url, title, target, icon, iconOpen, open) {
5
+
6
+ this.id = id;
7
+
8
+ this.pid = pid;
9
+
10
+ this.name = name;
11
+
12
+ this.url = url;
13
+
14
+ this.title = title;
15
+
16
+ this.target = target;
17
+
18
+ this.icon = icon;
19
+
20
+ this.iconOpen = iconOpen;
21
+
22
+ this._io = open || false;
23
+
24
+ this._is = false;
25
+
26
+ this._ls = false;
27
+
28
+ this._hc = false;
29
+
30
+ this._ai = 0;
31
+
32
+ this._p;
33
+
34
+ };
35
+
36
+
37
+
38
+ // Tree object
39
+
40
+ function dTree(objName) {
41
+
42
+ this.config = {
43
+
44
+ target : null,
45
+
46
+ folderLinks : true,
47
+
48
+ useSelection : false,
49
+
50
+ useCookies : true,
51
+
52
+ useLines : true,
53
+
54
+ useIcons : true,
55
+
56
+ useStatusText : true,
57
+
58
+ closeSameLevel : false,
59
+
60
+ inOrder : true
61
+
62
+ }
63
+
64
+ this.icon = {
65
+
66
+ root : 'images/logo.gif',
67
+
68
+ folder : 'images/folder.gif',
69
+
70
+ folderOpen : 'images/folderopen.gif',
71
+
72
+ node : 'images/page.gif',
73
+
74
+ empty : 'images/empty.gif',
75
+
76
+ line : 'images/line.gif',
77
+
78
+ join : 'images/join.gif',
79
+
80
+ joinBottom : 'images/joinbottom.gif',
81
+
82
+ plus : 'images/plus.gif',
83
+
84
+ plusBottom : 'images/plusbottom.gif',
85
+
86
+ minus : 'images/minus.gif',
87
+
88
+ minusBottom : 'images/minusbottom.gif',
89
+
90
+ nlPlus : 'images/nolines_plus.gif',
91
+
92
+ nlMinus : 'images/nolines_minus.gif'
93
+
94
+ };
95
+
96
+ this.obj = objName;
97
+
98
+ this.aNodes = [];
99
+
100
+ this.aIndent = [];
101
+
102
+ this.root = new Node(-1);
103
+
104
+ this.selectedNode = null;
105
+
106
+ this.selectedFound = false;
107
+
108
+ this.completed = false;
109
+
110
+ };
111
+
112
+
113
+
114
+ // Adds a new node to the node array
115
+
116
+ dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
117
+
118
+ this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
119
+
120
+ };
121
+
122
+
123
+
124
+ // Open/close all nodes
125
+
126
+ dTree.prototype.openAll = function() {
127
+
128
+ this.oAll(true);
129
+
130
+ };
131
+
132
+ dTree.prototype.closeAll = function() {
133
+
134
+ this.oAll(false);
135
+
136
+ };
137
+
138
+
139
+
140
+ // Outputs the tree to the page
141
+
142
+ dTree.prototype.toString = function() {
143
+
144
+ var str = '<div class="dtree">\n';
145
+
146
+ if (document.getElementById) {
147
+
148
+ if (this.config.useCookies) this.selectedNode = this.getSelected();
149
+
150
+ str += this.addNode(this.root);
151
+
152
+ } else str += 'Browser not supported.';
153
+
154
+ str += '</div>';
155
+
156
+ if (!this.selectedFound) this.selectedNode = null;
157
+
158
+ this.completed = true;
159
+
160
+ return str;
161
+
162
+ };
163
+
164
+
165
+
166
+ // Creates the tree structure
167
+
168
+ dTree.prototype.addNode = function(pNode) {
169
+
170
+ var str = '';
171
+
172
+ var n=0;
173
+
174
+ if (this.config.inOrder) n = pNode._ai;
175
+
176
+ for (n; n<this.aNodes.length; n++) {
177
+
178
+ if (this.aNodes[n].pid == pNode.id) {
179
+
180
+ var cn = this.aNodes[n];
181
+
182
+ cn._p = pNode;
183
+
184
+ cn._ai = n;
185
+
186
+ this.setCS(cn);
187
+
188
+ if (!cn.target && this.config.target) cn.target = this.config.target;
189
+
190
+ if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
191
+
192
+ if (!this.config.folderLinks && cn._hc) cn.url = null;
193
+
194
+ if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
195
+
196
+ cn._is = true;
197
+
198
+ this.selectedNode = n;
199
+
200
+ this.selectedFound = true;
201
+
202
+ }
203
+
204
+ str += this.node(cn, n);
205
+
206
+ if (cn._ls) break;
207
+
208
+ }
209
+
210
+ }
211
+
212
+ return str;
213
+
214
+ };
215
+
216
+
217
+
218
+ // Creates the node icon, url and text
219
+
220
+ dTree.prototype.node = function(node, nodeId) {
221
+
222
+ var str = '<div class="dTreeNode">' + this.indent(node, nodeId);
223
+
224
+ if (this.config.useIcons) {
225
+
226
+ if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
227
+
228
+ if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
229
+
230
+ if (this.root.id == node.pid) {
231
+
232
+ node.icon = this.icon.root;
233
+
234
+ node.iconOpen = this.icon.root;
235
+
236
+ }
237
+
238
+ str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
239
+
240
+ }
241
+
242
+ if (node.url) {
243
+
244
+ str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
245
+
246
+ if (node.title) str += ' title="' + node.title + '"';
247
+
248
+ if (node.target) str += ' target="' + node.target + '"';
249
+
250
+ if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
251
+
252
+ if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
253
+
254
+ str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
255
+
256
+ str += '>';
257
+
258
+ }
259
+
260
+ else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
261
+
262
+ str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
263
+
264
+ str += node.name;
265
+
266
+ if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
267
+
268
+ str += '</div>';
269
+
270
+ if (node._hc) {
271
+
272
+ str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
273
+
274
+ str += this.addNode(node);
275
+
276
+ str += '</div>';
277
+
278
+ }
279
+
280
+ this.aIndent.pop();
281
+
282
+ return str;
283
+
284
+ };
285
+
286
+
287
+
288
+ // Adds the empty and line icons
289
+
290
+ dTree.prototype.indent = function(node, nodeId) {
291
+
292
+ var str = '';
293
+
294
+ if (this.root.id != node.pid) {
295
+
296
+ for (var n=0; n<this.aIndent.length; n++)
297
+
298
+ str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
299
+
300
+ (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
301
+
302
+ if (node._hc) {
303
+
304
+ str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
305
+
306
+ if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
307
+
308
+ else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
309
+
310
+ str += '" alt="" /></a>';
311
+
312
+ } else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
313
+
314
+ }
315
+
316
+ return str;
317
+
318
+ };
319
+
320
+
321
+
322
+ // Checks if a node has any children and if it is the last sibling
323
+
324
+ dTree.prototype.setCS = function(node) {
325
+
326
+ var lastId;
327
+
328
+ for (var n=0; n<this.aNodes.length; n++) {
329
+
330
+ if (this.aNodes[n].pid == node.id) node._hc = true;
331
+
332
+ if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
333
+
334
+ }
335
+
336
+ if (lastId==node.id) node._ls = true;
337
+
338
+ };
339
+
340
+
341
+
342
+ // Returns the selected node
343
+
344
+ dTree.prototype.getSelected = function() {
345
+
346
+ var sn = this.getCookie('cs' + this.obj);
347
+
348
+ return (sn) ? sn : null;
349
+
350
+ };
351
+
352
+
353
+
354
+ // Highlights the selected node
355
+
356
+ dTree.prototype.s = function(id) {
357
+
358
+ if (!this.config.useSelection) return;
359
+
360
+ var cn = this.aNodes[id];
361
+
362
+ if (cn._hc && !this.config.folderLinks) return;
363
+
364
+ if (this.selectedNode != id) {
365
+
366
+ if (this.selectedNode || this.selectedNode==0) {
367
+
368
+ eOld = document.getElementById("s" + this.obj + this.selectedNode);
369
+
370
+ eOld.className = "node";
371
+
372
+ }
373
+
374
+ eNew = document.getElementById("s" + this.obj + id);
375
+
376
+ eNew.className = "nodeSel";
377
+
378
+ this.selectedNode = id;
379
+
380
+ if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
381
+
382
+ }
383
+
384
+ };
385
+
386
+
387
+
388
+ // Toggle Open or close
389
+
390
+ dTree.prototype.o = function(id) {
391
+
392
+ var cn = this.aNodes[id];
393
+
394
+ this.nodeStatus(!cn._io, id, cn._ls);
395
+
396
+ cn._io = !cn._io;
397
+
398
+ if (this.config.closeSameLevel) this.closeLevel(cn);
399
+
400
+ if (this.config.useCookies) this.updateCookie();
401
+
402
+ };
403
+
404
+
405
+
406
+ // Open or close all nodes
407
+
408
+ dTree.prototype.oAll = function(status) {
409
+
410
+ for (var n=0; n<this.aNodes.length; n++) {
411
+
412
+ if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
413
+
414
+ this.nodeStatus(status, n, this.aNodes[n]._ls)
415
+
416
+ this.aNodes[n]._io = status;
417
+
418
+ }
419
+
420
+ }
421
+
422
+ if (this.config.useCookies) this.updateCookie();
423
+
424
+ };
425
+
426
+
427
+
428
+ // Opens the tree to a specific node
429
+
430
+ dTree.prototype.openTo = function(nId, bSelect, bFirst) {
431
+
432
+ if (!bFirst) {
433
+
434
+ for (var n=0; n<this.aNodes.length; n++) {
435
+
436
+ if (this.aNodes[n].id == nId) {
437
+
438
+ nId=n;
439
+
440
+ break;
441
+
442
+ }
443
+
444
+ }
445
+
446
+ }
447
+
448
+ var cn=this.aNodes[nId];
449
+
450
+ if (cn.pid==this.root.id || !cn._p) return;
451
+
452
+ cn._io = true;
453
+
454
+ cn._is = bSelect;
455
+
456
+ if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
457
+
458
+ if (this.completed && bSelect) this.s(cn._ai);
459
+
460
+ else if (bSelect) this._sn=cn._ai;
461
+
462
+ this.openTo(cn._p._ai, false, true);
463
+
464
+ };
465
+
466
+
467
+
468
+ // Closes all nodes on the same level as certain node
469
+
470
+ dTree.prototype.closeLevel = function(node) {
471
+
472
+ for (var n=0; n<this.aNodes.length; n++) {
473
+
474
+ if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
475
+
476
+ this.nodeStatus(false, n, this.aNodes[n]._ls);
477
+
478
+ this.aNodes[n]._io = false;
479
+
480
+ this.closeAllChildren(this.aNodes[n]);
481
+
482
+ }
483
+
484
+ }
485
+
486
+ }
487
+
488
+
489
+
490
+ // Closes all children of a node
491
+
492
+ dTree.prototype.closeAllChildren = function(node) {
493
+
494
+ for (var n=0; n<this.aNodes.length; n++) {
495
+
496
+ if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
497
+
498
+ if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
499
+
500
+ this.aNodes[n]._io = false;
501
+
502
+ this.closeAllChildren(this.aNodes[n]);
503
+
504
+ }
505
+
506
+ }
507
+
508
+ }
509
+
510
+
511
+
512
+ // Change the status of a node(open or closed)
513
+
514
+ dTree.prototype.nodeStatus = function(status, id, bottom) {
515
+
516
+ eDiv = document.getElementById('d' + this.obj + id);
517
+
518
+ eJoin = document.getElementById('j' + this.obj + id);
519
+
520
+ if (this.config.useIcons) {
521
+
522
+ eIcon = document.getElementById('i' + this.obj + id);
523
+
524
+ eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
525
+
526
+ }
527
+
528
+ eJoin.src = (this.config.useLines)?
529
+
530
+ ((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
531
+
532
+ ((status)?this.icon.nlMinus:this.icon.nlPlus);
533
+
534
+ eDiv.style.display = (status) ? 'block': 'none';
535
+
536
+ };
537
+
538
+
539
+
540
+
541
+
542
+ // [Cookie] Clears a cookie
543
+
544
+ dTree.prototype.clearCookie = function() {
545
+
546
+ var now = new Date();
547
+
548
+ var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
549
+
550
+ this.setCookie('co'+this.obj, 'cookieValue', yesterday);
551
+
552
+ this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
553
+
554
+ };
555
+
556
+
557
+
558
+ // [Cookie] Sets value in a cookie
559
+
560
+ dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
561
+
562
+ document.cookie =
563
+
564
+ escape(cookieName) + '=' + escape(cookieValue)
565
+
566
+ + (expires ? '; expires=' + expires.toGMTString() : '')
567
+
568
+ + (path ? '; path=' + path : '')
569
+
570
+ + (domain ? '; domain=' + domain : '')
571
+
572
+ + (secure ? '; secure' : '');
573
+
574
+ };
575
+
576
+
577
+
578
+ // [Cookie] Gets a value from a cookie
579
+
580
+ dTree.prototype.getCookie = function(cookieName) {
581
+
582
+ var cookieValue = '';
583
+
584
+ var posName = document.cookie.indexOf(escape(cookieName) + '=');
585
+
586
+ if (posName != -1) {
587
+
588
+ var posValue = posName + (escape(cookieName) + '=').length;
589
+
590
+ var endPos = document.cookie.indexOf(';', posValue);
591
+
592
+ if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
593
+
594
+ else cookieValue = unescape(document.cookie.substring(posValue));
595
+
596
+ }
597
+
598
+ return (cookieValue);
599
+
600
+ };
601
+
602
+
603
+
604
+ // [Cookie] Returns ids of open nodes as a string
605
+
606
+ dTree.prototype.updateCookie = function() {
607
+
608
+ var str = '';
609
+
610
+ for (var n=0; n<this.aNodes.length; n++) {
611
+
612
+ if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
613
+
614
+ if (str) str += '.';
615
+
616
+ str += this.aNodes[n].id;
617
+
618
+ }
619
+
620
+ }
621
+
622
+ this.setCookie('co' + this.obj, str);
623
+
624
+ };
625
+
626
+
627
+
628
+ // [Cookie] Checks if a node id is in a cookie
629
+
630
+ dTree.prototype.isOpen = function(id) {
631
+
632
+ var aOpen = this.getCookie('co' + this.obj).split('.');
633
+
634
+ for (var n=0; n<aOpen.length; n++)
635
+
636
+ if (aOpen[n] == id) return true;
637
+
638
+ return false;
639
+
640
+ };
641
+
642
+
643
+
644
+ // If Push and pop is not implemented by the browser
645
+
646
+ if (!Array.prototype.push) {
647
+
648
+ Array.prototype.push = function array_push() {
649
+
650
+ for(var i=0;i<arguments.length;i++)
651
+
652
+ this[this.length]=arguments[i];
653
+
654
+ return this.length;
655
+
656
+ }
657
+
658
+ };
659
+
660
+ if (!Array.prototype.pop) {
661
+
662
+ Array.prototype.pop = function array_pop() {
663
+
664
+ lastElement = this[this.length-1];
665
+
666
+ this.length = Math.max(this.length-1,0);
667
+
668
+ return lastElement;
669
+
670
+ }
671
+
672
+ };
javascript/tabber.js ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function checkAll( n, fldName ) {
2
+ if (!fldName) {
3
+ fldName = 'cb';
4
+ }
5
+ var f = document.adminForm;
6
+ var c = f.toggle.checked;
7
+ var n2 = 0;
8
+ for (i=0; i < n; i++) {
9
+ cb = eval( 'f.' + fldName + '' + i );
10
+ if (cb) {
11
+ cb.checked = c;
12
+ n2++;
13
+ }
14
+ }
15
+ if (c) {
16
+ document.adminForm.boxchecked.value = n2;
17
+ } else {
18
+ document.adminForm.boxchecked.value = 0;
19
+ }
20
+ }
21
+
22
+ function tabberObj(argsObj)
23
+ {
24
+ var arg; /* name of an argument to override */
25
+
26
+ /* Element for the main tabber div. If you supply this in argsObj,
27
+ then the init() method will be called.
28
+ */
29
+ this.div = null;
30
+
31
+ /* Class of the main tabber div */
32
+ this.classMain = "tabber";
33
+
34
+ /* Rename classMain to classMainLive after tabifying
35
+ (so a different style can be applied)
36
+ */
37
+ this.classMainLive = "tabberlive";
38
+
39
+ /* Class of each DIV that contains a tab */
40
+ this.classTab = "tabbertab";
41
+
42
+ /* Class to indicate which tab should be active on startup */
43
+ this.classTabDefault = "tabbertabdefault";
44
+
45
+ /* Class for the navigation UL */
46
+ this.classNav = "tabbernav";
47
+
48
+ /* When a tab is to be hidden, instead of setting display='none', we
49
+ set the class of the div to classTabHide. In your screen
50
+ stylesheet you should set classTabHide to display:none. In your
51
+ print stylesheet you should set display:block to ensure that all
52
+ the information is printed.
53
+ */
54
+ this.classTabHide = "tabbertabhide";
55
+
56
+ /* Class to set the navigation LI when the tab is active, so you can
57
+ use a different style on the active tab.
58
+ */
59
+ this.classNavActive = "tabberactive";
60
+
61
+ /* Elements that might contain the title for the tab, only used if a
62
+ title is not specified in the TITLE attribute of DIV classTab.
63
+ */
64
+ this.titleElements = ['h2','h3','h4','h5','h6'];
65
+
66
+ /* Should we strip out the HTML from the innerHTML of the title elements?
67
+ This should usually be true.
68
+ */
69
+ this.titleElementsStripHTML = true;
70
+
71
+ /* If the user specified the tab names using a TITLE attribute on
72
+ the DIV, then the browser will display a tooltip whenever the
73
+ mouse is over the DIV. To prevent this tooltip, we can remove the
74
+ TITLE attribute after getting the tab name.
75
+ */
76
+ this.removeTitle = true;
77
+
78
+ /* If you want to add an id to each link set this to true */
79
+ this.addLinkId = false;
80
+
81
+ /* If addIds==true, then you can set a format for the ids.
82
+ <tabberid> will be replaced with the id of the main tabber div.
83
+ <tabnumberzero> will be replaced with the tab number
84
+ (tab numbers starting at zero)
85
+ <tabnumberone> will be replaced with the tab number
86
+ (tab numbers starting at one)
87
+ <tabtitle> will be replaced by the tab title
88
+ (with all non-alphanumeric characters removed)
89
+ */
90
+ this.linkIdFormat = '<tabberid>nav<tabnumberone>';
91
+
92
+ /* You can override the defaults listed above by passing in an object:
93
+ var mytab = new tabber({property:value,property:value});
94
+ */
95
+ for (arg in argsObj) { this[arg] = argsObj[arg]; }
96
+
97
+ /* Create regular expressions for the class names; Note: if you
98
+ change the class names after a new object is created you must
99
+ also change these regular expressions.
100
+ */
101
+ this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi');
102
+ this.REclassMainLive = new RegExp('\\b' + this.classMainLive + '\\b', 'gi');
103
+ this.REclassTab = new RegExp('\\b' + this.classTab + '\\b', 'gi');
104
+ this.REclassTabDefault = new RegExp('\\b' + this.classTabDefault + '\\b', 'gi');
105
+ this.REclassTabHide = new RegExp('\\b' + this.classTabHide + '\\b', 'gi');
106
+
107
+ /* Array of objects holding info about each tab */
108
+ this.tabs = new Array();
109
+
110
+ /* If the main tabber div was specified, call init() now */
111
+ if (this.div) {
112
+
113
+ this.init(this.div);
114
+
115
+ /* We don't need the main div anymore, and to prevent a memory leak
116
+ in IE, we must remove the circular reference between the div
117
+ and the tabber object. */
118
+ this.div = null;
119
+ }
120
+ }
121
+
122
+
123
+ /*--------------------------------------------------
124
+ Methods for tabberObj
125
+ --------------------------------------------------*/
126
+
127
+
128
+ tabberObj.prototype.init = function(e)
129
+ {
130
+ /* Set up the tabber interface.
131
+
132
+ e = element (the main containing div)
133
+
134
+ Example:
135
+ init(document.getElementById('mytabberdiv'))
136
+ */
137
+
138
+ var
139
+ childNodes, /* child nodes of the tabber div */
140
+ i, i2, /* loop indices */
141
+ t, /* object to store info about a single tab */
142
+ defaultTab=0, /* which tab to select by default */
143
+ DOM_ul, /* tabbernav list */
144
+ DOM_li, /* tabbernav list item */
145
+ DOM_a, /* tabbernav link */
146
+ aId, /* A unique id for DOM_a */
147
+ headingElement; /* searching for text to use in the tab */
148
+
149
+ /* Verify that the browser supports DOM scripting */
150
+ if (!document.getElementsByTagName) { return false; }
151
+
152
+ /* If the main DIV has an ID then save it. */
153
+ if (e.id) {
154
+ this.id = e.id;
155
+ }
156
+
157
+ /* Clear the tabs array (but it should normally be empty) */
158
+ this.tabs.length = 0;
159
+
160
+ /* Loop through an array of all the child nodes within our tabber element. */
161
+ childNodes = e.childNodes;
162
+ for(i=0; i < childNodes.length; i++) {
163
+
164
+ /* Find the nodes where class="tabbertab" */
165
+ if(childNodes[i].className &&
166
+ childNodes[i].className.match(this.REclassTab)) {
167
+
168
+ /* Create a new object to save info about this tab */
169
+ t = new Object();
170
+
171
+ /* Save a pointer to the div for this tab */
172
+ t.div = childNodes[i];
173
+
174
+ /* Add the new object to the array of tabs */
175
+ this.tabs[this.tabs.length] = t;
176
+
177
+ /* If the class name contains classTabDefault,
178
+ then select this tab by default.
179
+ */
180
+ if (childNodes[i].className.match(this.REclassTabDefault)) {
181
+ defaultTab = this.tabs.length-1;
182
+ }
183
+ }
184
+ }
185
+
186
+ /* Create a new UL list to hold the tab headings */
187
+ DOM_ul = document.createElement("ul");
188
+ DOM_ul.className = this.classNav;
189
+
190
+ /* Loop through each tab we found */
191
+ for (i=0; i < this.tabs.length; i++) {
192
+
193
+ t = this.tabs[i];
194
+
195
+ /* Get the label to use for this tab:
196
+ From the title attribute on the DIV,
197
+ Or from one of the this.titleElements[] elements,
198
+ Or use an automatically generated number.
199
+ */
200
+ t.headingText = t.div.title;
201
+
202
+ /* Remove the title attribute to prevent a tooltip from appearing */
203
+ if (this.removeTitle) { t.div.title = ''; }
204
+
205
+ if (!t.headingText) {
206
+
207
+ /* Title was not defined in the title of the DIV,
208
+ So try to get the title from an element within the DIV.
209
+ Go through the list of elements in this.titleElements
210
+ (typically heading elements ['h2','h3','h4'])
211
+ */
212
+ for (i2=0; i2<this.titleElements.length; i2++) {
213
+ headingElement = t.div.getElementsByTagName(this.titleElements[i2])[0];
214
+ if (headingElement) {
215
+ t.headingText = headingElement.innerHTML;
216
+ if (this.titleElementsStripHTML) {
217
+ t.headingText.replace(/<br>/gi," ");
218
+ t.headingText = t.headingText.replace(/<[^>]+>/g,"");
219
+ }
220
+ break;
221
+ }
222
+ }
223
+ }
224
+
225
+ if (!t.headingText) {
226
+ /* Title was not found (or is blank) so automatically generate a
227
+ number for the tab.
228
+ */
229
+ t.headingText = i + 1;
230
+ }
231
+
232
+ /* Create a list element for the tab */
233
+ DOM_li = document.createElement("li");
234
+
235
+ /* Save a reference to this list item so we can later change it to
236
+ the "active" class */
237
+ t.li = DOM_li;
238
+
239
+ /* Create a link to activate the tab */
240
+ DOM_a = document.createElement("a");
241
+ DOM_a.appendChild(document.createTextNode(t.headingText));
242
+ DOM_a.href = "javascript:void(null);";
243
+ DOM_a.title = t.headingText;
244
+ DOM_a.onclick = this.navClick;
245
+
246
+ /* Add some properties to the link so we can identify which tab
247
+ was clicked. Later the navClick method will need this.
248
+ */
249
+ DOM_a.tabber = this;
250
+ DOM_a.tabberIndex = i;
251
+
252
+ /* Do we need to add an id to DOM_a? */
253
+ if (this.addLinkId && this.linkIdFormat) {
254
+
255
+ /* Determine the id name */
256
+ aId = this.linkIdFormat;
257
+ aId = aId.replace(/<tabberid>/gi, this.id);
258
+ aId = aId.replace(/<tabnumberzero>/gi, i);
259
+ aId = aId.replace(/<tabnumberone>/gi, i+1);
260
+ aId = aId.replace(/<tabtitle>/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, ''));
261
+
262
+ DOM_a.id = aId;
263
+ }
264
+
265
+ /* Add the link to the list element */
266
+ DOM_li.appendChild(DOM_a);
267
+
268
+ /* Add the list element to the list */
269
+ DOM_ul.appendChild(DOM_li);
270
+ }
271
+
272
+ /* Add the UL list to the beginning of the tabber div */
273
+ e.insertBefore(DOM_ul, e.firstChild);
274
+
275
+ /* Make the tabber div "live" so different CSS can be applied */
276
+ e.className = e.className.replace(this.REclassMain, this.classMainLive);
277
+
278
+ /* Activate the default tab, and do not call the onclick handler */
279
+ this.tabShow(defaultTab);
280
+
281
+ /* If the user specified an onLoad function, call it now. */
282
+ if (typeof this.onLoad == 'function') {
283
+ this.onLoad({tabber:this});
284
+ }
285
+
286
+ return this;
287
+ };
288
+
289
+
290
+ tabberObj.prototype.navClick = function(event)
291
+ {
292
+ /* This method should only be called by the onClick event of an <A>
293
+ element, in which case we will determine which tab was clicked by
294
+ examining a property that we previously attached to the <A>
295
+ element.
296
+
297
+ Since this was triggered from an onClick event, the variable
298
+ "this" refers to the <A> element that triggered the onClick
299
+ event (and not to the tabberObj).
300
+
301
+ When tabberObj was initialized, we added some extra properties
302
+ to the <A> element, for the purpose of retrieving them now. Get
303
+ the tabberObj object, plus the tab number that was clicked.
304
+ */
305
+
306
+ var
307
+ rVal, /* Return value from the user onclick function */
308
+ a, /* element that triggered the onclick event */
309
+ self, /* the tabber object */
310
+ tabberIndex, /* index of the tab that triggered the event */
311
+ onClickArgs; /* args to send the onclick function */
312
+
313
+ a = this;
314
+ if (!a.tabber) { return false; }
315
+
316
+ self = a.tabber;
317
+ tabberIndex = a.tabberIndex;
318
+
319
+ /* Remove focus from the link because it looks ugly.
320
+ I don't know if this is a good idea...
321
+ */
322
+ a.blur();
323
+
324
+ /* If the user specified an onClick function, call it now.
325
+ If the function returns false then do not continue.
326
+ */
327
+ if (typeof self.onClick == 'function') {
328
+
329
+ onClickArgs = {'tabber':self, 'index':tabberIndex, 'event':event};
330
+
331
+ /* IE uses a different way to access the event object */
332
+ if (!event) { onClickArgs.event = window.event; }
333
+
334
+ rVal = self.onClick(onClickArgs);
335
+ if (rVal === false) { return false; }
336
+ }
337
+
338
+ self.tabShow(tabberIndex);
339
+
340
+ return false;
341
+ };
342
+
343
+
344
+ tabberObj.prototype.tabHideAll = function()
345
+ {
346
+ var i; /* counter */
347
+
348
+ /* Hide all tabs and make all navigation links inactive */
349
+ for (i = 0; i < this.tabs.length; i++) {
350
+ this.tabHide(i);
351
+ }
352
+ };
353
+
354
+
355
+ tabberObj.prototype.tabHide = function(tabberIndex)
356
+ {
357
+ var div;
358
+
359
+ if (!this.tabs[tabberIndex]) { return false; }
360
+
361
+ /* Hide a single tab and make its navigation link inactive */
362
+ div = this.tabs[tabberIndex].div;
363
+
364
+ /* Hide the tab contents by adding classTabHide to the div */
365
+ if (!div.className.match(this.REclassTabHide)) {
366
+ div.className += ' ' + this.classTabHide;
367
+ }
368
+ this.navClearActive(tabberIndex);
369
+
370
+ return this;
371
+ };
372
+
373
+
374
+ tabberObj.prototype.tabShow = function(tabberIndex)
375
+ {
376
+ /* Show the tabberIndex tab and hide all the other tabs */
377
+
378
+ var div;
379
+
380
+ if (!this.tabs[tabberIndex]) { return false; }
381
+
382
+ /* Hide all the tabs first */
383
+ this.tabHideAll();
384
+
385
+ /* Get the div that holds this tab */
386
+ div = this.tabs[tabberIndex].div;
387
+
388
+ /* Remove classTabHide from the div */
389
+ div.className = div.className.replace(this.REclassTabHide, '');
390
+
391
+ /* Mark this tab navigation link as "active" */
392
+ this.navSetActive(tabberIndex);
393
+
394
+ /* If the user specified an onTabDisplay function, call it now. */
395
+ if (typeof this.onTabDisplay == 'function') {
396
+ this.onTabDisplay({'tabber':this, 'index':tabberIndex});
397
+ }
398
+
399
+ return this;
400
+ };
401
+
402
+ tabberObj.prototype.navSetActive = function(tabberIndex)
403
+ {
404
+ /* Note: this method does *not* enforce the rule
405
+ that only one nav item can be active at a time.
406
+ */
407
+
408
+ /* Set classNavActive for the navigation list item */
409
+ this.tabs[tabberIndex].li.className = this.classNavActive;
410
+
411
+ return this;
412
+ };
413
+
414
+
415
+ tabberObj.prototype.navClearActive = function(tabberIndex)
416
+ {
417
+ /* Note: this method does *not* enforce the rule
418
+ that one nav should always be active.
419
+ */
420
+
421
+ /* Remove classNavActive from the navigation list item */
422
+ this.tabs[tabberIndex].li.className = '';
423
+
424
+ return this;
425
+ };
426
+
427
+
428
+ /*==================================================*/
429
+
430
+
431
+ function tabberAutomatic(tabberArgs)
432
+ {
433
+ /* This function finds all DIV elements in the document where
434
+ class=tabber.classMain, then converts them to use the tabber
435
+ interface.
436
+
437
+ tabberArgs = an object to send to "new tabber()"
438
+ */
439
+ var
440
+ tempObj, /* Temporary tabber object */
441
+ divs, /* Array of all divs on the page */
442
+ i; /* Loop index */
443
+
444
+ if (!tabberArgs) { tabberArgs = {}; }
445
+
446
+ /* Create a tabber object so we can get the value of classMain */
447
+ tempObj = new tabberObj(tabberArgs);
448
+
449
+ /* Find all DIV elements in the document that have class=tabber */
450
+
451
+ /* First get an array of all DIV elements and loop through them */
452
+ divs = document.getElementsByTagName("div");
453
+ for (i=0; i < divs.length; i++) {
454
+
455
+ /* Is this DIV the correct class? */
456
+ if (divs[i].className &&
457
+ divs[i].className.match(tempObj.REclassMain)) {
458
+
459
+ /* Now tabify the DIV */
460
+ tabberArgs.div = divs[i];
461
+ divs[i].tabber = new tabberObj(tabberArgs);
462
+ }
463
+ }
464
+
465
+ return this;
466
+ }
467
+
468
+
469
+ /*==================================================*/
470
+
471
+
472
+ function tabberAutomaticOnLoad(tabberArgs)
473
+ {
474
+ /* This function adds tabberAutomatic to the window.onload event,
475
+ so it will run after the document has finished loading.
476
+ */
477
+ var oldOnLoad;
478
+
479
+ if (!tabberArgs) { tabberArgs = {}; }
480
+
481
+ /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */
482
+
483
+ oldOnLoad = window.onload;
484
+ if (typeof window.onload != 'function') {
485
+ window.onload = function() {
486
+ tabberAutomatic(tabberArgs);
487
+ };
488
+ } else {
489
+ window.onload = function() {
490
+ oldOnLoad();
491
+ tabberAutomatic(tabberArgs);
492
+ };
493
+ }
494
+ }
495
+
496
+
497
+ /*==================================================*/
498
+
499
+
500
+ /* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */
501
+
502
+ if (typeof tabberOptions == 'undefined') {
503
+
504
+ tabberAutomaticOnLoad();
505
+
506
+ } else {
507
+
508
+ if (!tabberOptions['manualStartup']) {
509
+ tabberAutomaticOnLoad(tabberOptions);
510
+ }
511
+
512
+ }
language/deutsch.php ADDED
@@ -0,0 +1,410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @XCloner 2.1 - German language file
4
+ * @Translated by Joomla Blog Insider / www.joomla-blog.net - Felix Schumpelick
5
+ * @by order of XCloner.com
6
+ * @version 1.0 - 15.07.08
7
+ **/
8
+
9
+ // --- FRONT AREA---//
10
+ define("LM_FRONT_CHOOSE_PACKAGE","<b>W�hle das zu installierende Paket: </b>");
11
+ define("LM_FRONT_CHOOSE_PACKAGE_SUB","<small>Bitte w�hle die zu installierende Joomla Version</small>");
12
+ define("LM_FRONT_TOP","<span colspan='2' class='contentheading'>Joomla Software online installieren</span>");
13
+ define("LM_FRONT_TOP_FTP_DETAILS","<h2>Gib deine FTP Zugangsdaten unten ein: </h2>");
14
+ define("LM_FRONT_WEBSITE_URL","<b>URL der Webseite: </b>");
15
+ define("LM_FRONT_WEBSITE_URL_SUB","<small>Gib die Webseiten URL ein, wo Joomla installiert werden soll. Beispiel: http://www.seitenname.de/Joomla</small>");
16
+ define("LM_FRONT_FTP_HOST","<b>FTP Hostname:</b>");
17
+ define("LM_FRONT_FTP_HOST_SUB","<small>Beispiel ftp.seitenname.de</small>");
18
+ define("LM_FRONT_FTP_USER","<b>FTP Username:</b>");
19
+ define("LM_FRONT_FTP_USER_SUB","<small>Beispiel John</small>");
20
+ define("LM_FRONT_FTP_PASS","<b>FTP Kennwort:</b>");
21
+ define("LM_FRONT_FTP_PASS_SUB","<small>Beispiel johnpass</small>");
22
+ define("LM_FRONT_FTP_DIR","<b>FTP Verzeichnis: </b>");
23
+ define("LM_FRONT_FTP_DIR_SUB","<small>FTP Verzeichnis in dem du Joomla installieren willst. Beispiel: public_html/Joomla/ oder htdocs/Joomla/. Stelle sicher, dass dieses Verzeichnis volle Schreibrechte hat, normalerweise 777</small>");
24
+ define("LM_TRANSFER_FTP_INCT","Inkrementeller Transfer:");
25
+ define("LM_TRANSFER_FTP_INCT_SUB","Datentransfer �ber FTP im inkrementellen Modus um Timeouts oder wei�e Seiten zu vermeiden.");
26
+ define("LM_FRONT_BOTTOM","Hat nicht funktioniert? Bitte teile uns mit, was das Problem / die Fehlermeldung ist. Wir helfen dir weiter: <a href='http://www.xcloner.com/contact/3/'>XCloner Kontaktseite </a><br />Powered by<a href='http://www.xcloner.com'>XCloner</a>");
27
+ define("LM_FRONT_MSG_OK","Wir haben das Backup-Wiederherstellung Programm auf deine FTP Seite hochgeladen. Um fortzufahren klicke hier");
28
+ define("LM_NOPAKCAGE_ERROR","Es wurde kein Backup Paket gew�hlt. Abbruch...!");
29
+
30
+ // --- BACKEND AREA---//
31
+ define("LM_DATABASE_EXCLUDE_TABLES","W�hle die Tabellen, die vom Backup ausgeschlossen werden sollen (optional)");
32
+ define("LM_CONFIG_SYSTEM_FOLDER","Ordner Anzeige:");
33
+ define("LM_CONFIG_SYSTEM_FOLDER_SUB","Bitte w�hle die Methode aus mit der die Ordner von der Backuperstellung ausgeschlossen werden sollen");
34
+ define("LM_CONFIG_SYSTEM_LANG","System Sprache:");
35
+ define("LM_CONFIG_SYSTEM_LANG_SUB","<small>Konfiguriert die XCloner Sprache. Wenn auf 'System Default' gesetzt, dann wird die Joomla default Sprache angezeigt.</small>");
36
+ define("LM_CONFIG_SYSTEM_LANG_DEFAULT","System Default");
37
+ define("LM_CONFIG_SYSTEM_DOWNLOAD","Direkten Download Link aktivieren:");
38
+ define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","Wenn dies aktiviert ist, im 'Backups anzeigen' Screen,
39
+ ist der Download Link ein direkter Link von deinem Server. Beachte, dass der Backup Pfad im
40
+ Joomla Root Pfad liegen muss");
41
+ define("LM_CONFIG_DISPLAY","Sprachauswahl f�r XCloner");
42
+ define("LM_CONFIG_SYSTEM","System Einstellungen");
43
+ define("LM_CONFIG_SYSTEM_FTP","FTP Transfer Modus");
44
+ define("LM_CONFIG_SYSTEM_FTP_SUB","<small>W�hle aus, wie die Dateien vom einen Server zum anderen Server, unter Verwendung des FTP Protokolls, transferiert werden sollen.</small>");
45
+ define("LM_CONFIG_MEM","Backup unter Benutzung von Server Funktionen, falls verf�gbar:");
46
+ define("LM_CONFIG_MEM_SUB","<small>Wenn du diese Optionen aktivierst, muss dein Server <b>ZIP oder TAR</b> und / oder <b>MySQLDump</b> Befehle unterst�tzen. Zudem musst du deren Pfade angeben. Auch die PHP Funktion <b>exec()</b> muss aktiviert sein. Im Zweifelsfalle frage am Besten bei deinem Hoster nach, ob du diese Funktionen nutzen kannst.</small>");
47
+ define("LM_CRON_DB_BACKUP","Datenbank Backup einschalten:");
48
+ define("LM_CRON_DB_BACKUP_SUB","<small>W�hle 'Ja', wenn du ein Backup der MySQL Daten erstellen willst</small>");
49
+ define("LM_CONFIG_SYSTEM_MBACKUP","Backup Verzeichnis im Klon integrieren:");
50
+ define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>Wenn aktiviert, dann enth�lt das erstellte Backup immer auch alle vorherigen Backups. Damit erh�ht sich die Backup Gr��te jedes Mal deutlich. Somit nur sinnvoll f�r besondere Anwendungszwecke.</small>");
51
+
52
+ define("LM_TAB_MYSQL","MySQL");
53
+ define("LM_CONFIG_MYSQL","MySQL Verbindungseinstellungen");
54
+ define("LM_CONFIG_MYSQLH","MySQL Hostname:");
55
+ define("LM_CONFIG_MYSQLU","MySQL Username:");
56
+ define("LM_CONFIG_MYSQLP","MySQL Passwort:");
57
+ define("LM_CONFIG_MYSQLD","MySQL Datenbank:");
58
+ define("LM_CONFIG_MYSQLH_SUB","");
59
+ define("LM_CONFIG_MYSQLU_SUB","");
60
+ define("LM_CONFIG_MYSQLP_SUB","");
61
+ define("LM_CONFIG_MYSQLD_SUB","");
62
+
63
+ define("LM_TAB_AUTH","Authentifikation");
64
+ define("LM_CONFIG_AUTH","XCloner Authentifikation");
65
+ define("LM_CONFIG_AUTH_USER","Login Username:");
66
+ define("LM_CONFIG_AUTH_PASS","Login Passwort:");
67
+ define("LM_CONFIG_AUTH_USER_SUB","<small>Dies ist dein Login User Name f�r XCloner.</small>");
68
+ define("LM_CONFIG_AUTH_PASS_SUB","<small>Dies ist dein Login Passwort f�r XCloner. Freilassen, wenn du das Passwort nicht �ndern m�chtest.</small>");
69
+
70
+ define("LM_YES","Ja");
71
+ define("LM_NO","Nein");
72
+ define("LM_ACTIVE","Aktiv:");
73
+ define("LM_TAR_PATH","Tar Pfad oder Server Befehl:");
74
+ define("LM_TAR_PATH_SUB","<small>(notwendig wenn 'Aktiv' Checkbox aktiviert und TAR als Archiv Typ gew�hlt ist.)</small>");
75
+ define("LM_ZIP_PATH","Zip Pfad oder Server Befehl:");
76
+ define("LM_ZIP_PATH_SUB","<small>(notwendig wenn 'Aktiv' Checkbox aktiviert und ZIP als Archiv Typ gew�hlt ist.)</small>");
77
+ define("LM_MYSQLDUMP_PATH","MySQLDump Pfad oder Befehl:<br />F�r gro�e MySQL Dumps nutze bitte den Befehl
78
+ <br /><b><small>mysqldump --quote-names --quick --single-transaction --skip-comments</b></small>");
79
+
80
+ // --- CONFIG ---//
81
+ define("LM_CONFIG_MANUAL","Manueller Backup Prozess");
82
+ define("LM_CONFIG_MANUAL_BACKUP","Manuelles Backup:");
83
+ define("LM_CONFIG_MANUAL_BACKUP_SUB","Wenn dein Server eine PHP Ausf�hrungszeit Beschr�nkungen aufweist (siehe Tab 'Server Info'), dann aktiviere das manuelle Backup. Es ben�tigt JavaScript und l�uft ebenfalls automatisch ab.");
84
+ define("LM_CONFIG_MANUAL_FILES","Anzahl der Dateien, die pro manueller Session gesichert werden sollen:");
85
+ define("LM_CONFIG_MANUAL_REFRESH","Zeit zwischen Backup Session Refresh:");
86
+ define("LM_CONFIG_SYSTEM_MDATABASES","Mehrere Datenbanken sichern:");
87
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","Darf XCloner mehrere Datenbanken auf einmal sichern?");
88
+
89
+ define("LM_CONFIG_CRON_LOCAL","Lokaler Server*");
90
+ define("LM_CONFIG_CRON_REMOTE","Remote FTP Account");
91
+ define("LM_CONFIG_CRON_EMAIL","Email**");
92
+ define("LM_CONFIG_CRON_FULL","Komplett (Daten + Datenbank)");
93
+ define("LM_CONFIG_CRON_FILES","Nur Daten");
94
+ define("LM_CONFIG_CRON_DATABASE","Nur Datenbank");
95
+
96
+ define("LM_CONFIG_EDIT","Konfigurationsdatei editieren:");
97
+ define("LM_CONFIG_BSETTINGS","Backup Pfad Einstellungen");
98
+ define("LM_CONFIG_BSETTINGS_OPTIONS","Backup Erstellungsoptionen");
99
+ define("LM_CONFIG_BSETTINGS_SERVER","Server Nutzungsoptionen (optional)");
100
+ define("LM_CONFIG_BPATH","Backup Speicherort:");
101
+ define("LM_CONFIG_UBPATH","Backup Start Pfad:");
102
+ define("LM_CONFIG_BPATH_SUB","<small>dies ist der Pfad, wo alle XCloner Backups gespeichert werden.</small>");
103
+ define("LM_CONFIG_UBPATH_SUB","<small>dies ist der Pfad, in dem der XCloner Backuppozess beginnt - meistens also das Server Root Verzeichnis.</small>");
104
+ define("LM_CRON_EXCLUDE","Ausgeschlossene Verzeichnisse");
105
+ define("LM_CRON_EXCLUDE_DIR","Liste der vom Backup auszuschlie�enden Verzeichnisse. Ein Verzeichnis pro Zeile. Bitte nutze den vollen Serverpfad");
106
+ define("LM_CRON_BNAME","Backup Name:");
107
+ define("LM_CRON_BNAME_SUB","<small>Wenn freigelassen, dann wird XCloner bei jedem Cron Backup einen neuen Namen erzeugen.</small>");
108
+ define("LM_CRON_IP","Zugelassene Cron IP's:");
109
+ define("LM_CRON_IP_SUB","<small>Standardm��ig, hat nur der lokale Server Zugriff zum Cron Job. Du kannst hier aber weitere IP's zulassen - eine IP pro Zeile.</small>");
110
+ define("LM_CRON_DELETE_FILES","�ltere Backups l�schen");
111
+ define("LM_CRON_DELETE_FILES_SUB","Backups l�schen, die �lter sind als: ");
112
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE","Aktiv:");
113
+ define("LM_CRON_SEMAIL","Cron Log emailen an: ");
114
+ define("LM_CRON_SEMAIL_SUB","<small>Wenn eine Email Adresse eingegeben wird, dann wird der Cron Log an diese Adresse gemailt - nachdem der Cron Job gelaufen ist. Es k�nnen mehrere Email Adressen eingegeben werden, getrennt mit ';'.</small>");
115
+ define("LM_CRON_MCRON","Konfigurationsprofil:");
116
+ define("LM_CRON_MCRON_AVAIL","Vorhandene Konfigurationen:");
117
+ define("LM_CRON_MCRON_R","Bitte gib eine kurze, simple Bezeichnung an f�r den Namen dieser neuen Cron Konfiguration.");
118
+ define("LM_CRON_MCRON_SUB","<small>Mit dieser Option kannst du bestimmte Cron Profile erstellen und in einer speziellen Datei abspeichern. Nutze diese Funktion, um mehrere Cron Jobs zu definieren und auszuf�hren.</small>");
119
+ define("LM_CRON_SETTINGS_M","Cron Konfiguration");
120
+ // --- MENU ---//
121
+ define("LM_MENU_OPEN_ALL", "alle �ffnen");
122
+ define("LM_MENU_CLOSE_ALL", "alle schlie�en ");
123
+ define("LM_MENU_ADMINISTRATION","Administration");
124
+ define("LM_MENU_CLONER","XCloner");
125
+ define("LM_MENU_CONFIGURATION","Konfiguration");
126
+ define("LM_MENU_CRON","Cron");
127
+ define("LM_MENU_LANG","�bersetzer");
128
+ define("LM_MENU_ACTIONS","Aktionen");
129
+ define("LM_MENU_Generate_backup","Backup erstellen");
130
+ define("LM_MENU_Restore_backup","Backup wiederherstellen");
131
+ define("LM_MENU_View_backups","Backups anzeigen");
132
+ define("LM_MENU_Documentation","Hilfe");
133
+ define("LM_MENU_ABOUT","�ber");
134
+ define("LM_DELETE_FILE_FAILED","L�schen fehlgeschlagen - bitte Datei Zugriffsrechte pr�fen");
135
+ define("LM_JOOMLAPLUG_CP","XCloner - Die Joomla Backup L�sung");
136
+ define("LM_MENU_FORUM","Forum");
137
+ define("LM_MENU_SUPPORT","Support");
138
+ define("LM_MENU_WEBSITE","Webseite");
139
+
140
+ define("LM_MAIN_Settings","Einstellungen");
141
+ define("LM_MAIN_View_Backups","Backups anzeigen");
142
+ define("LM_MAIN_Generate_Backup","Backup erstellen");
143
+ define("LM_MAIN_Help","Hilfe");
144
+ define("LM_FTP_TRANSFER_MORE","FTP Verbindunsmodus");
145
+
146
+
147
+ // --- LANGUAGE --//
148
+ define("LM_LANG_NAME", "XCloner Sprache");
149
+ define("LM_LANG_MSG_DEL", "Sprache(n) erfolgreich gel�scht!");
150
+ define("LM_LANG_NEW","Neuer Sprach Name:");
151
+ define("LM_LANG_EDIT_FILE","Datei editieren:");
152
+ define("LM_LANG_EDIT_FILE_SUB","Bitte vergi� nicht, die �bersetzung alle 5 Minuten zu speichern. Dr�cke dazu einfach den Apply Button.");
153
+
154
+
155
+ // --- TABS --//
156
+ define("LM_TAB_GENERAL","Allgemein");
157
+ define("LM_TAB_G_STRUCTURE","Struktur");
158
+ define("LM_TAB_SYSTEM","System");
159
+ define("LM_TAB_CRON","Cron");
160
+ define("LM_TAB_INFO","Server Info");
161
+ define("LM_TAB_G_DATABASE","Datenbank Optionen");
162
+ define("LM_TAB_G_FILES","Datei Optionen");
163
+ define("LM_G_EXCLUDE_COMMENT","<br>Auszuschlie�ende Ordner bitte hier angeben. 1 Ordner pro Zeile.
164
+ <br><b>M�glicherweise willst du die das Cache Feature deaktivieren, w�hrend du ein Backup erstellst. Ansonsten kannst du auch das Cache Verzeichnis vom Backup ausschlie�en.</b>");
165
+
166
+
167
+ // --- MESSAGES --//
168
+ // front end
169
+ define("LM_MSG_FRONT_1","Kein Backup Paket vorhanden");
170
+ define("LM_MSG_FRONT_2","Der FTP Upload ist leider fehlgeschlagen");
171
+ define("LM_MSG_FRONT_3","Upload erledigt f�r");
172
+ define("LM_MSG_FRONT_4","FTP Verbindung fehlgeschlagen!");
173
+ define("LM_MSG_FRONT_5","Verbindungsversuch zu");
174
+ define("LM_MSG_FRONT_6","f�r User");
175
+
176
+ //backend
177
+ define("LM_MSG_BACK_1","Konfiguration erfolgreich aktualisiert...");
178
+ define("LM_MSG_BACK_2","FTP Verbindung fehlgeschlagen!");
179
+ define("LM_MSG_BACK_3","Verschieben des Backups erfolgreich! Das ausgew�hlte Backup sollte nun an der neuen Stelle verf�gbar sein.");
180
+ define("LM_MSG_BACK_4","Verschieben erfolgreich - starte den Klon Prozess auf dem Remote Host");
181
+ define("LM_MSG_BACK_5","Frontend Anzeige erfolgreich deaktiviert");
182
+ define("LM_MSG_BACK_6","Deaktivierung fehlgeschlagen! Bitte �berpr�fe die Pfade!");
183
+ define("LM_MSG_BACK_7","Frontpage Ver�ffentlichung erfolgreich deaktiviert");
184
+ define("LM_MSG_BACK_8","Frontpage Deaktivierung fehlgeschlagen! Bitte �berpr�fe die Pfade!");
185
+ define("LM_MSG_BACK_9","Klon erfolgreich umbenannt!");
186
+ define("LM_MSG_BACK_10","Der Joomla Pfad ist nicht innerhalb deines Backup Pfades. Konnte den direkten Download Modus nicht nutzen. Du solltest deine Server Konfiguration im Tab 'System Info' �berpr�fen und die Option 'Direct Download link' auf 'Nein' stellen.");
187
+ define("LM_MSG_BACK_11","Fertig! Manueller Backup Vorgang erfolgreich abgeschlossen! <a href='index2.php?option=com_cloner&task=view'>Klicke hier um fortzufahren</a>");
188
+ define("LM_MSG_BACK_12","<h2>Backup ist leider fehlgeschlagen! Bitte �berpr�fe ob dein Server die ZIP Funktion (/usr/bin/zip or /usr/local/bin/zip) unterst�zt und ob die Pfade in der Konfiguration korrekt gesetzt sind.</h2>");
189
+ define("LM_MSG_BACK_13","<h2>Backup ist leider fehlgeschlagen! Bitte �berpr�fe ob dein Server die TAR Funktion (/usr/bin/tar or /usr/local/bin/tar) unterst�zt und ob die Pfade in der Konfiguration korrekt gesetzt sind.</h2>");
190
+ define("LM_MSG_BACK_14","<font color='red'>Leider gab es ein Problem bei der Erstellung des Datenbank Backups. Bitte �berpr�fe deinen MySQLDump Server Pfad im Tab 'Allgemein'.</font>");
191
+
192
+ define("LM_CRON_TOP","Anleitung - Cron Backup einstellen");
193
+ define("LM_CRON_SUB","Mit Hilfe der Cron Funktion kannst du voll automatische Backups deiner Joomla Webseite erstellen lassen!
194
+ Um dies zu aktivieren, musst du in deinem Cron Job Panel deines Servers, Details zum CronJob erf�hrst du von
195
+ deinem Hoster, folgenden Befehl hinzuf�gen:<br />");
196
+ define("LM_CRON_HELP","Anmerkungen:
197
+ - wenn dein PHP Verzeichnis nicht /usr/bin/php ist, dann nutze bitte folgendes: format /$"."php_path/php
198
+
199
+
200
+ Weiterf�hrende Informationen (englisch) wie man ein Cronjob konfiguriert f�r
201
+ - Cpanel <a href='http://www.cpanel.net/docs/cpanel/' target='_blank'>click here</a>
202
+ - Plesk <a href='http://www.swsoft.com/doc/tutorials/Plesk/Plesk7/plesk_plesk7_eu/plesk7_eu_crontab.htm' target='_blank'>click here</a>
203
+ - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>click here</a>
204
+ - General Linux crontab info <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>click here</a>
205
+
206
+ Wenn du Hilfe beim Setup des Cron Backups ben�tigst oder Probleme beim Cron Backups hast, dann wende dich bitte
207
+ an unser Forum <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a> oder schreibe uns eine Email an <a href='mailto:admin@xcloner.com'>admin@xcloner.com</a>");
208
+ define("LM_CRON_SETTINGS","Cron Einstellungen");
209
+ define("LM_CRON_MODE","Backup Speicher Modus:");
210
+ define("LM_CRON_MODE_INFO"," <br />
211
+ <small>*: Wenn 'Lokaler Server' ausgew�hlt wird, dann wird der default Backup Pfad aus dem Tab 'Allgemein' genutzt, um das Backup zu speichern.</small>
212
+ <br /><br />
213
+ <small>**: Wenn 'Email' ausgew�hlt wird, dann kann nicht garantiert werden, dass das Backup korrekt zugestellt wird, wenn Provider Einschr�nkungen �berschritten werden (Speicherplatz, etc.).</small>
214
+ ");
215
+ define("LM_CRON_TYPE_INFO","<small><br />Bitte w�hle den Backup Modus, mit dem die Cron Backups erstellt werden sollen.</small>");
216
+ define("LM_CRON_MYSQL_DETAILS","MySQL Optionen");
217
+ define("LM_CRON_MYSQL_DROP","MySQL Drop erg�nzen:");
218
+ define("LM_CRON_TYPE","Backup Modus:");
219
+ define("LM_CRON_FTP_DETAILS","FTP Speichermodus Details");
220
+ define("LM_CRON_FTP_SERVER","FTP Server:");
221
+ define("LM_CRON_FTP_USER","FTP Username:");
222
+ define("LM_CRON_FTP_PASS","FTP Passwort:");
223
+ define("LM_CRON_FTP_PATH","FTP Pfad:");
224
+ define("LM_CRON_FTP_DELB","Nach Transfer das Backup l�schen:");
225
+ define("LM_CRON_EMAIL_DETAILS","Email Modus Details");
226
+ define("LM_CRON_EMAIL_ACCOUNT","Email Account:");
227
+ define("LM_CRON_COMPRESS","Backup Archive komprimieren:");
228
+ define("LM_RESTORE_TOP","Anleitung - Backup wiederherstellen");
229
+ define("LM_CREDIT_TOP","�ber XCloner:");
230
+ define("LM_CLONE_FORM_TOP","<h2>Bitte gib deine FTP Einstellungen hier ein:</h2>");
231
+
232
+ // --- Info Tab ---//
233
+
234
+ define("LM_CONFIG_INFO_T_SAFEMODE","PHP Safe_mode:");
235
+ define("LM_CONFIG_INFO_T_MTIME","PHP max_execution_time:");
236
+ define("LM_CONFIG_INFO_T_MEML","PHP memory_limit:");
237
+ define("LM_CONFIG_INFO_T_BDIR","PHP open_basedir:");
238
+ define("LM_CONFIG_INFO_T_EXEC","exec() Funktion Support:");
239
+ define("LM_CONFIG_INFO_T_TAR","TAR Utility Server Pfad:");
240
+ define("LM_CONFIG_INFO_T_ZIP","ZIP Utility Server Pfad:");
241
+ define("LM_CONFIG_INFO_T_MSQL","MySQLDump Utility Server Pfad:");
242
+ define("LM_CONFIG_INFO_T_BPATH","Backup Pfad:");
243
+ define ("LM_CONFIG_INFO_ROOT_BPATH","Backup Start Pfad:");
244
+ define("LM_CONFIG_INFO_ROOT_PATH_SUB","<small>Der Backup Start Pfad muss existieren und lesbar sein, damit XCloner den Backup Prozess starten kann.</small>");
245
+ define("LM_CONFIG_INFO_ROOT_BPATH_TMP", "Tempor�res Verzeichnis:");
246
+ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","<small>Dieser Pfad muss erstellt und beschreibbar sein, damit XCloner ordnungsgem�� arbeiten kann.</small>");
247
+
248
+
249
+ define("LM_CONFIG_INFO","Dieses Tab zeigt allgemeine System Infos und Pfade");
250
+ define("LM_CONFIG_INFO_PATHS","Generelle Pfad Informationen:");
251
+ define("LM_CONFIG_INFO_PHP","PHP Konfiguration:");
252
+ define("LM_CONFIG_INFO_TIME","<small>Diese Einstellung definiert die maximale Zeit in Sekunden, die das Backup Skript auf dem Server laufen darf.</small>");
253
+ define("LM_CONFIG_INFO_MEMORY","<small>Diese Einstellung definiert, wieviel Speicher das Backup Skript f�r die Backuperstellung maximal nutzen darf.</small>");
254
+ define("LM_CONFIG_INFO_BASEDIR","<small>Diese Einstellung definiert die Pfade, auf welche das Backup Skript zugreifen darf. Kein Wert hei�t, dass das Skript auf alle Pfade zugreifen darf.</small>");
255
+ define("LM_CONFIG_INFO_SAFEMODE","<small>Safe Mode muss 'Off' geschaltet sein, damit XCloner ordnungsgem�� funktioniert.</small>");
256
+ define("LM_CONFIG_INFO_TAR","<small>Wenn das Skript den TAR Pfad nicht automatisch bestimmen kann, musst du die TAR Option 'Aktiv' im Tab 'Allgemein' deaktivieren.</small>");
257
+ define("LM_CONFIG_INFO_ZIP","<small>Wenn das Skript den ZIP Pfad nicht automatisch bestimmen kann, musst du die ZIP Option 'Aktiv' im Tab 'Allgemein' deaktivieren.</small>");
258
+ define("LM_CONFIG_INFO_MSQL","<small>Wenn das Skript den MySQLDump Pfad nicht automatisch bestimmen kann, musst du die MySQLDump Option 'Aktiv' im Tab 'Allgemein' deaktivieren.</small>");
259
+ define("LM_CONFIG_INFO_EXEC","<small>Wenn diese Funktion deaktiviert ist, musst du die Checkbox 'Aktiv' im Tab 'Allgemein' deaktivieren.</small>");
260
+ define("LM_CONFIG_INFO_BPATH","<small>Dieses Verzeichnis muss beschreibbar sein, damit XCloner die Backups abspeichern kann.</small>");
261
+
262
+
263
+ // --- TRANSFER DETAILS---//
264
+
265
+ define("LM_TRANSFER_URL","Website URL:");
266
+ define("LM_TRANSFER_URL_SUB","<small>Bitte gib die Webseiten URL an, auf die das Backup geklont / kopiert werden soll. Beispiel: http://www.webseite.de/</small>");
267
+ define("LM_TRANSFER_FTP_HOST","FTP Hostname:");
268
+ define("LM_TRANSFER_FTP_HOST_SUB","Beispiel ftp.webseite.de");
269
+ define("LM_TRANSFER_FTP_USER","FTP Username:");
270
+ define("LM_TRANSFER_FTP_USER_SUB","Beispiel 'john'");
271
+ define("LM_TRANSFER_FTP_PASS","FTP Passwort:");
272
+ define("LM_TRANSFER_FTP_PASS_SUB","Beispiel 'johnpass'");
273
+ define("LM_TRANSFER_FTP_DIR","FTP Verzeichnis:");
274
+ define("LM_TRANSFER_FTP_DIR_SUB","Bitte gib das FTP Verzeichnis an, auf die das Backup geklont / kopiert werden soll. Beispiel: public_html/ oder htdocs/ . Stelle die Zugriffberechtigungen daf�r auf 777.");
275
+
276
+
277
+ // --- GENERATE BACKUP---//
278
+
279
+ define("LM_BACKUP_NAME","<b>Bitte w�hlen den gew�nschten Backupnamen</b>");
280
+ define("LM_BACKUP_NAME_SUB","<small>Wenn freigelassen, wird XCloner den Default Backupnamen w�hlen.</small>");
281
+
282
+
283
+ // -- General --//
284
+ define("LM_COM_TITLE" , "XCloner Backup Manager - ");
285
+ define("LM_COM_TITLE_CONFIRM" , "Best�tige die Verzeichnis Auswahl");
286
+
287
+ define("LM_COL_FILENAME" , "Backup Archiv");
288
+ define("LM_COL_DOWNLOAD" , "Download");
289
+ define("LM_COL_AVALAIBLE","Frontend Paket");
290
+ define("LM_COL_SIZE" , "Gr��e");
291
+ define("LM_COL_DATE" , "Datum der Backuperstellung");
292
+ define("LM_COL_FOLDER" , "<b>Verzeichnisse und / oder Dateien ausschlie�en</b>");
293
+
294
+ define("LM_DELETE_FILE_SUCCESS", "Datei(en) gel�scht");
295
+ define("LM_DOWNLOAD_TITLE", "Downloade dieses Backup Archiv");
296
+
297
+
298
+ define("LM_ARCHIVE_NAME" , "Archive Name");
299
+ define("LM_NUMBER_FOLDERS" , "Anzahl der Verzeichnisse");
300
+ define("LM_NUMBER_FILES" , "Anzahl der Dateien");
301
+ define("LM_SIZE_ORIGINAL" , "Gr��e der Originaldatei");
302
+ define("LM_SIZE_ARCHIVE" , "Gr��e des Archivs");
303
+ define("LM_DATABASE_ARCHIVE" , "Backup der Datenbank");
304
+
305
+ define("LM_CONFIRM_INSTRUCTIONS" , "<b>Bitte w�hle die Verzeichnisse, die von der Backuperstellung ausgeschlossen werden sollen.</b> <br />
306
+ - standardm��ig werden alle Verzeichnisse gesichert. Schlie�e Verzeichnisse aus, indem du die jeweiligen Checkboxen der Verzeichnisse aktivierst.");
307
+ define("LM_CONFIRM_DATABASE" , "Datenbank sichern und in Backup Archiv integrieren");
308
+
309
+
310
+ define("LM_DATABASE_EXCLUDED", "Ausgeschlossen");
311
+ define("LM_DATABASE_CURRENT","Aktuelle Datenbank:");
312
+ define("LM_DATABASE_INCLUDE_DATABASES","Zus�tzliche Datenbanken sichern");
313
+ define("LM_DATABASE_INCLUDE_DATABASES_SUB","<small>Du kannst mehrere Datenbanken in die Backuperstellung einschlie�en, indem du die STRG Taste beim Ausw�hlen mit der Maus gedr�ckt h�lst. Die Datenbanken werden im Administrator / Backups Verzeichnis in deinem Backup Archiv gespeichert.</small>");
314
+ define("LM_DATABASE_MISSING_TABLES", "Fehler: Tabellen Definitionen nicht gefunden");
315
+ define("LM_DATABASE_BACKUP_FAILED", "Backup ist leider fehlgeschlagen. Bitte �berpr�fe, ob das Administrator / Backup Verzeichnis Schreibzugriff hat!");
316
+ define("LM_DATABASE_BACKUP_COMPLETED", "Backup vollst�ndig");
317
+ define("LM_RENAME_TOP","Ausgew�hlte Klone umbenennen");
318
+ define("LM_RENAME","Klon umbenennen ");
319
+ define("LM_RENAME_TO"," zu ");
320
+ // --- CLONER RESTORE--- //
321
+
322
+ define("LM_CLONER_RESTORE","<h2>Wie du ein Backup an verschiedenen Stellen wiederherstellen kannst</h2>
323
+ <pre>
324
+ Mit XCloner ist es kaum einfacher deine Backups wiederherzustellen. Mit Hilfe der Klon Funktion aus dem <a href='index2.php?option=com_cloner&task=view'>Backups anzeigen</a>
325
+ Bereich kannst du deine Joomla Backups an jede Stelle im Internet verschieben und wiederherstellen / einspielen.
326
+
327
+ Und folgende Arbeitsschritte sind daf�r notwendig:
328
+
329
+ <b>Schritt 1 - Bewege dein Backup auf den neuen Server</b>
330
+
331
+ - �ffne den Bereich 'Backups anzeigen' im XCloner Backend
332
+ - nachdem du das jeweilige Backup ausgew�hlt hast, klicke auf den 'Clone' Button
333
+ - gib nun die FTP Zugangsdaten des neuen Servers ein, an dem das Backup eingespielt werden soll
334
+ - Nachdem du den Submit Button angeklickt hast wird das Backup und das Wiederherstellungsskript auf
335
+ den neuen Server kopiert
336
+ - Du bekommst abschlie�end eine URL angezeigt, die dich zum n�chsten Arbeitsschritt f�hrt.
337
+ Beispiel URL: <b>http://neue-seite.de/XCloner.php</b>
338
+
339
+ <b>Anmerkung: </b>Wenn dieser Prozess fehlschlagen sollte, dann befolge diese Schritte:
340
+ 1. Downloade das Backup auf deinen Computer
341
+ 2. Downloade das Wiederherstellungsskript, welches aus 3 Dateien besteht. Zu finden im
342
+ Verzeichnis administrator/components/com_xcloner/restore
343
+ 3. Uploade das Backup und alle 3 Dateien des Wiederherstellungskripts auf den neuen Server
344
+ 4. Rufe nun XCloner.php auf dem neuen Server mit deinem Browser auf und befolge abschlie�end
345
+ die Anweisungen des Wiederherstellungsskripts
346
+
347
+ <b>Schritt 2 - XCloner Wiederherstellungsskript</b>
348
+
349
+ - In diesem Schritt hast du bereits das Backup und das Wiederherstellungsskript auf dem neuen Server (siehe oben)
350
+ - Gib nun deine neuen MySQL Zugangsdaten des neuen Servers ein
351
+ (MySQL hostname, user, pass und Datenbank Name)
352
+ - Gib die URL der neuen Webseite und die neuen Zugangsdaten ein
353
+ - F�r die eigentliche Wiederherstellung des Backups hast du <b>zwei Optionen:</b>
354
+
355
+ - 1. Wiederherstellung der Dateien �ber FTP. Das Skript wird ein FTP Upload auf den neuen Server simulieren.
356
+ Somit werden eventuelle Zugriffsprobleme vermieden (wwwrun)
357
+ - 2. Direkte Wiederherstellung der Dateien. Dabei wird das Backup direkt auf dem Server entpackt. Diese Option
358
+ ist schneller, kann aber an Zugriffsprobleme scheitern, wenn der Zugriff auf den FTP User eingestellt ist
359
+ anstatt wwwrun
360
+
361
+ - Nachdem du den Submit Button angeklickt hast, beginnt die Wiederherstellung / das Einspielen der Dateien
362
+ und der Datenbank
363
+ - Wenn alles einwandfrei geklappt hat, kann der Backup Klon direkt auf der neuen URL / Server verwendet werden
364
+
365
+ Hast du Fragen oder Probleme? Dann wende dich bitte an unser Forum <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
366
+ oder schreibe uns eine Email an <a href='mailto:info@xcloner.com'>info@xcloner.com</a>.
367
+
368
+ </pre>");
369
+
370
+
371
+ // --- ABOUT CLONER---//
372
+
373
+ define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2><br />
374
+ <pre>XCloner ist ein Tool, das dir bei der Backuperstellung von Joomla Webseiten umfassend hilft - bishin zur voll
375
+ automatischen Backuperstellung. Du kannst Backups erstellen, wiederherstellen oder verschieben und klonen. So wird
376
+ deine Webseite immer abgesichert sein und das ohne gro�en Aufwand.
377
+
378
+ <b>Features:</b>
379
+ - Cron Skript f�r die automatische Backuperstellung
380
+ - Optionen f�r multiple Backups
381
+ - Wiederherstellungstool f�r das einfache, schnelle Verschieben von ganzen Webseiten
382
+ - Verschiedene Backuporte, an denen das Backup sicher gespeichert werden kann
383
+
384
+ F�r Mitteilungen und Vorschl�ge wende dich bitte an admin@xcloner.com oder besuche uns auf
385
+ <a href='http://www.xcloner.com'>http://www.xcloner.com</a>.
386
+
387
+ <b>Deutsche �bersetzung</b>: Du hast Verbesserungsvorschl�ge oder Fragen bez�glich der deutschen �bersetzung von
388
+ XCloner? Dann wende dich per Kontaktformular an <a href='http://www.joomla-blog.net'>Joomla Blog Insider</a>. Vielen Dank im Voraus!
389
+ </pre>
390
+ <br/>
391
+ XCloner.com &copy; 2004-2010 | <a href=\"http://www.xcloner.com\">www.xcloner.com</a>
392
+ <br/><p/><br/>
393
+ ");
394
+
395
+ define("LM_LOGIN_TEXT","
396
+ <pre>
397
+ <b>Weitere Infos:</b>
398
+ 1. Wenn du diesen Login das erste Mal siehst, ist dein Username '<i>admin</i>' und dein Passwort '<i>admin</i>'.
399
+ Bitte �ndere beide Angaben nach dem Login
400
+
401
+ 2. Wenn du dein Passwort vergessen haben solltest, kannst du dieses leicht zur�cksetzen. Du musst dazu folgenden
402
+ Code erg�nzen:
403
+
404
+ <b>$"."_CONFIG[\"jcpass\"] = md5(\"neues_passwort\");</b>
405
+
406
+ am Ende der Konfigurationsdatei cloner.config.php direkt vor der Zeile '?>'
407
+ Vergi� nicht die Angabe 'neues_passwort' mit deinem neuen pers�nlichen Passwort zu ersetzen.
408
+ </pre>
409
+ ");
410
+ ?>
language/dutch.php ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ define("LM_FRONT_CHOOSE_PACKAGE","<b>Kies het installatie pakket:</b>");
3
+ define("LM_FRONT_CHOOSE_PACKAGE_SUB","<small>Selecteer de Joomla! versie die je wilt installeren</small>");
4
+ define("LM_FRONT_TOP","<span colspan='2' class='contentheading'>Installeer Joomla Software Online</span>");
5
+ define("LM_FRONT_TOP_FTP_DETAILS","<h2>Vul je ftp gegevens hieronder in:</h2>");
6
+ define("LM_FRONT_WEBSITE_URL","<b>Website URL:</b>");
7
+ define("LM_FRONT_WEBSITE_URL_SUB","<small>Vul aub de URL van de website in waar Joomla geinstalleerd zal worden, bijvoorbeeld http://www.sitenaam.nl/Joomla</small>");
8
+ define("LM_FRONT_FTP_HOST","<b>FTP Hostnaam:</b>");
9
+ define("LM_FRONT_FTP_HOST_SUB","<small>voorbeeld ftp.sitename.com</small>");
10
+ define("LM_FRONT_FTP_USER","<b>Ftp gebruikersnaam:</b>");
11
+ define("LM_FRONT_FTP_USER_SUB","<small>voorbeeld john</small>");
12
+ define("LM_FRONT_FTP_PASS","<b>Ftp wachtwoord:</b>");
13
+ define("LM_FRONT_FTP_PASS_SUB","<small>voorbeeld johnpass</small>");
14
+ define("LM_FRONT_FTP_DIR","<b>FTP Directory:</b>");
15
+ define("LM_FRONT_FTP_DIR_SUB","<small>Vul aub de directorie in waar je Joomla! wilt installeren, bijvoorbeeld public_html/Joomla/ or htdocs/Joomla/ en zorg ervoor dat er schrijfrechten zijn voor iedereen, normaliter 777.</small>");
16
+ define("LM_TRANSFER_FTP_INCT","Gedeeltelijke transfer:");
17
+ define("LM_TRANSFER_FTP_INCT_SUB","zal proberen de bestanden via een gedeeltelijke transfer over te brengen om zo blanke pagina�s en time outs te voorkomen.");
18
+ define("LM_FRONT_BOTTOM","Werkt die niet voor jou? Vertel ons waarom niet -> <a href='http://www.xcloner.com/contact/'>Contact pagina</a><br />
19
+ Powered by <a href='http://www.xcloner.com'>XCloner</a>");
20
+ define("LM_FRONT_MSG_OK","We hebben de Package Restore Utility ge�pload naar je ftp site. klik hier om door te gaan");
21
+ define("LM_NOPAKCAGE_ERROR","Er is geen pakket geselecteerd, installatie wordt afgebroken");
22
+ define("LM_DATABASE_EXCLUDE_TABLES","Selecteer de tabellen die niet met de backup meegenomen dienen te worden:");
23
+ define("LM_CONFIG_SYSTEM_FOLDER","Mapweergave:");
24
+ define("LM_CONFIG_SYSTEM_FOLDER_SUB","selecteer aub de manier waarop je de mappen wilt uitsluiten in de 'Genereer Backup' sectie.");
25
+ define("LM_CONFIG_SYSTEM_LANG","Systeem taal:");
26
+ define("LM_CONFIG_SYSTEM_LANG_SUB","configureert de taal van XCloner, als deze waarde op standaard staat, zal de taal van de site gebruikt worden, indien beschikbaar.");
27
+ define("LM_CONFIG_SYSTEM_LANG_DEFAULT","Systeem Standaard");
28
+ define("LM_CONFIG_SYSTEM_DOWNLOAD","Maak directe download link aan:");
29
+ define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","indien dit is aangevinkt in het 'Bekijk de Backup's scherm zal de download link een directe link zijn naar het desbetreffende backup pakket. Houdt er rekening mee dat de backup in de Joomla! root aangemaakt moet zijn.");
30
+ define("LM_CONFIG_DISPLAY","Weergave Instellingen");
31
+ define("LM_CONFIG_SYSTEM","Systeem Instellingen");
32
+ define("LM_CONFIG_SYSTEM_FTP","Ftp Transfer Modus");
33
+ define("LM_CONFIG_SYSTEM_FTP_SUB","selecteer hoe de bestanden moeten worden overgebracht van server naar server wanneer het ftp protocol gebruikt wordt.");
34
+ define("LM_CONFIG_MEM","Backup met gebruik van de Serverfuncties");
35
+ define("LM_CONFIG_MEM_SUB","<small>Indien ingesteld op Actief, ben je verplicht om op je server ondersteuning te hebben voor <b>zip of tar</b> en/of <b> mysqldump commando's en zul je de paden aan moeten geven en ook <b>exec()</b> toegang in je php</small>");
36
+ define("LM_CRON_DB_BACKUP","Maak Database backup mogelijk:");
37
+ define("LM_CRON_DB_BACKUP_SUB","<small>Vink Ja aan indien je de MySQL data wilt back-uppen</small>");
38
+ define("LM_CONFIG_SYSTEM_MBACKUP","Sluit backup directory in wanneer de site gekloond wordt:");
39
+ define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>Indien Ja gebruikt wordt, zal de gemaakte backup ook alle vooraf gemaakte backups in deze backup opnemen, wat er toe bijdraagt dat de grootte van het bestand iedere keer toeneemt</small>");
40
+ define("LM_TAB_MYSQL","MySQL");
41
+ define("LM_CONFIG_MYSQL","MySQL verbindings intsellingen:");
42
+ define("LM_CONFIG_MYSQLH","MySQL Hostname:");
43
+ define("LM_CONFIG_MYSQLU","MySQL gebruikersnaam:");
44
+ define("LM_CONFIG_MYSQLP","MySQL wachtwoord:");
45
+ define("LM_CONFIG_MYSQLD","MySQL Database:");
46
+ define("LM_TAB_AUTH","Authentificatie");
47
+ define("LM_CONFIG_AUTH","Gebruikers Authentificatie Sectie");
48
+ define("LM_CONFIG_AUTH_USER","Login Gebruikersnaam:");
49
+ define("LM_CONFIG_AUTH_PASS","Login Wachtwoord:");
50
+ define("LM_CONFIG_AUTH_USER_SUB","Dit is de standaard inlog voor Xcloner");
51
+ define("LM_CONFIG_AUTH_PASS_SUB","je standaard login wachtwoord, leeg laten als je het niet wilt veranderen.");
52
+ define("LM_YES","Ja");
53
+ define("LM_NO","Neen");
54
+ define("LM_ACTIVE","Actief:");
55
+ define("LM_TAR_PATH","Tar pad of commando:");
56
+ define("LM_TAR_PATH_SUB","(verplicht indien archief type Tar en Actieve box zijn aangevinkt)");
57
+ define("LM_ZIP_PATH","Zip pad of commando:");
58
+ define("LM_ZIP_PATH_SUB","(verplicht indien archief type Zip en Actieve box zijn aangevinkt)");
59
+ define("LM_MYSQLDUMP_PATH","MySQL dump pad or commando: (verplicht indien Actieve box is aangevinkt)<br /> Voor grote MySQL dumps gebruik je het beste
60
+ <br /><b><small>mysqldump --quote-names --quick --single-transaction --skip-comments</b></small>");
61
+ define("LM_CONFIG_MANUAL","Handmatig Backup Proces");
62
+ define("LM_CONFIG_MANUAL_BACKUP","Handmatige backup:");
63
+ define("LM_CONFIG_MANUAL_BACKUP_SUB","Deze optie wordt weergegeven indien er een php tijd uitvoer limiet op je server zit. Je dient voor het gebruiken van deze optie Javascript in je browser geactiveerd te hebben.");
64
+ define("LM_CONFIG_MANUAL_FILES","Bestanden die per handmatige sessie verwerkt moeten worden");
65
+ define("LM_CONFIG_MANUAL_REFRESH","Tijd tussen het verversen van de sessies:");
66
+ define("LM_CONFIG_SYSTEM_MDATABASES","Backup Meerdere Databases:");
67
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","Deze optie zal er voor zorgen dat XCloner meerdere databases kan backuppen.");
68
+ define("LM_CONFIG_CRON_LOCAL","Locale Server*");
69
+ define("LM_CONFIG_CRON_REMOTE","FTP account op afstand");
70
+ define("LM_CONFIG_CRON_EMAIL","E-mail**");
71
+ define("LM_CONFIG_CRON_FULL","Volledig (bestanden + database)");
72
+ define("LM_CONFIG_CRON_FILES","Enkel de bestanden");
73
+ define("LM_CONFIG_CRON_DATABASE","Enkel de Database");
74
+ define("LM_CONFIG_EDIT","Bewerken van het config bestand");
75
+ define("LM_CONFIG_BSETTINGS","Backup Pad Instellingen");
76
+ define("LM_CONFIG_BSETTINGS_OPTIONS","Backup Generator Opties");
77
+ define("LM_CONFIG_BSETTINGS_SERVER","Server Gebruiks Opties");
78
+ define("LM_CONFIG_BPATH","Backup Oplsag Pad:");
79
+ define("LM_CONFIG_UBPATH","Backup Start Pad:");
80
+ define("LM_CONFIG_BPATH_SUB","<small>dit is het pad waar alle backups zullen worden opgeslagen</small>");
81
+ define("LM_CONFIG_UBPATH_SUB","<small>vul hier het pad in van waaruit XCloner alle processen zal starten</small>");
82
+ define("LM_CRON_EXCLUDE","Directories die uitgesloten dienen te worden");
83
+ define("LM_CRON_EXCLUDE_DIR","Sluit diretories uit, een per lijn<br> gebruik aub het volledige pad van de server directory");
84
+ define("LM_CRON_BNAME","Backup Naam:");
85
+ define("LM_CRON_BNAME_SUB","<small>Indien leeg wordt er een standaard naam gekozen wanneer er een nieuwe backup via cron wordt gemaakt</small>");
86
+ define("LM_CRON_IP","IP adressen die gebruik mogen maken van de cron optie:");
87
+ define("LM_CRON_IP_SUB","<small>Standaard heeft enkel de locale server toegant tot een cron job, maar je mag ook andere IP nummers invullen, ��n per lijn.</small>");
88
+ define("LM_CRON_DELETE_FILES","Oude Backups verwijderen");
89
+ define("LM_CRON_DELETE_FILES_SUB","Verwijder backups ouder dan:");
90
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Actief:");
91
+ define("LM_CRON_SEMAIL","E-mail cron log naar:");
92
+ define("LM_CRON_SEMAIL_SUB","Als er een e-mail adres is ingevuld, zal het log dat gemaakt is gedurende de cron-job naar dat betreffende e-mail adres gestuurd. Er kunnen meerdere e-mail adressen worden ingevuld, gescheiden door een ;");
93
+ define("LM_CRON_MCRON","Configuratie Naam:");
94
+ define("LM_CRON_MCRON_AVAIL","Beschikbare Configuraties:");
95
+ define("LM_CRON_MCRON_R","vul aub een eenvoudige naam in voor je nieuwe cron configuratie");
96
+ define("LM_CRON_MCRON_SUB","Met deze optie ben je in staat om de huidige configuratie op te slaan in een apart bestand en om het te gebruiken als je meerdere cron-jobs tegelijk uitvoert");
97
+ define("LM_CRON_SETTINGS_M","Meerdere CronJobs Configuratie");
98
+ define("LM_MENU_OPEN_ALL","alles openvouwen");
99
+ define("LM_MENU_CLOSE_ALL","alles sluiten");
100
+ define("LM_MENU_ADMINISTRATION","Administratie");
101
+ define("LM_MENU_CLONER","XCloner");
102
+ define("LM_MENU_CONFIGURATION","Configuratie");
103
+ define("LM_MENU_CRON","Cronjob");
104
+ define("LM_MENU_LANG","Vertaler");
105
+ define("LM_MENU_ACTIONS","Acties");
106
+ define("LM_MENU_Generate_backup","Backup maken");
107
+ define("LM_MENU_Restore_backup","Backup Herstellen");
108
+ define("LM_MENU_View_backups","Backups Bekijken");
109
+ define("LM_MENU_Documentation","Hulp");
110
+ define("LM_MENU_ABOUT","Over");
111
+ define("LM_DELETE_FILE_FAILED","Verwijderen mislukt, controleer de bestandsrechten");
112
+ define("LM_JOOMLAPLUG_CP","XCloner - de backup en herstel oplossing voor je website");
113
+ define("LM_MENU_FORUM","Fora");
114
+ define("LM_MENU_SUPPORT","Ondersteuning");
115
+ define("LM_MENU_WEBSITE","Web-site");
116
+ define("LM_MAIN_Settings","Instellingen");
117
+ define("LM_MAIN_View_Backups","Bekijk Backups");
118
+ define("LM_MAIN_Generate_Backup","Maak Backup");
119
+ define("LM_MAIN_Help","Hulp");
120
+ define("LM_FTP_TRANSFER_MORE","FTP Connectie Modus");
121
+ define("LM_LANG_NAME","Naam van taal");
122
+ define("LM_LANG_MSG_DEL","Taal met succes verwijderd.");
123
+ define("LM_LANG_NEW","Nieuwe naam voor taal:");
124
+ define("LM_LANG_EDIT_FILE","Bestand bewerken:");
125
+ define("LM_LANG_EDIT_FILE_SUB","Vergeet niet om om de 5 minuten je vertaling op te slaan. Klik gewoon op de Apply knop om een update te maken");
126
+ define("LM_TAB_GENERAL","Algemeen");
127
+ define("LM_TAB_G_STRUCTURE","Structuur");
128
+ define("LM_TAB_SYSTEM","Systeem");
129
+ define("LM_TAB_CRON","Cronjob");
130
+ define("LM_TAB_INFO","Informatie");
131
+ define("LM_TAB_G_DATABASE","Database Opties");
132
+ define("LM_TAB_G_FILES","Bestands Opties");
133
+ define("LM_G_EXCLUDE_COMMENT","<br>Vul hier aub de mappen in die uitgesloten worden van de backup, iedere map op een aparte lijn!
134
+ <br><b>je zou het beste de cache functie kunnen uitschakelen als je begint met een backup te maken, of de cache mappen uitsluiten van de backup.</b>");
135
+ define("LM_MSG_FRONT_1","Geen pakket beschikbaar");
136
+ define("LM_MSG_FRONT_2","FTP upload naar bestemming is mislukt");
137
+ define("LM_MSG_FRONT_3","Upload klaar voor:");
138
+ define("LM_MSG_FRONT_4","FTP connectie is mislukt!");
139
+ define("LM_MSG_FRONT_5","Probeer te verbinden met");
140
+ define("LM_MSG_FRONT_6","voor gebruiker");
141
+ define("LM_MSG_BACK_1","Configuratie met succes bijgewerkt");
142
+ define("LM_MSG_BACK_2","FTP connectie is mislukt!");
143
+ define("LM_MSG_BACK_3","Het verplaatsen van de backup is afgerond. De door jou geselecteerde backup zou nu beschikbaar moeten zijn op de aangegeven locatie");
144
+ define("LM_MSG_BACK_4","Verplaatsen afgerond, het clone proces op de nieuwe server wordt gestart.");
145
+ define("LM_MSG_BACK_5","Met succes gede-publiceerd op de voorpagina");
146
+ define("LM_MSG_BACK_6","de-publiceren mislukt, controleer je paden!");
147
+ define("LM_MSG_BACK_7","Met succes gepubliceerd naar de voorpagina");
148
+ define("LM_MSG_BACK_8","Publiceren mislukt, controleer je paden!");
149
+ define("LM_MSG_BACK_9","De Kloons zijn met succes hernoemd!");
150
+ define("LM_MSG_BACK_10","Het Joomla! pad ligt niet binnen je backup pad. Kan geen gebruik maken van de directe download methode. Je moet je Configuratie -> Systeem tab bewerken en de optie Directe download op nee zetten.");
151
+ define("LM_MSG_BACK_11","Alle taken zijn volbracht. Het handmatige backup proces is klaar.<a href='index2.php?option=com_cloner&task=view'>Klik hier om verder te gaan</a>");
152
+ define("LM_MSG_BACK_12","<h2>Backup mislukt! controleer of je gebruik kunt maken van de ZIP applicatie op je server (/usr/bin/zip of /usr/local/bin/zip) en of het juist is ingevuld in je configuratie. Kies anders voor het TAR archief type</h2>");
153
+ define("LM_MSG_BACK_13","<h2>Backup mislukt! controleer of je gebruik kunt maken van de TAR applicatie op je server (/usr/bin/tar of /usr/local/bin/tar) en of het juist is ingevuld in je configuratie. Kies anders voor het ZIP archief type</h2>");
154
+ define("LM_MSG_BACK_14","<font color='red'>Er is een probleem opgetreden bij het maken van een database backup, controleer aub het MySQL server pad!</font>");
155
+ define("LM_CRON_TOP","Instellen van een Cron backup:");
156
+ define("LM_CRON_SUB","<b>Door het gebruik van de Cron functie kun je een automatische backup van je Joomla! webstie laten maken</b>. Om dit in te stellen moet je in het configuratiescherm van je crontab het volgende commando invoeren:");
157
+ define("LM_CRON_HELP","Notes:
158
+ - indien de PHP locatie verschilt van /usr/bin/php gebruik dan die, formaat /$"."php_path/php
159
+
160
+
161
+ Voor meer informatie over het instellen van cronjobs kun je terecht op een van de onderstaande locaties
162
+ - Cpanel <a href='http://www.cpanel.net/docs/cpanel/' target='_blank'>klik hier</a>
163
+ - Plesk <a href='http://www.swsoft.com/doc/tutorials/Plesk/Plesk7/plesk_plesk7_eu/plesk7_eu_crontab.htm' target='_blank'>klik hier</a>
164
+ - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>klik hier</a>
165
+ - Algemene Linux crontab informatie <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>klik hier</a>
166
+
167
+ If you need help setting it up or have problems please consult our forums <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a>
168
+ or email us at <a href='mailto:admin@xcloner.com'>admin@xcloner.com</a>");
169
+ define("LM_CRON_SETTINGS","Cron instellingen");
170
+ define("LM_CRON_MODE","Backup opslag modus:");
171
+ define("LM_CRON_MODE_INFO"," <br />
172
+ <small> let op:* indien local server is gekozen, zullen we het standaard backup pad gebruikeren, zoals op het tabblad Algemeen aangegeven.</small>
173
+ <br />
174
+ <small> let op:** als de e-mail modus wordt gebruikt, kunnen we niet garanderen of de backup het account zal bereiken, dit ivm de beperkingen van de desbetreffende provider.</small>");
175
+ define("LM_CRON_TYPE_INFO","<small><br /> selecteer het type backup dat je wilt aanmaken</small>");
176
+ define("LM_CRON_MYSQL_DETAILS","MySQL Opties");
177
+ define("LM_CRON_MYSQL_DROP","Voeg MySQL Drop toe:");
178
+ define("LM_CRON_TYPE","Backup soort:");
179
+ define("LM_CRON_FTP_DETAILS","meer details over FTP opslag :");
180
+ define("LM_CRON_FTP_SERVER","FTP Serveradres:");
181
+ define("LM_CRON_FTP_USER","FTP gebruikersnaam:");
182
+ define("LM_CRON_FTP_PASS","FTP wachtwoord:");
183
+ define("LM_CRON_FTP_PATH","FTP pad:");
184
+ define("LM_CRON_FTP_DELB","Verwijder backup na transfer:");
185
+ define("LM_CRON_EMAIL_DETAILS","E-mail modus details:");
186
+ define("LM_CRON_EMAIL_ACCOUNT","E-mail account:");
187
+ define("LM_CRON_COMPRESS","Comprimeer backup bestanden");
188
+ define("LM_RESTORE_TOP","Herstelinformatie over je backupsRestoring your backups info:");
189
+ define("LM_CREDIT_TOP","Over XCloner:");
190
+ define("LM_CLONE_FORM_TOP","<h2>Vul hieronder je FTP gegevens in</h2>");
191
+ define("LM_CONFIG_INFO_T_SAFEMODE","PHP Safe_mode:");
192
+ define("LM_CONFIG_INFO_T_MTIME","PHP max_execution_time:");
193
+ define("LM_CONFIG_INFO_T_MEML","PHP memory_limit:");
194
+ define("LM_CONFIG_INFO_T_BDIR","PHP open_basedir:");
195
+ define("LM_CONFIG_INFO_T_EXEC","exec() functie ondersteuning:");
196
+ define("LM_CONFIG_INFO_T_TAR","pad op de server voor de TAR applicatie:");
197
+ define("LM_CONFIG_INFO_T_ZIP","pad op de server voor de ZIP applicatie:");
198
+ define("LM_CONFIG_INFO_T_MSQL","pad op de server voor de MySQLdump applicatie:");
199
+ define("LM_CONFIG_INFO_T_BPATH","Backup Pad:");
200
+ define("LM_CONFIG_INFO_ROOT_PATH_SUB","het backup pad moet reeds aangemaakt zijn en leesbaar eer je XCloner kunt laten starten met het backup proces.");
201
+ define("LM_CONFIG_INFO_ROOT_BPATH_TMP","Tijdelijke map");
202
+ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","Dit pad moet aangemaakt worden met schrijfrechten om XCloner goed te laten functioneren");
203
+ define("LM_CONFIG_INFO","Dit tabblad geeft de algemene instellingen en paden weer.");
204
+ define("LM_CONFIG_INFO_PATHS","Informatie over het algemene pad.");
205
+ define("LM_CONFIG_INFO_PHP","PHP Configuratien Informatie:");
206
+ define("LM_CONFIG_INFO_TIME","<small>Dit regelt de maximale tijdsduur in seconden, dat je script op de server mag gebruiken.</small>");
207
+ define("LM_CONFIG_INFO_MEMORY","<small>Dit regelt de maximum aan geheugen dat je script voor de uitvoer mag aanroepen voor de benodigde processen</small>");
208
+ define("LM_CONFIG_INFO_BASEDIR","<small>Dit regelt de paden waar je script toegang tot heeft, geen waarde betekend dat het script elk pad kan gebruiken.</small>");
209
+ define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode moet uitgeschakeld zijn om XCloner goed te laten werken.</small>");
210
+ define("LM_CONFIG_INFO_TAR","<small>Indien het script niet in staat is om het TAR pad automatisch te detecteren zou je het keuzehokje 'Actief' naast TAR op het tabblad Algemeen kunnen uitvinken.</small>");
211
+ define("LM_CONFIG_INFO_ZIP","<small>Indien het script niet in staat is om het ZIP pad automatisch te detecteren zou je het keuzehokje 'Actief' naast ZIP op het tabblad Algemeen kunnen uitvinken.</small>");
212
+ define("LM_CONFIG_INFO_MSQL","<small>Indien het script niet in staat is om het MySQL dump pad automatisch te detecteren zou je het keuzehokje 'Actief' naast MySQLdump op het tabblad Algemeen kunnen uitvinken.</small>");
213
+ define("LM_CONFIG_INFO_EXEC","<small>Indien deze functie is uitgeschakeld kun je het beste de vinkjes weghalen bij beide keuzehokjes op het tabblad Algemeen.</small>");
214
+ define("LM_CONFIG_INFO_BPATH","<small>moet schrijfrechten hebben om XCloner backups te archieveren</small>");
215
+ define("LM_TRANSFER_URL","Website URL:");
216
+ define("LM_TRANSFER_URL_SUB","<small>Vul aub de URL in van de site waarheen de backup verplaatst zal worden. Bijvoorbeeld http://www.naamvandesite.nl/, we hebben dit nodig om je daarheen door te sturen om toegang te krijgen tot het herstelscript</small>");
217
+ define("LM_TRANSFER_FTP_HOST","FTP hostnaam:");
218
+ define("LM_TRANSFER_FTP_HOST_SUB","voorbeeld ftp.naamvandesite.nl");
219
+ define("LM_TRANSFER_FTP_USER","FTP gebruikersnaam");
220
+ define("LM_TRANSFER_FTP_USER_SUB","vorobeeld 'john'");
221
+ define("LM_TRANSFER_FTP_PASS","FTP wachtwoord:");
222
+ define("LM_TRANSFER_FTP_PASS_SUB","voorbeeld 'johnpass'");
223
+ define("LM_TRANSFER_FTP_DIR","FTP directory:");
224
+ define("LM_TRANSFER_FTP_DIR_SUB","Vul aub de FTP directory in waar je je backup heen wilt verplaatsen, bijvoorbeeld public_html/ or htdocs/ en zorg voor schrijfrechten voor iederen, normaliter 777");
225
+ define("LM_BACKUP_NAME","<b>Kies aub een naam voor je backup</b>");
226
+ define("LM_BACKUP_NAME_SUB","<small>Indien leeg zullen we een standaard naam invullen!</small>");
227
+ define("LM_COL_AVALAIBLE","Voorpagina Pakket");
228
+ define("LM_DELETE_FILE_SUCCESS","Bestand(en) verwijderd");
229
+ define("LM_DOWNLOAD_TITLE","Download dit Backup Set");
230
+ define("LM_DATABASE_EXCLUDED","Uitgesloten");
231
+ define("LM_DATABASE_CURRENT","Huidige database:");
232
+ define("LM_DATABASE_INCLUDE_DATABASES","Inclusief Extra Databases");
233
+ define("LM_DATABASE_INCLUDE_DATABASES_SUB","je kunt meerdere databases in de backup opnemen door de CTRL toets ingedrukt te houden en vervolgens de gewenste bestanden te selecteren met je muis<br />
234
+ de databases zullen worden opgeslagen in de administrator/backups directory in je archief");
235
+ define("LM_DATABASE_MISSING_TABLES","Fout: Tabel definities niet gevonden");
236
+ define("LM_DATABASE_BACKUP_FAILED","Backup mislukt, controleer of je administrator/backups directory schrijfrechten heeft");
237
+ define("LM_DATABASE_BACKUP_COMPLETED","Backup Complee");
238
+ define("LM_RENAME_TOP","Hernoem geselecteerde Kloons");
239
+ define("LM_RENAME","hernoem kloon");
240
+ define("LM_RENAME_TO","naar");
241
+ define("LM_CLONER_RESTORE","<h2>Hoe herstel ik een backup op verschillende locaties INFO!</h2>
242
+ <pre>
243
+ Het herstellen van een backup was nog nooit zo eenvoudig!
244
+ Met behulp van onze clone functie vanuit het With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>Bekijk je backups</a> scherm zul je instaat zijn om je Joomla! backup te verplaatsen waardan ook op het Internet.
245
+
246
+ Dit is wat je er voor moet doen:
247
+
248
+ <b>Stap1 - verplaats je backup naar een herstelhost</b>
249
+
250
+ - ga in XCloner naar de 'Bekijk Backups' sectie
251
+ - nadat je een backup hebt geselecteerd klik je op de 'Clone it' knop
252
+ - Vul je ftp detiails in van de server waar je je backup heen wilt clonen.
253
+ - na de toevoeg knop te hebben gedrukt zal de backupen het herstel script naar de nieuwe host worden overgebracht krijg je een URL toegewezen waar je naar toe moet gaan, gebaseerd op de door jou ingevoerde URL voor de locatie op afstand.
254
+ - na op de getoonde link geklikt te hebben wordt je naar de nieuwe locatie gebracht. Voorbeeld van een URL <b>http://mijn_herstel_site.nl/XCloner.php</b>
255
+
256
+ <b>Let op:</b>Als dit proces om welke reden dan ook onderbroken wordt of mislukt dien je de volgende stappen te nemen
257
+ 1. Download de backup naar je computer
258
+ 2. Download het herstel script, alle 3 de bestanden uit de volgende directory: administrator/components/com_cloner/restore
259
+ 3. Upload beiden backup en herstel script naar de herstel locatie
260
+ 4. Start XCloner.php in je browser en volg het herstelscherm zoals hieronder aangegeven
261
+
262
+ <b>Stap 2 - het XCloner.php herstel scherm:</b>
263
+
264
+ <b>XCloner.php - het herstel script</b>
265
+ - In deze stap heb je reeds de kloon en het herstelscript op de desbetreffende plaats ge�pload
266
+ - Vul de nieuwe MySQL gegevens in, inclusief MySQL hostnaam, gebruikersnaam en paswoord, en de nieuwe database die van de orginele verschilt.
267
+ - Vul de URL van de nieuwe locatie in en je wachtwoord.
268
+ - Om de bestanden te herstellen heb je <b>2 opties:</b>
269
+
270
+ - 1. herstel de bestanden over FTP, het script zal dan een FTP proces emuleren op je server, dat zal ook het rechtenprobleem uit stap 2 oplossen.
271
+ - 2. herstel de bestanden direct, dit zal je bestanden op de server uitpakken, deze manier is erg snel, maar zou wel eens rechtenproblemen met zich mee kunnen brengen als je veel gebruik maakt van FTP om wijzigingen aan je site aan te brengen.
272
+
273
+ - nadat je op toevoegen hebt geklikt, zal het script proberen om de bestanden naar het nieuwe pad te verplaatsen, direct of via FTP, en zal ook de database installeren
274
+ - indien alles zonder fouten is verlopen zou je gekloonde site het moeten doen vanaf de nieuwe locatie
275
+
276
+ Voor ondersteuning kun je het best gebruik maken van onze fora <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
277
+ of ons een e-mail sturen via: <a href='mailto:info@xcloner.com'>info@xcloner.com</a>
278
+
279
+
280
+ </pre>");
281
+ define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2>
282
+ <pre>XCloner is een gereedschap dat je helpt om een backups te beheren van je Joomla! websites. Genereer/Herstel/Verplaats een backup zodat je Joomla! website altijd veilig zal zijn.
283
+
284
+ Features:
285
+ -cron script to generate backup
286
+ -multiple backup options
287
+ -restore tool to move the website rapidly to other locations
288
+ -multiple locations of where you could store the backup safelly
289
+
290
+ For reports and suggestions please contact us at admin@xcloner.com or visit us on <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
291
+ </pre>
292
+ <br/><br/>
293
+
294
+ XCloner.com � 2004-2010 | <a href='http://www.xcloner.com'>www.xcloner.com</a>
295
+ <br/><p/><br/>");
296
+ define("LM_LOGIN_TEXT","<pre>
297
+ <b>Notes:</b>
298
+ 1. Als je dit scherm voor het eerst ziet is je standaard
299
+ gebruikersnaam '<i>admin</i>'en wachtwoord'<i>admin</i>', je zult deze na het inloggen moeten wijzigen
300
+
301
+ 2. Om je wachtwoord te resetten als je het vergeten bent, zul je onderstaande code moeten toevoegen:
302
+
303
+ <b>$"."_CONFIG['jcpass'] = md5('my_new_pass')</b></pre>");
304
+ ?>
language/english.php ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // --- FRONT AREA---//
4
+ define("LM_FRONT_CHOOSE_PACKAGE","<b>Choose the package to install:</b>");
5
+ define("LM_FRONT_CHOOSE_PACKAGE_SUB","<small>Please select your Joomla version you wish to install</small>");
6
+ define("LM_FRONT_TOP","<span colspan='2' class='contentheading'>Install Joomla Software Online</span>");
7
+ define("LM_FRONT_TOP_FTP_DETAILS","<h2>Provide your ftp details below:</h2>");
8
+ define("LM_FRONT_WEBSITE_URL","<b>Website Url:</b>");
9
+ define("LM_FRONT_WEBSITE_URL_SUB","<small>Please provide the website url where Joomla will be installed, example http://www.sitename.com/Joomla</small>");
10
+ define("LM_FRONT_FTP_HOST","<b>Ftp hostname:</b>");
11
+ define("LM_FRONT_FTP_HOST_SUB","<small>example ftp.sitename.com</small>");
12
+ define("LM_FRONT_FTP_USER","<b>Ftp username:</b>");
13
+ define("LM_FRONT_FTP_USER_SUB","<small>example john</small>");
14
+ define("LM_FRONT_FTP_PASS","<b>Ftp password:</b>");
15
+ define("LM_FRONT_FTP_PASS_SUB","<small>example johnpass</small>");
16
+ 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, usually 777</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...!");
24
+
25
+ // --- BACKEND AREA---//
26
+ define("LM_DATABASE_EXCLUDE_TABLES","Select tables to exclude from backup:");
27
+ define("LM_CONFIG_SYSTEM_FOLDER","Folders display:");
28
+ define("LM_CONFIG_SYSTEM_FOLDER_SUB","please select the mode you would like to select the exclude folders from 'Generate Backup' section");
29
+ define("LM_CONFIG_SYSTEM_LANG","System Language:");
30
+ define("LM_CONFIG_SYSTEM_LANG_SUB","configures the XCloner language, if set to default it will display the default language of Joomla is avalaible");
31
+ define("LM_CONFIG_SYSTEM_LANG_DEFAULT","System Default");
32
+ define("LM_CONFIG_SYSTEM_DOWNLOAD","Enable Direct Download link:");
33
+ 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");
34
+ define("LM_CONFIG_DISPLAY","Display Settings");
35
+ define("LM_CONFIG_SYSTEM","System Settings");
36
+ define("LM_CONFIG_SYSTEM_FTP","Ftp Transfer Mode");
37
+ define("LM_CONFIG_SYSTEM_FTP_SUB","select how the files will be transfered from server to server when using ftp protocol");
38
+ define("LM_CONFIG_MEM","Backup using Server Functions");
39
+ 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>");
40
+ define("LM_CRON_DB_BACKUP","Enable Database backup:");
41
+ define("LM_CRON_DB_BACKUP_SUB","<small>check Yes if you would like to backup the mysql data</small>");
42
+ define("LM_CONFIG_SYSTEM_MBACKUP","Include backups directory in clone:");
43
+ 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>");
44
+
45
+ define("LM_TAB_MYSQL","MYSQL");
46
+ define("LM_CONFIG_MYSQL","MYSQL Connection Settings:");
47
+ define("LM_CONFIG_MYSQLH","Mysql hostname:");
48
+ define("LM_CONFIG_MYSQLU","Mysql username:");
49
+ define("LM_CONFIG_MYSQLP","Mysql password:");
50
+ define("LM_CONFIG_MYSQLD","Mysql database:");
51
+ define("LM_CONFIG_MYSQLH_SUB","");
52
+ define("LM_CONFIG_MYSQLU_SUB","");
53
+ define("LM_CONFIG_MYSQLP_SUB","");
54
+ define("LM_CONFIG_MYSQLD_SUB","");
55
+
56
+ define("LM_TAB_AUTH","Authentification");
57
+ define("LM_CONFIG_AUTH","User Authentification Area");
58
+ define("LM_CONFIG_AUTH_USER","Login Username:");
59
+ define("LM_CONFIG_AUTH_PASS","Login Password:");
60
+ define("LM_CONFIG_AUTH_USER_SUB","this will be your default login user to XCloner");
61
+ define("LM_CONFIG_AUTH_PASS_SUB", "your default login password, leave blank if you don't want to change it");
62
+
63
+ define("LM_YES","Yes");
64
+ define("LM_NO", "No");
65
+ define("LM_ACTIVE","Active:");
66
+ define("LM_TAR_PATH","Tar path or command:");
67
+ define("LM_TAR_PATH_SUB","(required if archive type is Tar and Active box checked)");
68
+ define("LM_ZIP_PATH","Zip path or command:");
69
+ define("LM_ZIP_PATH_SUB","(required if archive type is Zip and Active box checked)");
70
+ define("LM_MYSQLDUMP_PATH","Mysqldump path or command: (required if Active box checked)<br /> For large mysql dumps please use
71
+ <br /><b><small>mysqldump --quote-names --quick --single-transaction --skip-comments</b></small>");
72
+
73
+ // --- CONFIG ---//
74
+ define("LM_CONFIG_MANUAL","Backup Manual Process");
75
+ define("LM_CONFIG_MANUAL_BACKUP","Manual backup:");
76
+ 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");
77
+ define("LM_CONFIG_MANUAL_FILES","Files to process per manual session:");
78
+ define("LM_CONFIG_MANUAL_REFRESH","Time between sessions refresh:");
79
+ define("LM_CONFIG_SYSTEM_MDATABASES","Backup Multiple Databases:");
80
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","this option controls wheteher XCloner may backup multiple databases");
81
+
82
+ define("LM_CONFIG_CRON_LOCAL","Local server*");
83
+ define("LM_CONFIG_CRON_REMOTE","Remote ftp account");
84
+ define("LM_CONFIG_CRON_EMAIL","Email**");
85
+ define("LM_CONFIG_CRON_FULL","Full(files + database)");
86
+ define("LM_CONFIG_CRON_FILES","Files only");
87
+ define("LM_CONFIG_CRON_DATABASE","Database only");
88
+
89
+ define("LM_CONFIG_EDIT","Editing config file");
90
+ define("LM_CONFIG_BSETTINGS","Backup Path Settings");
91
+ define("LM_CONFIG_BSETTINGS_OPTIONS","Backup Generator Options");
92
+ define("LM_CONFIG_BSETTINGS_SERVER","Server Use Options");
93
+ define("LM_CONFIG_BPATH","Backup Store Path:");
94
+ define("LM_CONFIG_UBPATH","Backup Start Path:");
95
+ define("LM_CONFIG_BPATH_SUB","<small>this is the path where all backups will be stored</small>");
96
+ define("LM_CONFIG_UBPATH_SUB","<small>input here the initial backup path from where XCloner will start all the processes</small>");
97
+ define("LM_CRON_EXCLUDE","Excluded Directories");
98
+ define("LM_CRON_EXCLUDE_DIR","Excluded directories list one per line:<br>please use full path of the server directory");
99
+ define("LM_CRON_BNAME","Backup Name:");
100
+ 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>");
101
+ define("LM_CRON_IP","Cron Allowed IP's:");
102
+ 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>");
103
+ define("LM_CRON_DELETE_FILES","Delete Older Backups");
104
+ define("LM_CRON_DELETE_FILES_SUB","Delete backups older than: ");
105
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Active:");
106
+ define("LM_CRON_SEMAIL","Email cron log to: ");
107
+ define("LM_CRON_SEMAIL_SUB","If an email address is set, after running a cron job, the cron log will be emailed to this address; multiple addresses can be added separated by ;");
108
+ define("LM_CRON_MCRON","Configuration Name:");
109
+ define("LM_CRON_MCRON_AVAIL","Available Configurations:");
110
+ define("LM_CRON_MCRON_R","please provide a simple name for your new cron configuration");
111
+ define("LM_CRON_MCRON_SUB","with this option you will be able to save the current configuration in a separate file and use it for running multiple cronjobs");
112
+ define("LM_CRON_SETTINGS_M","Multiple CronJobs Configuration");
113
+ // --- MENU ---//
114
+ define("LM_MENU_OPEN_ALL", "open all");
115
+ define("LM_MENU_CLOSE_ALL", "close all");
116
+ define("LM_MENU_ADMINISTRATION","Administration");
117
+ define("LM_MENU_CLONER","XCloner");
118
+ define("LM_MENU_CONFIGURATION","Configuration");
119
+ define("LM_MENU_CRON","Cron");
120
+ define("LM_MENU_LANG","Translator");
121
+ define("LM_MENU_ACTIONS","Actions");
122
+ define("LM_MENU_Generate_backup","Generate Backup");
123
+ define("LM_MENU_Restore_backup","Restore Backup");
124
+ define("LM_MENU_View_backups","View Backups");
125
+ define("LM_MENU_Documentation","Help");
126
+ define("LM_MENU_ABOUT","About");
127
+ define("LM_DELETE_FILE_FAILED","Delete Failed, please check the file permissions");
128
+ define("LM_JOOMLAPLUG_CP","XCloner - Your site backup and restore solution");
129
+ define("LM_MENU_FORUM","Forums");
130
+ define("LM_MENU_SUPPORT","Support");
131
+ define("LM_MENU_WEBSITE","Website");
132
+
133
+ define("LM_MAIN_Settings","Settings");
134
+ define("LM_MAIN_View_Backups","View Backups");
135
+ define("LM_MAIN_Generate_Backup","Generate Backup");
136
+ define("LM_MAIN_Help","Help");
137
+ define("LM_FTP_TRANSFER_MORE","FTP Connection Mode");
138
+
139
+
140
+ // --- LANGUAGE --//
141
+ define("LM_LANG_NAME", "Language Name");
142
+ define("LM_LANG_MSG_DEL", "Language(s) succesfully deleted!");
143
+ define("LM_LANG_NEW","New Language Name:");
144
+ define("LM_LANG_EDIT_FILE","Editing File:");
145
+ define("LM_LANG_EDIT_FILE_SUB","Do not forget to save your translation every 5 minutes, just hit the Apply button to update");
146
+
147
+
148
+ // --- TABS --//
149
+ define("LM_TAB_GENERAL","General");
150
+ define("LM_TAB_G_STRUCTURE","Structure");
151
+ define("LM_TAB_SYSTEM","System");
152
+ define("LM_TAB_CRON","Cron");
153
+ define("LM_TAB_INFO","Info");
154
+ define("LM_TAB_G_DATABASE","Database Options");
155
+ define("LM_TAB_G_FILES","Files Options");
156
+ define("LM_G_EXCLUDE_COMMENT","<br>Please enter here the excluded folders, each one per line!
157
+ <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>");
158
+
159
+
160
+ // --- MESSAGES --//
161
+ // front end
162
+ define("LM_MSG_FRONT_1","No package avalaible");
163
+ define("LM_MSG_FRONT_2","FTP upload has failed for destination");
164
+ define("LM_MSG_FRONT_3","Uploaded done for");
165
+ define("LM_MSG_FRONT_4","FTP connection has failed!");
166
+ define("LM_MSG_FRONT_5","Attempted to connect to");
167
+ define("LM_MSG_FRONT_6","for user");
168
+
169
+ //backend
170
+ define("LM_MSG_BACK_1","Config succesfully updated...");
171
+ define("LM_MSG_BACK_2","FTP connection has failed!");
172
+ define("LM_MSG_BACK_3","Backup move DONE! The select backup should now be avalaible on the provided location!");
173
+ define("LM_MSG_BACK_4","Moving done, starting the clone process on the remote host");
174
+ define("LM_MSG_BACK_5","Succesfully unpublished from frontend");
175
+ define("LM_MSG_BACK_6","Unpublishing failed! Please check your paths!");
176
+ define("LM_MSG_BACK_7","Succesfully published to frontend");
177
+ define("LM_MSG_BACK_8","Publishing failed! Please check your paths!");
178
+ define("LM_MSG_BACK_9","Clones succesfully renamed!");
179
+ 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");
180
+ 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>");
181
+ 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>");
182
+ 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>");
183
+ define("LM_MSG_BACK_14","<font color='red'>There was a problem in generating the database backup, please check your mysqldump server path!</font>");
184
+
185
+
186
+
187
+ define("LM_CRON_TOP","Setting up cron backup:");
188
+ define("LM_CRON_SUB","<b>Using the cron function you can setup an automated backup generator for your Joomla website!</b>
189
+ To set it up you need to add in your control panel crontab the following command:");
190
+ define("LM_CRON_HELP","Notes:
191
+ - if you php location is diferent than /usr/bin/php please use that one, format /$"."php_path/php
192
+
193
+
194
+ For more info on how to setup a cron for
195
+ - Cpanel <a href='http://www.cpanel.net/docs/cpanel/' target='_blank'>click here</a>
196
+ - Plesk <a href='http://www.swsoft.com/doc/tutorials/Plesk/Plesk7/plesk_plesk7_eu/plesk7_eu_crontab.htm' target='_blank'>click here</a>
197
+ - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>click here</a>
198
+ - General Linux crontab info <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>click here</a>
199
+
200
+ If you need help setting it up or have problems please consult our forums <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a>
201
+ or email us at <a href='mailto:info@xcloner.com'>info@xcloner.com</a>");
202
+ define("LM_CRON_SETTINGS","Cron settings");
203
+ define("LM_CRON_MODE","Backup store mode:");
204
+ define("LM_CRON_MODE_INFO"," <br />
205
+ <small> please note:* if local server is choosed we will use the default backup path from General section to store the backup</small>
206
+ <br />
207
+ <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>
208
+ ");
209
+ define("LM_CRON_TYPE_INFO","<small><br /> please choose your backup type you would like to create</small>");
210
+ define("LM_CRON_MYSQL_DETAILS","Mysql Options");
211
+ define("LM_CRON_MYSQL_DROP","Add Mysql Drop:");
212
+ define("LM_CRON_TYPE","Backup type:");
213
+ define("LM_CRON_FTP_DETAILS","Ftp store mode details:");
214
+ define("LM_CRON_FTP_SERVER","Ftp server:");
215
+ define("LM_CRON_FTP_USER","Ftp username:");
216
+ define("LM_CRON_FTP_PASS","Ftp password:");
217
+ define("LM_CRON_FTP_PATH","Ftp path:");
218
+ define("LM_CRON_FTP_DELB","Delete backup after transfer:");
219
+ define("LM_CRON_EMAIL_DETAILS","Email mode details:");
220
+ define("LM_CRON_EMAIL_ACCOUNT","Email account:");
221
+ define("LM_CRON_COMPRESS","Compress backup files:");
222
+ define("LM_RESTORE_TOP","Restoring your backups info:");
223
+ define("LM_CREDIT_TOP","About XCloner:");
224
+ define("LM_CLONE_FORM_TOP","<h2>Provide your ftp details below:</h2>");
225
+
226
+ // --- Info Tab ---//
227
+
228
+ define("LM_CONFIG_INFO_T_SAFEMODE","Php Safe_mode:");
229
+ define("LM_CONFIG_INFO_T_MTIME","Php max_execution_time:");
230
+ define("LM_CONFIG_INFO_T_MEML","Php memory_limit:");
231
+ define("LM_CONFIG_INFO_T_BDIR","Php open_basedir:");
232
+ define("LM_CONFIG_INFO_T_EXEC","exec() function support:");
233
+ define("LM_CONFIG_INFO_T_TAR","Tar utility server path:");
234
+ define("LM_CONFIG_INFO_T_ZIP","Zip utility server path:");
235
+ define("LM_CONFIG_INFO_T_MSQL","Mysqldump utility server path:");
236
+ define("LM_CONFIG_INFO_T_BPATH","Backup Path:");
237
+ define ("LM_CONFIG_INFO_ROOT_BPATH","Backup Start Path");
238
+ define("LM_CONFIG_INFO_ROOT_PATH_SUB","the backup start path needs to exist and be readable in order for XCloner to start the backup process");
239
+ define("LM_CONFIG_INFO_ROOT_BPATH_TMP", "Temporary Folder");
240
+ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","this path needs to be created and be writeable in order for XCloner to work properly");
241
+
242
+
243
+ define("LM_CONFIG_INFO","This tab will show general system info and paths");
244
+ define("LM_CONFIG_INFO_PATHS","General paths info:");
245
+ define("LM_CONFIG_INFO_PHP","Php Configuration Information:");
246
+ define("LM_CONFIG_INFO_TIME","<small>This controls the maximum time your script is allowed to run on server in seconds</small>");
247
+ define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
248
+ 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>");
249
+ define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
250
+ 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>");
251
+ 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>");
252
+ 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>");
253
+ define("LM_CONFIG_INFO_EXEC","<small>If this function is disabled, you might want to uncheck Both 'Active' checkboxes from the General Tab</small>");
254
+ define("LM_CONFIG_INFO_BPATH","<small>needs to be writeable in order for XCloner to archive backups</small>");
255
+
256
+
257
+ // --- TRANSFER DETAILS---//
258
+
259
+ define("LM_TRANSFER_URL","Website Url:");
260
+ 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>");
261
+ define("LM_TRANSFER_FTP_HOST","Ftp hostname:");
262
+ define("LM_TRANSFER_FTP_HOST_SUB","example ftp.sitename.com");
263
+ define("LM_TRANSFER_FTP_USER","Ftp username:");
264
+ define("LM_TRANSFER_FTP_USER_SUB","example 'john'");
265
+ define("LM_TRANSFER_FTP_PASS","Ftp password:");
266
+ define("LM_TRANSFER_FTP_PASS_SUB","example 'johnpass'");
267
+ define("LM_TRANSFER_FTP_DIR","Ftp directory:");
268
+ 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, usually 777");
269
+
270
+
271
+ // --- GENERATE BACKUP---//
272
+
273
+ define("LM_BACKUP_NAME","<b>Please choose your backup name</b>");
274
+ define("LM_BACKUP_NAME_SUB","<small>if left blank we will generate a name by default!</small>");
275
+
276
+
277
+ // -- General --//
278
+ define("LM_COM_TITLE" , "XCloner Manager - ");
279
+ define("LM_COM_TITLE_CONFIRM" , "Confirm Folder Selection");
280
+
281
+ define("LM_COL_FILENAME" , "Backup Set");
282
+ define("LM_COL_DOWNLOAD" , "Download");
283
+ define("LM_COL_AVALAIBLE","Frontend Package");
284
+ define("LM_COL_SIZE" , "Size of Set");
285
+ define("LM_COL_DATE" , "Date of Backup");
286
+ define("LM_COL_FOLDER" , "<b>Excluded Folders and/or files</b>");
287
+
288
+ define("LM_DELETE_FILE_SUCCESS", "File(s) Deleted");
289
+ define("LM_DOWNLOAD_TITLE", "Download this Backup Set");
290
+
291
+
292
+ define("LM_ARCHIVE_NAME" , "Archive Name");
293
+ define("LM_NUMBER_FOLDERS" , "Number of Folders");
294
+ define("LM_NUMBER_FILES" , "Number of Files");
295
+ define("LM_SIZE_ORIGINAL" , "Size of Original File");
296
+ define("LM_SIZE_ARCHIVE" , "Size of Archive");
297
+ define("LM_DATABASE_ARCHIVE" , "Database Backup");
298
+
299
+ define("LM_CONFIRM_INSTRUCTIONS" , "<b>Please select the folders you wish to exclude from archive</b> <br />
300
+ - by default all folders are included, if you wish to exlude a folder and it's subfolders just check the box next to it");
301
+ define("LM_CONFIRM_DATABASE" , "Backup database and include in this backup set");
302
+
303
+
304
+ define("LM_DATABASE_EXCLUDED", "Excluded");
305
+ define("LM_DATABASE_CURRENT","Current database:");
306
+ define("LM_DATABASE_INCLUDE_DATABASES","Include Extra Databases");
307
+ define("LM_DATABASE_INCLUDE_DATABASES_SUB","you can select multiple databases to include in the backup by holding down the CTRL key and selecting the desired items with your mouse<br />
308
+ the databases will be stored in administrator/backups directory in your archive");
309
+
310
+ define("LM_DATABASE_MISSING_TABLES", "Error: Table Definitions Not Found");
311
+ define("LM_DATABASE_BACKUP_FAILED", "Backup FAILED, please check that administrator/backups directory is writeable!");
312
+ define("LM_DATABASE_BACKUP_COMPLETED", "Backup Completed");
313
+ define("LM_RENAME_TOP","Rename selected clones");
314
+ define("LM_RENAME","Rename clone ");
315
+ define("LM_RENAME_TO"," to ");
316
+ // --- CLONER RESTORE--- //
317
+
318
+ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations INFO!</h2>
319
+ <pre>
320
+ Restoring your backups has never been more easier!
321
+ With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
322
+ you will be able to move your Joomla backup anywhere on the Internet.
323
+
324
+ Here is what you have to do:
325
+
326
+ <b>Step1 - move your backup to the restore host</b>
327
+
328
+ - go into the XCloner 'View Backups' area
329
+ - after you have selected your backup click on the 'Clone it' button
330
+ - enter the ftp details of where you would like to Clone the backup
331
+ - after hitting submit the backup and the restore script will be transfered on the new host and you
332
+ will be given a url to access the next step based on the url you provided for the remote location
333
+ - 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>
334
+
335
+ <b>Note:</b> if this process fails for any reason, you need to do this:
336
+ 1. Download the backup on your computer
337
+ 2. Download the restore script, all 3 files from directory administrator/components/com_xcloner/restore
338
+ 3. Upload both backup and restore script to your restore location
339
+ 4. Launch XCloner.php in your browser and follow the restore screen as specified below
340
+
341
+ <b>Step 2 - the XCloner.php restore screen:</b>
342
+
343
+ <b>XCloner.php - the restore script</b>
344
+ - on this step you have in place the clone you made based on your Joomla site and the Restore script
345
+ - enter you new mysql details, this includes your new mysql hostname, user and pass, and a new database
346
+ different from the original one
347
+ - enter you new location Url and pass
348
+ - to restore the files you have <b>2 options:</b>
349
+
350
+ - 1. restore the files through ftp, the script will simulate a ftp upload process on your server, this will
351
+ fix the permissions problem from step 2.
352
+ - 2. restore the files directly, this will unarchive the files on your server, will work fast but it might
353
+ result in some permission problems if you use your ftp a lot to make changes to the site
354
+
355
+ - after you hit submit the script will attempt to move the files to the new path, directly or using ftp and
356
+ will install the database
357
+ - if everything goes ok your new site clone is up and running on the new location
358
+
359
+ For support please consult our forums <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
360
+ or email us at <a href='mailto:info@xcloner.com'>info@xcloner.com</a>
361
+
362
+
363
+ </pre>");
364
+
365
+
366
+ // --- ABOUT CLONER---//
367
+
368
+ define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2>
369
+ <pre>XCloner is a tool that wil help you manage your Joomla website backups, generate/restore/move so your website will be always secured!
370
+
371
+ Features:
372
+ -cron script to generate backup
373
+ -multiple backup options
374
+ -restore tool to move the website rapidly to other locations
375
+ -multiple locations of where you could store the backup safelly
376
+
377
+ 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>
378
+ </pre>
379
+ <br/><br/>
380
+
381
+ XCloner.com &copy; 2004-2010 | <a href=\"http://www.xcloner.com\">www.xcloner.com</a>
382
+ <br/><p/><br/>
383
+ ");
384
+
385
+ define("LM_LOGIN_TEXT","
386
+ <pre>
387
+ <b>Notes:</b>
388
+ 1. If you are on this screen for the first time, your default
389
+ username is '<i>admin</i>' and password '<i>admin</i>', you will need
390
+ to change them after login
391
+
392
+ 2. if you forgot your password, to reset it you need to add
393
+ this code:
394
+
395
+ <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
396
+
397
+ at the end of the config file cloner.config.php just
398
+ before line ?>
399
+ Don't forget to replace my_new_pass with the actual password
400
+ </pre>
401
+ ");
402
+ ?>
language/index.html ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <html>
2
+ <body>
3
+ </body>
4
+ </html>
language/spanish.php ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ define("LM_FRONT_CHOOSE_PACKAGE","<b>Elige el paquete a instalar: </b>");
3
+ define("LM_FRONT_CHOOSE_PACKAGE_SUB","<small>Por favor, selecciona tu version de Joomla para instalar</small>");
4
+ define("LM_FRONT_TOP","<span colspan='2' class='contentheading'>Instalar software Joomla via web</span>");
5
+ define("LM_FRONT_TOP_FTP_DETAILS","<h2>Introduce tus datos ftp: </h2>");
6
+ define("LM_FRONT_WEBSITE_URL","<b>Url de la web: </b>");
7
+ define("LM_FRONT_WEBSITE_URL_SUB","<small>Por favor, introduce la url de la web donde se instalar� Joomla. Ejemplo: http://www.nombresitio.com/joomla</small>");
8
+ define("LM_FRONT_FTP_HOST","<b>servidor FTP:</b>");
9
+ define("LM_FRONT_FTP_HOST_SUB","<small>Beispiel ftp.seitenname.de</small>");
10
+ define("LM_FRONT_FTP_USER","<b>FTP Username:</b>");
11
+ define("LM_FRONT_FTP_USER_SUB","<small>Ejemplo Juan</small>");
12
+ define("LM_FRONT_FTP_PASS","<b>contrase�a FTP:</b>");
13
+ define("LM_FRONT_FTP_PASS_SUB","<small>ejemplo contrase�aJuan</small>");
14
+ define("LM_FRONT_FTP_DIR","<b>Directorio FTP: </b>");
15
+ define("LM_FRONT_FTP_DIR_SUB","<small>Por favor introduce el directorio FTP donde te gustar�a instalar Joomla. Ejemplo: public_html/Joomla o htdocs/joomla y asegurate de que tiene permisos para todos, generalmente 777</small>");
16
+ define("LM_TRANSFER_FTP_INCT","transferencia incremental:");
17
+ define("LM_TRANSFER_FTP_INCT_SUB","Intentar� trnsferir los archivos por FTP en modo incremental para evitar p�ginas en blanco o timeouts.");
18
+ define("LM_FRONT_BOTTOM","No te ha funcionado? Por favor, env�anos un comentario con lo sucedido <a href='http://www.xcloner.com/contact/'>Pagina de contacto </a><br />Hecho por<a href='http://www.xcloner.com'>XCloner</a>");
19
+ define("LM_FRONT_MSG_OK","Hemos subido el paquete de utilidad de restauraci�n a tu sitio FTP. Para continuar, pulsa aqu�.");
20
+ define("LM_NOPAKCAGE_ERROR","No se ha seleccionado ning�n paquete. Deteniendo...!");
21
+ define("LM_DATABASE_EXCLUDE_TABLES","Selecciona las tablas que desees excluir (opcional)");
22
+ define("LM_CONFIG_SYSTEM_FOLDER","Visualizaci�n de carpetas:");
23
+ define("LM_CONFIG_SYSTEM_FOLDER_SUB","Por favor, selecciona el modo en el que quieres seleccionar las carpetas excluidas desde la secci�n -Generar copia de seguridad-");
24
+ define("LM_CONFIG_SYSTEM_LANG","Lenguaje de sistema:");
25
+ define("LM_CONFIG_SYSTEM_LANG_SUB","<small>Configura el lenguaje XCloner.Si se deja en -default- mostrar� el que viene por defecto en Joomla.</small>");
26
+ define("LM_CONFIG_SYSTEM_LANG_DEFAULT","Lenguaje por defecto");
27
+ define("LM_CONFIG_SYSTEM_DOWNLOAD","Activar v�nculo de descarga directa:");
28
+ define("LM_CONFIG_SYSTEM_DOWNLOAD_SUB","Si se activa, en la pantalla -Ver copias de seguridad-");
29
+ define("LM_CONFIG_DISPLAY","Configuraci�n de vista");
30
+ define("LM_CONFIG_SYSTEM","Configuraci�n de sistema");
31
+ define("LM_CONFIG_SYSTEM_FTP","Modo de transferencia FTP");
32
+ define("LM_CONFIG_SYSTEM_FTP_SUB","<small>Selecciona la manera en que se transferir�n los archivos entre servidores con el protocolo ftp.</small>");
33
+ define("LM_CONFIG_MEM","Copia de seguridad usando funciones de servidor:");
34
+ define("LM_CONFIG_MEM_SUB","<small>Si se activa se requerir� que tu servidor permita <b>ZIP o TAR</b> y / o <b>comandos MySQLDump</b> y especificar sus rutas, y tambi�n permisos de <b>ejecuci�n()</b> en tu php.</small>");
35
+ define("LM_CRON_DB_BACKUP","Permitir copia de seguridad de la base de datos:");
36
+ define("LM_CRON_DB_BACKUP_SUB","<small>Comprueba si te gustar�a copiar los datos de mysql</small>");
37
+ define("LM_CONFIG_SYSTEM_MBACKUP","Incluir carpetas de copia de seguridad en Clonaci�n:");
38
+ define("LM_CONFIG_SYSTEM_MBACKUP_SUB","<small>Si se elige -s�- la copia de seguridad creada contendr� archivos de copia previos aumentando cada vez su tama�o</small>");
39
+ define("LM_TAB_MYSQL","MYSQL");
40
+ define("LM_CONFIG_MYSQL","configuraci�n de conexi�n MySQL");
41
+ define("LM_CONFIG_MYSQLH","Servidor MySQL:");
42
+ define("LM_CONFIG_MYSQLU","usuario MySQL :");
43
+ define("LM_CONFIG_MYSQLP","Contrase�a MySQL :");
44
+ define("LM_CONFIG_MYSQLD","Base de datos MySQL:");
45
+ define("LM_TAB_AUTH","autentificaci�n");
46
+ define("LM_CONFIG_AUTH","Area de autentificaci�n");
47
+ define("LM_CONFIG_AUTH_USER","Usuario:");
48
+ define("LM_CONFIG_AUTH_PASS","Contrase�a:");
49
+ define("LM_CONFIG_AUTH_USER_SUB","<small>Este ser� tu usuario por defecto para Xcloner.</small>");
50
+ define("LM_CONFIG_AUTH_PASS_SUB","<small>Tu contrase�a por defecto. Dejala en blanco si no quieres cambiarla.</small>");
51
+ define("LM_YES","S�");
52
+ define("LM_NO","No");
53
+ define("LM_ACTIVE","Activo:");
54
+ define("LM_TAR_PATH","Ruta o comando Tar:");
55
+ define("LM_TAR_PATH_SUB","<small>(se requiere cuando el tipo de archivo es Tar y 'Activo' est� marcado.)</small>");
56
+ define("LM_ZIP_PATH","Ruta o comando ZIP:");
57
+ define("LM_ZIP_PATH_SUB","<small>(Se requiere si el tipo de archivo es Zip y 'Activo' est� marcado.)</small>");
58
+ define("LM_MYSQLDUMP_PATH","Ruta o comando MySQLDump:<br />(Se requiere si 'Activo' est� marcado
59
+ <br /><b><small>mysqldump --quote-names --quick --single-transaction --skip-comments</b></small>");
60
+ define("LM_CONFIG_MANUAL","Proceso de copia de seguridad manual");
61
+ define("LM_CONFIG_MANUAL_BACKUP","Copia de seguridad manual");
62
+ define("LM_CONFIG_MANUAL_BACKUP_SUB","Esta opci�n es para cuando tienes limitaciones de tiempo de ejecuci�n en tu servidor. Requiere que tengas activado javascript en tu navegador.");
63
+ define("LM_CONFIG_MANUAL_FILES","Archivos a procesar en la sesi�n manual:");
64
+ define("LM_CONFIG_MANUAL_REFRESH","Tiempo de refresco entre sesiones:");
65
+ define("LM_CONFIG_SYSTEM_MDATABASES","Copia de seguridad de bases de datos m�ltiples:");
66
+ define("LM_CONFIG_SYSTEM_MDATABASES_SUB","esta opci�n controla cu�ndo XCloner puede hacer copia de seguridad de bases de datos m�ltiples");
67
+ define("LM_CONFIG_CRON_LOCAL","Servidor local*");
68
+ define("LM_CONFIG_CRON_REMOTE","Cuenta FTP remota");
69
+ define("LM_CONFIG_CRON_EMAIL","Correo**");
70
+ define("LM_CONFIG_CRON_FULL","Completo (archivos + BBDD)");
71
+ define("LM_CONFIG_CRON_FILES","Archivos solo");
72
+ define("LM_CONFIG_CRON_DATABASE","BBDD solo");
73
+ define("LM_CONFIG_EDIT","Editar archivo de configuraci�n:");
74
+ define("LM_CONFIG_BSETTINGS","Ruta configuraci�n de la copia de seguridad.");
75
+ define("LM_CONFIG_BSETTINGS_OPTIONS","Opciones del generador de copias de seguridad");
76
+ define("LM_CONFIG_BSETTINGS_SERVER","Opciones del uso del servidor");
77
+ define("LM_CONFIG_BPATH","Ruta para guardar copia de seguridad:");
78
+ define("LM_CONFIG_UBPATH","Ruta de inicio de copia de seguridad:");
79
+ define("LM_CONFIG_BPATH_SUB","<small>�sta es la ruta donde se guardar�n todas las copias de seguridad.</small>");
80
+ define("LM_CONFIG_UBPATH_SUB","<small>Introduce aqu� la ruta de inicio de la copia de seguridad desde donde XCloner comenzar� todos los procesos.</small>");
81
+ define("LM_CRON_EXCLUDE","Carpetas excluidas");
82
+ define("LM_CRON_EXCLUDE_DIR","Carpetas excluidas, lista una por l�nea<br>por favor, usa la ruta completa del directorio del servidor");
83
+ define("LM_CRON_BNAME","Nombre de la copia de seguridad:");
84
+ define("LM_CRON_BNAME_SUB","<small>Si se deja en blanco, generaremos un nombre por defecto cada vez que una copia de seguridad cron se haga.</small>");
85
+ define("LM_CRON_IP","IP's Cron permitidas:");
86
+ define("LM_CRON_IP_SUB","<small>por defecto, solo el servidor local tendr� acceso al proceso cron pero puedes introducir otras IP's, una por l�nea.</small>");
87
+ define("LM_CRON_DELETE_FILES","Borrar viejas copias de seguridad");
88
+ define("LM_CRON_DELETE_FILES_SUB","Borrar copias de seguridad previas:");
89
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE","Activo:");
90
+ define("LM_CRON_SEMAIL","Enviar log Cron a:");
91
+ define("LM_CRON_SEMAIL_SUB","<small>Si se escribe una direcci�n de correo, despu�s de correr el proceso Cron se enviar� un correo a esa direcci�n. Si son mas direcciones separar por ';'.</small>");
92
+ define("LM_CRON_MCRON","Nombre de la configuraci�n:");
93
+ define("LM_CRON_MCRON_AVAIL","Configuraciones disponibles:");
94
+ define("LM_CRON_MCRON_R","Por favor introduce un nombre para tu configuraci�n Cron.");
95
+ define("LM_CRON_MCRON_SUB","<small>Con esta opci�n podras salvar la configuraci�n actual en un archivo separado y usarlo para correr procesos Cron m�ltiples.</small>");
96
+ define("LM_CRON_SETTINGS_M","Configuraci�n de procesos Cron m�ltiples");
97
+ define("LM_MENU_OPEN_ALL","Abrir todos");
98
+ define("LM_MENU_CLOSE_ALL","Cerrar todos");
99
+ define("LM_MENU_ADMINISTRATION","Administraci�n");
100
+ define("LM_MENU_CLONER","XCloner");
101
+ define("LM_MENU_CONFIGURATION","Configuraci�n");
102
+ define("LM_MENU_CRON","Cron");
103
+ define("LM_MENU_LANG","Taductor");
104
+ define("LM_MENU_ACTIONS","Acciones");
105
+ define("LM_MENU_Generate_backup","Generar copia de seguridad");
106
+ define("LM_MENU_Restore_backup","Restaurar copia de seguridad");
107
+ define("LM_MENU_View_backups","Ver copias de seguridad");
108
+ define("LM_MENU_Documentation","Ayuda");
109
+ define("LM_MENU_ABOUT","Sobre XCloner");
110
+ define("LM_DELETE_FILE_FAILED","Ha fallado el borrado, por favor comprueba los permisos de archivos");
111
+ define("LM_JOOMLAPLUG_CP","XCloner - Tu soluci�n de copias de seguridad");
112
+ define("LM_MENU_FORUM","Foro");
113
+ define("LM_MENU_SUPPORT","Soporte t�cnico");
114
+ define("LM_MENU_WEBSITE","P�gina web");
115
+ define("LM_MAIN_Settings","Configuraci�n");
116
+ define("LM_MAIN_View_Backups","Ver copias de seguridad");
117
+ define("LM_MAIN_Generate_Backup","Generar copias de seguridad");
118
+ define("LM_MAIN_Help","Ayuda");
119
+ define("LM_FTP_TRANSFER_MORE","Modo conexi�n FTP");
120
+ define("LM_LANG_NAME","Nombre de idioma");
121
+ define("LM_LANG_MSG_DEL","Lenguaje borrado con �xito!");
122
+ define("LM_LANG_NEW","Nuevo nombre de idioma:");
123
+ define("LM_LANG_EDIT_FILE","Editar archivo:");
124
+ define("LM_LANG_EDIT_FILE_SUB","No olvides salvar tu traducci�n cada 5 minutos. Solo pulsa el bot�n aplicar para actualizar.");
125
+ define("LM_TAB_GENERAL","General");
126
+ define("LM_TAB_G_STRUCTURE","Estructura");
127
+ define("LM_TAB_SYSTEM","Sistema");
128
+ define("LM_TAB_CRON","Cron");
129
+ define("LM_TAB_INFO","Info servidor");
130
+ define("LM_TAB_G_DATABASE","Opciones de BBDD");
131
+ define("LM_TAB_G_FILES","Opciones de archivos");
132
+ define("LM_G_EXCLUDE_COMMENT","<br>Por favor, introduce aqu� las carpetas excluidas.
133
+ <br><b>Puede que quieras deshabilitar el cach� cuando hagas una copia de seguridad, o si no, excluir la carpeta cach� de la copia de seguridad</b>");
134
+ define("LM_MSG_FRONT_1","Ning�n paquete disponible");
135
+ define("LM_MSG_FRONT_2","Ha fallado la subida FTP para este destino");
136
+ define("LM_MSG_FRONT_3","Subida hecha para");
137
+ define("LM_MSG_FRONT_4","La conexi�n FTP ha fallado");
138
+ define("LM_MSG_FRONT_5","Intentando conectar a");
139
+ define("LM_MSG_FRONT_6","para el usuario");
140
+ define("LM_MSG_BACK_1","Configuraci�n actualizada con �xito...");
141
+ define("LM_MSG_BACK_2","La conexi�n FTP ha fallado!");
142
+ define("LM_MSG_BACK_3","copia de seguridad movida con �xito!. La copia de seguridad deber�a ser visible en el lugar elegido.");
143
+ define("LM_MSG_BACK_4","transferencia realizada, comenzando el prceso de clonado en el servidor remoto");
144
+ define("LM_MSG_BACK_5","despublicado del frontend con �xito");
145
+ define("LM_MSG_BACK_6","Ha fallado la despublicaci�n! Por favor, compruebe sus rutas");
146
+ define("LM_MSG_BACK_7","Publicado en el frontend con �xito!");
147
+ define("LM_MSG_BACK_8","Publicaci�n fallida! Por favor, compruebe sus rutas");
148
+ define("LM_MSG_BACK_9","Clones renombrados con �xito!");
149
+ define("LM_MSG_BACK_10","La ruta Joomla no est� dentro de la ruta de copia de seguridad! No podr�a usar el modo de descarga directa! Deber�a editar su Configuraci�n -> Sistema y establecer el -Vinculo de descarga directa- a -No-");
150
+ define("LM_MSG_BACK_11","Proceso de copia de seguridad manual completada!<a href='index2.php?option=com_cloner&task=view'>Pulsar aqu� para continuar</a>");
151
+ define("LM_MSG_BACK_12","<h2>Ha fallado la copia de seguridad!. Por favor, compruebe que tiene soporte para utilidades ZIP (/usr/bin/zip or /usr/local/bin/zip) en su servidor y la ruta que estableciste en la configuraci�n es correcta, o elige el tipo de archivo Zip.</h2>");
152
+ define("LM_MSG_BACK_13","<h2>Ha fallado la copia de seguridad!. Por favor, compruebe que tiene soporte para utilidades TAR (/usr/bin/tar or /usr/local/bin/tar) en su servidor y la ruta que estableciste en la configuraci�n es correcta, o elige el tipo de archivo Tar.</h2>");
153
+ define("LM_MSG_BACK_14","<font color='red'>Hubo un problema al generar la copia de seguridad de la base de datos, Por favor comprueba tu ruta al servidor mysqldump.</font>");
154
+ define("LM_CRON_TOP","Configurando la copia de seguridad Cron:");
155
+ define("LM_CRON_SUB","<b>Usando la funci�n Cron puedes configurar un generador autom�tico de copias de seguridad para tu web Joomla:</b><br>
156
+ Para configurarla necesitas a�adir en tu panel de control Cron el comando siguiente:");
157
+ define("LM_CRON_HELP","Atenci�n:
158
+ - Si tu ruta php es diferente de /usr/bin/php Por favor, usa esta: format /$"."php_path/php
159
+
160
+
161
+ Weiterf�hrende Informationen (englisch) wie man ein Cronjob konfiguriert f�r
162
+ - Cpanel <a href='http://www.cpanel.net/docs/cpanel/' target='_blank'>click here</a>
163
+ - Plesk <a href='http://www.swsoft.com/doc/tutorials/Plesk/Plesk7/plesk_plesk7_eu/plesk7_eu_crontab.htm' target='_blank'>click here</a>
164
+ - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>click here</a>
165
+ - General Linux crontab info <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>click here</a>
166
+
167
+ Wenn du Hilfe beim Setup des Cron Backups ben�tigst oder Probleme beim Cron Backups hast, dann wende dich bitte
168
+ an unser Forum <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a> oder schreibe uns eine Email an <a href='mailto:admin@xcloner.com'>admin@xcloner.com</a>");
169
+ define("LM_CRON_SETTINGS","Configuraci�n Cron");
170
+ define("LM_CRON_MODE","Modo de guardado e copias de seguridad:");
171
+ define("LM_CRON_MODE_INFO"," <br />
172
+ <small>Fijese bien*: Si se elige -Servidor local- Usaremos la ruta de copias de seguridad por defecto de la secci�n General para guardar la copia de seguridad </small>
173
+ <br />
174
+ <small> Atenci�n:** Si se usa el modo correo no garantizamos que la copia de seguridad alcance la cuenta de correo debido a limitaciones del proveedor</small>");
175
+ define("LM_CRON_TYPE_INFO","<small><br />Por favor, elije el tipo de copia que querr�as crear.</small>");
176
+ define("LM_CRON_MYSQL_DETAILS","Opciones MySQL");
177
+ define("LM_CRON_MYSQL_DROP","A�ade MySQL Drop:");
178
+ define("LM_CRON_TYPE","Modo Copia de seguridad:");
179
+ define("LM_CRON_FTP_DETAILS","Detalles del modo de guardado FTP:");
180
+ define("LM_CRON_FTP_SERVER","Servidor FTP:");
181
+ define("LM_CRON_FTP_USER","Usuario FTP:");
182
+ define("LM_CRON_FTP_PASS","Contrase�a FTP:");
183
+ define("LM_CRON_FTP_PATH","Ruta FTP:");
184
+ define("LM_CRON_FTP_DELB","Borrar copia de seguridad tras transferir:");
185
+ define("LM_CRON_EMAIL_DETAILS","Detalles del modo correo:");
186
+ define("LM_CRON_EMAIL_ACCOUNT","Cuenta de correo:");
187
+ define("LM_CRON_COMPRESS","Comprimir archivos de copia de seguridad:");
188
+ define("LM_RESTORE_TOP","Info de restaurar copias de seguridad");
189
+ define("LM_CREDIT_TOP","Sobre XCloner:");
190
+ define("LM_CLONE_FORM_TOP","<h2>Introduce tus datos FTP abajo:</h2>");
191
+ define("LM_CONFIG_INFO_T_SAFEMODE","Modo de seguridad Php:");
192
+ define("LM_CONFIG_INFO_T_MTIME","Tiempo m�ximo de ejecuci�n Php::");
193
+ define("LM_CONFIG_INFO_T_MEML","L�mite de memoria Php:");
194
+ define("LM_CONFIG_INFO_T_BDIR","PHP open_basedir:");
195
+ define("LM_CONFIG_INFO_T_EXEC","exec() Ayuda funci�n:");
196
+ define("LM_CONFIG_INFO_T_TAR","Ruta servidor utilidad Tar:");
197
+ define("LM_CONFIG_INFO_T_ZIP","Ruta servidor utilidad Zip:");
198
+ define("LM_CONFIG_INFO_T_MSQL","Ruta servidor utilidad MySQLDump:");
199
+ define("LM_CONFIG_INFO_T_BPATH","Ruta Copia de seguridad:");
200
+ define("LM_CONFIG_INFO_ROOT_PATH_SUB","<small>La ruta de inicio del la copia de seguridad necesita existir y ser legible para que XCloner comience el proceso de copia.</small>");
201
+ define("LM_CONFIG_INFO_ROOT_BPATH_TMP","Carpeta temporal:");
202
+ define("LM_CONFIG_INFO_ROOT_PATH_TMP_SUB","<small>Esta ruta necesita ser creada y escribible para que XCloner funcione correctamente.</small>");
203
+ define("LM_CONFIG_INFO","Esta pesta�a mostrar� Las opciones generales de sistema y las rutas");
204
+ define("LM_CONFIG_INFO_PATHS","Informaci�n de rutas generales:");
205
+ define("LM_CONFIG_INFO_PHP","Informaci�n de la configuraci�n PHp:");
206
+ define("LM_CONFIG_INFO_TIME","<small>Esto controla el tiempo m�ximo que se permite a tu script para correr en el servidor, en segundos.</small>");
207
+ define("LM_CONFIG_INFO_MEMORY","<small>Esto controla la memoria m�xima que pueden usar los procesos del script.</small>");
208
+ define("LM_CONFIG_INFO_BASEDIR","<small>Esto controla las rutas a las que tu script puede acceder. Sin valor, significa que puede acceder a todas.</small>");
209
+ define("LM_CONFIG_INFO_SAFEMODE","<small>El modo seguro necesita configurarse a Off para que XCloner funcione correctamente.</small>");
210
+ define("LM_CONFIG_INFO_TAR","<small>Si el script no puede determinar la ruta tar autom�ticamente necesitar�s desmarcar la caja de verificaci�n en la l�nea TAR en la pesta�a 'General'.</small>");
211
+ define("LM_CONFIG_INFO_ZIP","<small>Si el script no puede determinar la ruta zip autom�ticamente, necesitar�s desmarcar la caja de verificaci�n en la l�nea ZIP en la pesta�a 'General'</small>");
212
+ define("LM_CONFIG_INFO_MSQL","<small>Si el script no puede determinar la ruta mysqldump autom�ticamente, necesitar�s desmarcar la caja de verificaci�n en la l�nea MYSQLDUMP en la pesta�a 'General'</small>");
213
+ define("LM_CONFIG_INFO_EXEC","<small>Si esta funci�n est� deshabilitada, Puedes necesitar desmarcar ambas cajas de verificaci�n en la pesta�a 'General'.</small>");
214
+ define("LM_CONFIG_INFO_BPATH","<small>necesita ser escribible para que XCloner pueda archivar copias de seguridad.</small>");
215
+ define("LM_TRANSFER_URL","URL sitio web:");
216
+ define("LM_TRANSFER_URL_SUB","<small>Por favor, escriba la url de su sitio web donde se mover� la copia de seguridad. Ejemplo: http://www.nombresitio.com/ Esto se necesita para dirijirte all� y que accedas al script de restauraci�n</small>");
217
+ define("LM_TRANSFER_FTP_HOST","Servidor FTP:");
218
+ define("LM_TRANSFER_FTP_HOST_SUB","Ejemplo: ftp.nombre de sitio.com");
219
+ define("LM_TRANSFER_FTP_USER","Usuario FTP:");
220
+ define("LM_TRANSFER_FTP_USER_SUB","Ejemplo 'Juan'");
221
+ define("LM_TRANSFER_FTP_PASS","Contrase�a FTP:");
222
+ define("LM_TRANSFER_FTP_PASS_SUB","Ejemplo: 'juancontrase�a'");
223
+ define("LM_TRANSFER_FTP_DIR","Directorio FTP:");
224
+ define("LM_TRANSFER_FTP_DIR_SUB","Por favor, escribe el directorio FTP donde querr�as mover la copia de seguridad. Ejemplo: public_html/ o htdocs/ . Aseg�rate de que tiene permisos de escritura para todos. Normalmente 777.");
225
+ define("LM_BACKUP_NAME","<b>Por favor, elije el nombre de tu copia de seguridad</b>");
226
+ define("LM_BACKUP_NAME_SUB","<small>Si se deja en blanco, generar� un nombre por defecto.</small>");
227
+ define("LM_COL_AVALAIBLE","Paquete Frontend");
228
+ define("LM_DELETE_FILE_SUCCESS","Archivo(s) borrado(s)");
229
+ define("LM_DOWNLOAD_TITLE","Descargar esta copia de seguridad");
230
+ define("LM_DATABASE_EXCLUDED","Excluidos");
231
+ define("LM_DATABASE_CURRENT","BBDD actual:");
232
+ define("LM_DATABASE_INCLUDE_DATABASES","Incluir BBDD extra");
233
+ define("LM_DATABASE_INCLUDE_DATABASES_SUB","<small>Puedes seleccionar m�ltiples BBDD para incluir en la copia de seguridad presionando la tecla Ctrl y seleccionando con el rat�n los objetos que se desee incluir.</small>");
234
+ define("LM_DATABASE_MISSING_TABLES","Error: Definiciones de tabla no encontradas");
235
+ define("LM_DATABASE_BACKUP_FAILED","Copia de seguridad fallida, por favor comprueba que la carpeta administrator/backups es escribible!");
236
+ define("LM_DATABASE_BACKUP_COMPLETED","Copia de seguridad completada");
237
+ define("LM_RENAME_TOP","Renombrar clones seleccionados");
238
+ define("LM_RENAME","Renombrar clone");
239
+ define("LM_RENAME_TO","a");
240
+ define("LM_CLONER_RESTORE","<h2>Como restaurar una copia de seguridad en diferentes lugares INFO!</h2>
241
+ <pre>
242
+ Restaurar tus copias de seguridad nunca fu� tan f�cil! Con la ayuda de tu funvi�n de clonado de <a href='index2.php?option=com_cloner&task=view'>Ver copias</a>
243
+ tu podr�s mover tus copias a cualquier parte en internet
244
+
245
+ Esto es lo que debes hacer:
246
+
247
+ <b>Paso 1 - mueve la copia al servidor de restauraci�n</b>
248
+
249
+ - Ir al �rea 'Ver copias de seguridad'
250
+ - Tras seleccionar tu copia, pulsa en el Bot�n 'Cl�nalo'
251
+ - Introduce los detalles ftp donde querr�as clonar la copia de seguridad
252
+ - Tras pulsra en 'enviar' la copia y el script de restauraci�n ser�n transferidos al nuevo servidor y se te dar� una url para acceder al nuevo paso basado en la url que introdujiste lara acceso remoto. Ejemplo: <b>http://Misitioderestauraci�n.com/XCloner.php</b>
253
+
254
+ <b>Atenci�n:</b>Si este proceso falla por alguna raz�n. Debes hacer esto:
255
+ 1. Desc�rgate la copia de seguridad en tu PC.
256
+ 2. Desc�rgate el script de restauraci�n, los 3 archivos, desde el directorio administrator/components/com_xcloner/restore
257
+ 3. Sube la copia de seguridad y el script a tu directorio de restauraci�n.
258
+ 4. Lanza XCloner.php en tu navegador y sigue la pantalla de restauraci�n tal y como especifica abajo
259
+ Beispiel URL: <b>http://neue-seite.de/XCloner.php</b>
260
+
261
+ <b>Paso 2: La pantalla de restauraci�n de XCloner.php:</b>
262
+ <b>XCloner.php - El script de restauraci�n -</b>
263
+ - En este paso ya tienes en posici�n el clon que has hecho basado en tu sitio Joomla y script de restauraci�n
264
+ - Introduzca los nuevos detalles de mysql. Esto incluye tu nuevo servidor MYSQL, usuario, contrase�a y nombre de BBDD.
265
+ - Introducetu nueva Url y contrase�a
266
+ - Para restaurar los archivos tienes <b>2 opciones:</b>
267
+
268
+ - 1. Restaurar los archivos pot ftp, el script simular� un proceso de subida ftp en tu servidor, esto solucionar� los problemas de permisos del paso 2.
269
+ - 2. Restaura los archivos directamente, esto desarchivar� los archivos en tu servidor, ser� r�pido pero podr� encontrar algun problema de permisos si el acceso ftp se usa muy a menudo para hacer cambios en el sitio
270
+
271
+ - Tras pulsar el bot�n de env�o el script tratar� de mover los archivos a la nueva ruta directamente o usando ftp e instalar� la BBDD.
272
+ - Si todo va bientu clon del sitio estar� subido y corriendo normalmente en su nuevo emplazamiento
273
+
274
+ Para soporte, consulta nuestro foro <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
275
+ o env�anos un correo a <a href='mailto:info@xcloner.com'>info@xcloner.com</a>.
276
+
277
+ </pre>");
278
+ define("LM_CLONER_ABOUT","<h2>Copia de seguridad XCloner</h2><br />
279
+ <pre>XCloner es una herramienta que te ayudar� a manejar tus copias de seguridad de tus sitios Joomla, generar/restaurar/mover, de manera que tu sitio est� siempre seguro. <b>Caracter�sticas:</b>
280
+ - Script Cron para generar copias de seguridad
281
+ - Opciones para multiples copias de seguridad
282
+ - Herramienta de restauraci�n para mover el sitio web r�pidamente a otros emplazamientos.
283
+ - Multiples emplazamientos en donde podr�as guardar la copia a salvo.
284
+
285
+ Para reportar problemas o enviarnos sugerencias, cont�ctenos a admin@xcloner.com o vis�tenos en
286
+ <a href='http://www.xcloner.com'>http://www.xcloner.com</a>.
287
+ </pre>
288
+ <br/><br/>
289
+
290
+ XCloner.com � 2004-2010 | <a href='http://www.xcloner.com'>www.xcloner.com</a>
291
+ <br/><p/><br/>");
292
+ define("LM_LOGIN_TEXT","<pre>
293
+ <b>Atenci�n:</b>
294
+ 1. Si est�s en esta pantalla por primera vez tu usuario por defecto es '<i>admin</i>' y la contrase�a '<i>admin</i>'.
295
+ necesitar�s cambiarla tras entrar en el sistema
296
+
297
+ 2. Si olvidas tu contrase�a necesitar�s resetearla con este c�digo:
298
+
299
+ <b>$"."_CONFIG[\"jcpass\"] = md5(\"mi_nueva_contrase�a\");</b>
300
+ </pre>
301
+ ");
302
+ ?>
license.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ The software source code has not been encrypt, however JoomlaPlug.com reserves the rights to the code ownership,
2
+ and will only be providing support to Premium users who purchased a JoomlaCloner License
readme.txt ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === XCloner ===
2
+ Contributors: xcloner
3
+ Donate link: http://www.xcloner.com/
4
+ Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload
5
+ Requires at least: 2.0.2
6
+ Tested up to: 3.0.1
7
+ Stable tag: 2.1.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
+
11
+ == Description ==
12
+
13
+ www.XCloner.com
14
+
15
+ XCloner is a Backup and Restore component designed for PHP/Mysql websites, it can work as a native plugin for WordPress and Joomla!.
16
+
17
+ XCloner design was specifically created to Generate custom backups of any LAMP website through custom admin inputs, and to be able to Restore the clone on any other location with the help of the automatic Restore script we provide, independent from the main package!
18
+
19
+ XCloner Backup tool uses Open Source standards like TAR and Mysql formats so you can rest assured your backups can be restored in a variety of ways, giving you more flexibility and full control.
20
+
21
+ XCloner Generate, Move and Restore process:
22
+
23
+ 1. Generate and Store the backups
24
+ 2. Move the backup and restore script to the new location
25
+ 3. Restore the backup by launching the XCloner.php restore script
26
+
27
+ Features:
28
+
29
+ * Backup and Restore any PHP/Mysql application
30
+
31
+ * Create custom backups
32
+
33
+ * Generate automatic backups based on cronjobs
34
+
35
+ * Restore your backups anywhere
36
+
37
+ * Share your custom backups with your clients
38
+
39
+
40
+ == Installation ==
41
+
42
+ 1. Upload the plugin directory to wp-content/plugins dirctory
43
+ 2. Activate the plugin
44
+ 3. Create directory administrator/backups and make it writeable under your Wordpress site root
45
+ 4. Access it from the Plugins->XCloner menu
46
+
47
+ IMPORTANT:
48
+
49
+ If the plugin was downloaded from the xcloner.com website, follow this install:
50
+
51
+ 1. Upload the package files to your Wordpress ROOT directory
52
+ 2. Activate the plugin
53
+ 3. Create directory administrator/backups and make it writeable under your Wordpress site root
54
+ 4. Access it from the Plugins->XCloner menu
55
+
56
+ == Frequently Asked Questions ==
57
+
58
+ = How do I restore my backup? =
59
+
60
+ If the inside Clone option fails for some reason, you need to:
61
+
62
+ 1. upload the backup archive to the new restore site
63
+ 2. upload the XCloner.php and TAR.php files in the same location as the backup from 1., you can find these files in directory wp-content/plugins/xcloner/restore/ on the original site
64
+ 3. start the XCloner.php restore script in your browser
65
+
66
+
67
+ == Screenshots ==
68
+
69
+ 1. Login screen
70
+ 2. Config area
71
+ 3. Config options
72
+ 4. Generate Backup -> database options
73
+ 5. Generate Backup -> files options
74
+
75
+ == Changelog ==
76
+
77
+ = 2.1 =
78
+ Initial release
79
+
80
+ == Upgrade Notice ==
81
+
82
+ = 2.1 =
83
+ Initial release
recursive.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $startdir = "D:/server/wamp/www/";
3
+ $dir = $startdir;
4
+ $last_file = "..";
5
+ $recursive_limit = 400;
6
+
7
+
8
+ $f_arr = array();
9
+ $d_arr = array() ;
10
+ #$dir = "E:/server/www/Joomla/xcloner/images";
11
+
12
+ while($i++ < 100){
13
+
14
+ $count = 0;
15
+ $k = 0;
16
+ $return = "";
17
+ $last = recursive($dir, $last_file);
18
+ echo "<br /><b>Lastdir:</b> $last<br />" ;
19
+
20
+ if(dirname($last) == dirname($startdir)){
21
+
22
+ $f_arr = array_unique($f_arr);
23
+ $d_arr = array_unique($d_arr);
24
+ sort($f_arr);
25
+ sort($d_arr);
26
+ echo "<b>Recurse finished! Files: ".sizeof($f_arr)." ; Directories: ".sizeof($d_arr)."</b>";
27
+ #print_r($f_arr);
28
+ break;
29
+ }
30
+
31
+ #echo $last_return;
32
+ if((!is_dir($last))||($last_return == 1))
33
+ {
34
+ $dir = dirname($last);
35
+ $last_file = basename ($last);
36
+ }
37
+ else{
38
+ $dir = $last;
39
+ $last_file = '..';
40
+
41
+ }
42
+
43
+
44
+
45
+ }
46
+
47
+ function recursive( $dir , $last_file = '..')
48
+ { global $count, $return, $k, $startdir, $last_return, $recursive_limit, $f_arr, $d_arr;
49
+
50
+ #echo "<br /><b>Opening $dir with last file $last_file</b><br />";
51
+ $last_return = 0;
52
+
53
+ if (is_dir($dir)) {
54
+ if ($dh = opendir($dir)) {
55
+ while (($file = readdir($dh)) !== false ) {
56
+
57
+ #echo $file."--".$last_file."<br />";
58
+
59
+ if (($file != $last_file)&&($k == 0))
60
+ continue;
61
+ elseif(($file == $last_file)&&($file != '..')){
62
+ $k = 1;
63
+ continue;
64
+ }else{
65
+
66
+ $k =1 ;
67
+ }
68
+ #echo "<b>".$file."</b>";
69
+
70
+ if( $file != "." && $file != ".." )
71
+ {
72
+ $cfile = "$dir/$file";
73
+
74
+ if($count == $recursive_limit){
75
+
76
+ if($return == "")
77
+ $return = $cfile;
78
+
79
+ $last_return = 2;
80
+
81
+ if(is_dir($cfile))
82
+ $d_arr[] = $cfile;
83
+ else
84
+ $f_arr[] = $cfile;
85
+
86
+ echo "return here with $cfile";return $return ;
87
+ }
88
+
89
+ ++$count;
90
+
91
+ if( is_dir( $dir ."/". $file ) )
92
+ {
93
+ echo "<b>Entering Directory: $cfile</b><br/>";
94
+ $d_arr[] = $cfile;
95
+ recursive( $cfile );
96
+
97
+ }
98
+ else
99
+ {
100
+
101
+ echo "file: $cfile<br/>";
102
+
103
+ $f_arr[] = $cfile;
104
+
105
+ }
106
+ }
107
+ }
108
+ closedir($dh);
109
+ }
110
+ }
111
+
112
+ $last_return = 1;
113
+ return $dir;
114
+
115
+ }
116
+
117
+
118
+ ?>
restore/TAR.php ADDED
@@ -0,0 +1,1821 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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($p_path, &$p_list_detail, $p_mode,
1397
+ $p_file_list, $p_remove_path)
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
+ // ----- By default no unzip if the file is not found
1456
+ $v_extract_file = false;
1457
+
1458
+ for ($i=0; $i<sizeof($p_file_list); $i++) {
1459
+ // ----- Look if it is a directory
1460
+ if (substr($p_file_list[$i], -1) == '/') {
1461
+ // ----- Look if the directory is in the filename path
1462
+ if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
1463
+ && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
1464
+ == $p_file_list[$i])) {
1465
+ $v_extract_file = TRUE;
1466
+ break;
1467
+ }
1468
+ }
1469
+
1470
+ // ----- It is a file, so compare the file names
1471
+ elseif ($p_file_list[$i] == $v_header['filename']) {
1472
+ $v_extract_file = TRUE;
1473
+ break;
1474
+ }
1475
+ }
1476
+ } else {
1477
+ $v_extract_file = TRUE;
1478
+ }
1479
+
1480
+ // ----- Look if this file need to be extracted
1481
+ if (($v_extract_file) && (!$v_listing))
1482
+ {
1483
+ if (($p_remove_path != '')
1484
+ && (substr($v_header['filename'], 0, $p_remove_path_size)
1485
+ == $p_remove_path))
1486
+ $v_header['filename'] = substr($v_header['filename'],
1487
+ $p_remove_path_size);
1488
+ if (($p_path != './') && ($p_path != '/')) {
1489
+ while (substr($p_path, -1) == '/')
1490
+ $p_path = substr($p_path, 0, strlen($p_path)-1);
1491
+
1492
+ if (substr($v_header['filename'], 0, 1) == '/')
1493
+ $v_header['filename'] = $p_path.$v_header['filename'];
1494
+ else
1495
+ $v_header['filename'] = $p_path.'/'.$v_header['filename'];
1496
+ }
1497
+ if (file_exists($v_header['filename'])) {
1498
+ if ( (@is_dir($v_header['filename']))
1499
+ && ($v_header['typeflag'] == '')) {
1500
+ $this->_error('File '.$v_header['filename']
1501
+ .' already exists as a directory');
1502
+ return false;
1503
+ }
1504
+ if ( ($this->_isArchive($v_header['filename']))
1505
+ && ($v_header['typeflag'] == "5")) {
1506
+ $this->_error('Directory '.$v_header['filename']
1507
+ .' already exists as a file');
1508
+ return false;
1509
+ }
1510
+ if (!is_writeable($v_header['filename'])) {
1511
+ $this->_error('File '.$v_header['filename']
1512
+ .' already exists and is write protected');
1513
+ return false;
1514
+ }
1515
+ if (filemtime($v_header['filename']) > $v_header['mtime']) {
1516
+ // To be completed : An error or silent no replace ?
1517
+ }
1518
+ }
1519
+
1520
+ // ----- Check the directory availability and create it if necessary
1521
+ elseif (($v_result
1522
+ = $this->_dirCheck(($v_header['typeflag'] == "5"
1523
+ ?$v_header['filename']
1524
+ :dirname($v_header['filename'])))) != 1) {
1525
+ $this->_error('Unable to create path for '.$v_header['filename']);
1526
+ return false;
1527
+ }
1528
+
1529
+ if ($v_extract_file) {
1530
+ if ($v_header['typeflag'] == "5") {
1531
+ if (!@file_exists($v_header['filename'])) {
1532
+ if (!@mkdir($v_header['filename'], 0777)) {
1533
+ $this->_error('Unable to create directory {'
1534
+ .$v_header['filename'].'}');
1535
+ return false;
1536
+ }
1537
+ }
1538
+ } elseif ($v_header['typeflag'] == "2") {
1539
+ if (!@symlink($v_header['link'], $v_header['filename'])) {
1540
+ $this->_error('Unable to extract symbolic link {'
1541
+ .$v_header['filename'].'}');
1542
+ return false;
1543
+ }
1544
+ } else {
1545
+ if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
1546
+ $this->_error('Error while opening {'.$v_header['filename']
1547
+ .'} in write binary mode');
1548
+ return false;
1549
+ } else {
1550
+ $n = floor($v_header['size']/512);
1551
+ for ($i=0; $i<$n; $i++) {
1552
+ $v_content = $this->_readBlock();
1553
+ fwrite($v_dest_file, $v_content, 512);
1554
+ }
1555
+ if (($v_header['size'] % 512) != 0) {
1556
+ $v_content = $this->_readBlock();
1557
+ fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
1558
+ }
1559
+
1560
+ @fclose($v_dest_file);
1561
+
1562
+ // ----- Change the file mode, mtime
1563
+ @touch($v_header['filename'], $v_header['mtime']);
1564
+ if ($v_header['mode'] & 0111) {
1565
+ // make file executable, obey umask
1566
+ $mode = fileperms($v_header['filename']) | (~umask() & 0111);
1567
+ @chmod($v_header['filename'], $mode);
1568
+ }
1569
+ }
1570
+
1571
+ // ----- Check the file size
1572
+ clearstatcache();
1573
+ if (filesize($v_header['filename']) != $v_header['size']) {
1574
+ $this->_error('Extracted file '.$v_header['filename']
1575
+ .' does not have the correct file size \''
1576
+ .filesize($v_header['filename'])
1577
+ .'\' ('.$v_header['size']
1578
+ .' expected). Archive may be corrupted.');
1579
+ return false;
1580
+ }
1581
+ }
1582
+ } else {
1583
+ $this->_jumpBlock(ceil(($v_header['size']/512)));
1584
+ }
1585
+ } else {
1586
+ $this->_jumpBlock(ceil(($v_header['size']/512)));
1587
+ }
1588
+
1589
+ /* TBC : Seems to be unused ...
1590
+ if ($this->_compress)
1591
+ $v_end_of_file = @gzeof($this->_file);
1592
+ else
1593
+ $v_end_of_file = @feof($this->_file);
1594
+ */
1595
+
1596
+ if ($v_listing || $v_extract_file || $v_extraction_stopped) {
1597
+ // ----- Log extracted files
1598
+ if (($v_file_dir = dirname($v_header['filename']))
1599
+ == $v_header['filename'])
1600
+ $v_file_dir = '';
1601
+ if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == ''))
1602
+ $v_file_dir = '/';
1603
+
1604
+ $p_list_detail[$v_nb++] = $v_header;
1605
+ if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
1606
+ return true;
1607
+ }
1608
+ }
1609
+ }
1610
+
1611
+ return true;
1612
+ }
1613
+ // }}}
1614
+
1615
+ // {{{ _openAppend()
1616
+ function _openAppend()
1617
+ {
1618
+ if (filesize($this->_tarname) == 0)
1619
+ return $this->_openWrite();
1620
+
1621
+ if ($this->_compress) {
1622
+ $this->_close();
1623
+
1624
+ if (!@rename($this->_tarname, $this->_tarname.".tmp")) {
1625
+ $this->_error('Error while renaming \''.$this->_tarname
1626
+ .'\' to temporary file \''.$this->_tarname
1627
+ .'.tmp\'');
1628
+ return false;
1629
+ }
1630
+
1631
+ if ($this->_compress_type == 'gz')
1632
+ $v_temp_tar = @gzopen($this->_tarname.".tmp", "rb");
1633
+ elseif ($this->_compress_type == 'bz2')
1634
+ $v_temp_tar = @bzopen($this->_tarname.".tmp", "rb");
1635
+
1636
+ if ($v_temp_tar == 0) {
1637
+ $this->_error('Unable to open file \''.$this->_tarname
1638
+ .'.tmp\' in binary read mode');
1639
+ @rename($this->_tarname.".tmp", $this->_tarname);
1640
+ return false;
1641
+ }
1642
+
1643
+ if (!$this->_openWrite()) {
1644
+ @rename($this->_tarname.".tmp", $this->_tarname);
1645
+ return false;
1646
+ }
1647
+
1648
+ if ($this->_compress_type == 'gz') {
1649
+ while (!@gzeof($v_temp_tar)) {
1650
+ $v_buffer = @gzread($v_temp_tar, 512);
1651
+ if ($v_buffer == ARCHIVE_TAR_END_BLOCK) {
1652
+ // do not copy end blocks, we will re-make them
1653
+ // after appending
1654
+ continue;
1655
+ }
1656
+ $v_binary_data = pack("a512", $v_buffer);
1657
+ $this->_writeBlock($v_binary_data);
1658
+ }
1659
+
1660
+ @gzclose($v_temp_tar);
1661
+ }
1662
+ elseif ($this->_compress_type == 'bz2') {
1663
+ while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
1664
+ if ($v_buffer == ARCHIVE_TAR_END_BLOCK) {
1665
+ continue;
1666
+ }
1667
+ $v_binary_data = pack("a512", $v_buffer);
1668
+ $this->_writeBlock($v_binary_data);
1669
+ }
1670
+
1671
+ @bzclose($v_temp_tar);
1672
+ }
1673
+
1674
+ if (!@unlink($this->_tarname.".tmp")) {
1675
+ $this->_error('Error while deleting temporary file \''
1676
+ .$this->_tarname.'.tmp\'');
1677
+ }
1678
+
1679
+ } else {
1680
+ // ----- For not compressed tar, just add files before the last
1681
+ // one or two 512 bytes block
1682
+ if (!$this->_openReadWrite())
1683
+ return false;
1684
+
1685
+ clearstatcache();
1686
+ $v_size = filesize($this->_tarname);
1687
+
1688
+ // We might have zero, one or two end blocks.
1689
+ // The standard is two, but we should try to handle
1690
+ // other cases.
1691
+ fseek($this->_file, $v_size - 1024);
1692
+ if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1693
+ fseek($this->_file, $v_size - 1024);
1694
+ }
1695
+ elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1696
+ fseek($this->_file, $v_size - 512);
1697
+ }
1698
+ }
1699
+
1700
+ return true;
1701
+ }
1702
+ // }}}
1703
+
1704
+ // {{{ _append()
1705
+ function _append($p_filelist, $p_add_dir='', $p_remove_dir='')
1706
+ {
1707
+ if (!$this->_openAppend())
1708
+ return false;
1709
+
1710
+ if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir))
1711
+ $this->_writeFooter();
1712
+
1713
+ $this->_close();
1714
+
1715
+ return true;
1716
+ }
1717
+ // }}}
1718
+
1719
+ // {{{ _dirCheck()
1720
+
1721
+ /**
1722
+ * Check if a directory exists and create it (including parent
1723
+ * dirs) if not.
1724
+ *
1725
+ * @param string $p_dir directory to check
1726
+ *
1727
+ * @return bool TRUE if the directory exists or was created
1728
+ */
1729
+ function _dirCheck($p_dir)
1730
+ {
1731
+ clearstatcache();
1732
+ if ((@is_dir($p_dir)) || ($p_dir == ''))
1733
+ return true;
1734
+
1735
+ $p_parent_dir = dirname($p_dir);
1736
+
1737
+ if (($p_parent_dir != $p_dir) &&
1738
+ ($p_parent_dir != '') &&
1739
+ (!$this->_dirCheck($p_parent_dir)))
1740
+ return false;
1741
+
1742
+ if (!@mkdir($p_dir, 0777)) {
1743
+ $this->_error("Unable to create directory '$p_dir'");
1744
+ return false;
1745
+ }
1746
+
1747
+ return true;
1748
+ }
1749
+
1750
+ // }}}
1751
+
1752
+ // {{{ _pathReduction()
1753
+
1754
+ /**
1755
+ * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
1756
+ * rand emove double slashes.
1757
+ *
1758
+ * @param string $p_dir path to reduce
1759
+ *
1760
+ * @return string reduced path
1761
+ *
1762
+ * @access private
1763
+ *
1764
+ */
1765
+ function _pathReduction($p_dir)
1766
+ {
1767
+ $v_result = '';
1768
+
1769
+ // ----- Look for not empty path
1770
+ if ($p_dir != '') {
1771
+ // ----- Explode path by directory names
1772
+ $v_list = explode('/', $p_dir);
1773
+
1774
+ // ----- Study directories from last to first
1775
+ for ($i=sizeof($v_list)-1; $i>=0; $i--) {
1776
+ // ----- Look for current path
1777
+ if ($v_list[$i] == ".") {
1778
+ // ----- Ignore this directory
1779
+ // Should be the first $i=0, but no check is done
1780
+ }
1781
+ else if ($v_list[$i] == "..") {
1782
+ // ----- Ignore it and ignore the $i-1
1783
+ $i--;
1784
+ }
1785
+ else if ( ($v_list[$i] == '')
1786
+ && ($i!=(sizeof($v_list)-1))
1787
+ && ($i!=0)) {
1788
+ // ----- Ignore only the double '//' in path,
1789
+ // but not the first and last /
1790
+ } else {
1791
+ $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?'/'
1792
+ .$v_result:'');
1793
+ }
1794
+ }
1795
+ }
1796
+ $v_result = strtr($v_result, '\\', '/');
1797
+ return $v_result;
1798
+ }
1799
+
1800
+ // }}}
1801
+
1802
+ // {{{ _translateWinPath()
1803
+ function _translateWinPath($p_path, $p_remove_disk_letter=true)
1804
+ {
1805
+ if (defined('OS_WINDOWS') && OS_WINDOWS) {
1806
+ // ----- Look for potential disk letter
1807
+ if ( ($p_remove_disk_letter)
1808
+ && (($v_position = strpos($p_path, ':')) != false)) {
1809
+ $p_path = substr($p_path, $v_position+1);
1810
+ }
1811
+ // ----- Change potential windows directory separator
1812
+ if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
1813
+ $p_path = strtr($p_path, '\\', '/');
1814
+ }
1815
+ }
1816
+ return $p_path;
1817
+ }
1818
+ // }}}
1819
+
1820
+ }
1821
+ ?>
restore/XCloner.php ADDED
@@ -0,0 +1,2219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * XCloner
5
+ * Oficial website: http://www.joomlaplug.com/
6
+ * -------------------------------------------
7
+ * Creator: Liuta Romulus Ovidiu
8
+ * License: All Rights Reserved
9
+ * Email: admin@joomlaplug.com
10
+ * Revision: 1.0
11
+ * Date: July 2007
12
+ **/
13
+
14
+ @set_time_limit(3600);
15
+
16
+ @ini_set("error_reporting", E_ALL^E_NOTICE);
17
+
18
+ ###################### Do not edit Below #############################
19
+
20
+ $g_pcltar_lib_dir = "./";
21
+
22
+ require "TAR.php";
23
+
24
+ $_CONFIG['my_version'] = "1.9.0";
25
+
26
+ $_CONFIG['script_name'] = "XCloner.php";
27
+
28
+ $_CONFIG['sql_usefile'] = "";
29
+
30
+
31
+ if(isset($_REQUEST['sql_setfile']))
32
+
33
+ $_CONFIG['sql_usefile'] = $_REQUEST['sql_setfile'];
34
+
35
+
36
+ if(trim($_CONFIG['sql_usefile']) == "")
37
+
38
+ $_CONFIG['sql_usefile'] = "database-sql.sql";
39
+
40
+
41
+ if(isset($_REQUEST['strrep'])){
42
+
43
+ setcookie ("strrep_c", "", time() - 3600);
44
+
45
+ setcookie("strrep_c", str_replace("\r\n","*-*",stripslashes($_REQUEST['strrep'])), time()+3600); /* expire in 1 hour */
46
+
47
+ }
48
+
49
+ else{
50
+
51
+ $_REQUEST['strrep'] = str_replace("*-*", "\r\n", $_COOKIE['strrep_c']);
52
+
53
+ }
54
+
55
+
56
+ if ($handle = opendir('./')) {
57
+
58
+
59
+
60
+ /* This is the correct way to loop over the directory. */
61
+
62
+ while (false !== ($file = readdir($handle))){
63
+
64
+ $ext = substr($file,strlen($file)-4,strlen($file));
65
+
66
+ if(($file!='XCloner.php')&&($file!='..')&&($file!='.')&&(($ext=='.zip')||($ext=='.tgz')||($ext=='.tar')))
67
+
68
+ {
69
+
70
+ $_CONFIG[versions][] = $file;
71
+
72
+ }
73
+
74
+ }
75
+
76
+ closedir($handle);
77
+
78
+ }
79
+
80
+ else{
81
+
82
+ echo "Unable to open my directory for reading and listing!";exit;
83
+
84
+ }
85
+
86
+
87
+
88
+
89
+
90
+ ######################################################################
91
+
92
+
93
+
94
+ $_CONFIG['output_path'] = $_REQUEST['output_path'];
95
+
96
+ $_CONFIG['output_url'] = $_REQUEST['output_url_pref']."://".$_REQUEST['output_url'];
97
+
98
+ $_CONFIG['tmp'] = $_REQUEST['output_path'];
99
+
100
+ if($_REQUEST['files_skip'] == 1)
101
+
102
+ $_REQUEST['do_database'] = 1;
103
+
104
+
105
+
106
+ $filepath =$_SERVER["SCRIPT_FILENAME"];
107
+
108
+ $pathinfo = pathinfo($filepath);
109
+
110
+
111
+
112
+ $startscript = $pathinfo['dirname'];
113
+
114
+
115
+
116
+ #$owneruid=fileowner($startscript);
117
+
118
+ #$ownerinfo=posix_getpwuid($owneruid);
119
+
120
+
121
+
122
+
123
+
124
+ #$groupid = filegroup ($startscript);
125
+
126
+ #$groupinfo = posix_getgrgid($groupid);
127
+
128
+
129
+
130
+
131
+
132
+ $_CONFIG[group] = $groupinfo[name];
133
+
134
+ $_CONFIG[owner] =$ownerinfo[name];
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ ###################### FRONT AREA ###################################
143
+
144
+ ?>
145
+
146
+
147
+
148
+ <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
149
+
150
+ <html>
151
+
152
+ <head>
153
+
154
+ <title>XCloner - Your Clone Restore Utility</title>
155
+
156
+ <style type="text/css" media="screen">
157
+
158
+ @import url( http://www.joomlaplug.com/jcloner/style.css );
159
+
160
+ .error {
161
+
162
+ color: red;
163
+
164
+ font-size: 15px;
165
+
166
+ }
167
+
168
+ </style>
169
+
170
+ </head>
171
+
172
+ <body>
173
+
174
+
175
+
176
+ <table align='center' width='700' bgcolor='#eeeeee' style='padding: 0 5px 0 5px;'>
177
+
178
+ <tr><td align='center'><h2><font color=red>XCloner</font> Automatic Restore!</h2></td></tr>
179
+
180
+ <tr><td align='left'>
181
+
182
+ <form action='' method='GET' name='form'>
183
+
184
+ <?php
185
+
186
+
187
+
188
+ switch ($_REQUEST[task]) {
189
+
190
+
191
+
192
+ case 'step2':
193
+
194
+ step2();
195
+
196
+ break;
197
+
198
+ case 'step1':
199
+
200
+ step1();
201
+
202
+ break;
203
+
204
+ case 'getinfo':
205
+
206
+ getPHPINFO();
207
+
208
+ break;
209
+
210
+ case 'info':
211
+
212
+ echo phpinfo();
213
+
214
+ break;
215
+
216
+ default :
217
+
218
+ start();
219
+
220
+ break;
221
+
222
+ }
223
+
224
+
225
+
226
+
227
+
228
+ ?>
229
+
230
+ </form>
231
+
232
+ </td></tr>
233
+
234
+ <tr><td>
235
+
236
+ <small>XCloner Restore Version <b><?php echo $_CONFIG['my_version']?></b>
237
+
238
+ <br />For support and questions please visit us at <a href='http://www.xcloner.com' title='XCloner.com - Website Backup Application'>XCloner.com - Website Backup Made Easy</a>
239
+
240
+ </small>
241
+
242
+ </td></tr>
243
+
244
+ </table>
245
+
246
+ </body>
247
+
248
+ </html>
249
+
250
+
251
+
252
+
253
+
254
+ <?php
255
+
256
+ #####################################################################
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ ##################### FUNCTIONS #####################################
265
+
266
+
267
+
268
+ function step2($file=""){
269
+
270
+ global $_CONFIG,$filepath ;
271
+
272
+ $DBcreated = $_REQUEST[DBcreated];
273
+
274
+ if ($DBcreated=='on'){
275
+
276
+
277
+ $DBhostname = $_REQUEST['mysql_server'];
278
+
279
+ $DBuserName = $_REQUEST['mysql_username'];
280
+
281
+ $DBpassword = $_REQUEST['mysql_pass'];
282
+
283
+ $DBname = $_REQUEST['mysql_db'];
284
+
285
+
286
+ $db = @mysql_connect($DBhostname, $DBuserName, $DBpassword) or die("<br />The database details provided are incorrect and/or empty. Unable to connect to mysql server");
287
+
288
+ @mysql_query("CREATE database $DBname;");
289
+
290
+ if (!@mysql_select_db($DBname)) {
291
+
292
+ 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>");
293
+
294
+ }
295
+
296
+ if($_REQUEST['charset_of_file']!="")
297
+ mysql_query("SET NAMES ".$_REQUEST['charset_of_file']."");
298
+
299
+
300
+
301
+ }
302
+
303
+
304
+
305
+ if($_REQUEST['do_database'] != 1){
306
+
307
+ ############ DATABASE ONLY RESTRICTION##################################################
308
+
309
+
310
+
311
+ ########################### START FTP MODE #################################
312
+ if($_REQUEST[transfer_mode]==2){
313
+
314
+ $_CONFIG[output_path] = $_CONFIG[output_path]."/archive_tmp/";
315
+
316
+ @mkdir($_CONFIG[output_path]);
317
+
318
+
319
+
320
+ // set up basic connection
321
+
322
+ $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>");
323
+
324
+
325
+
326
+ // login with username and password
327
+
328
+ $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>");
329
+
330
+
331
+
332
+ // check connection
333
+
334
+ if ((!$conn_id) || (!$login_result)) {
335
+
336
+ echo "<b style='color:red'>FTP connection has failed!</b>";
337
+
338
+ echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server].":".$_REQUEST[ftp_port]." for user ".$_REQUEST[ftp_user]."</b>";
339
+
340
+ return;
341
+
342
+ } else {
343
+
344
+ echo "<br />Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user], starting transfer...<br />";
345
+
346
+ }
347
+
348
+ $ftp_dir_original = ftp_pwd($conn_id);
349
+
350
+ @ftp_mkdir($conn_id,$_REQUEST[ftp_path]);
351
+
352
+ // try to change the directory to somedir
353
+ if (@ftp_chdir($conn_id, $_REQUEST[ftp_path])) {
354
+
355
+ echo "Current directory is now: <b>" . ftp_pwd($conn_id) . "</b>\n";
356
+
357
+ } else {
358
+
359
+ 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";
360
+
361
+ return;
362
+
363
+ }
364
+ @ftp_chdir($conn_id, $ftp_dir_original);
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+ }
373
+
374
+ ########################## END FTP MODE ######################################
375
+
376
+ ##### START extract ######
377
+ if($_REQUEST['refresh'] < 1){
378
+
379
+ $ext = substr($file, strlen($file)-4, strlen($file));
380
+
381
+ if($_REQUEST['file_utilities'] != '1'){
382
+
383
+ $tar_object = new Archive_Tar($file);
384
+
385
+ $tar_object->extract($_CONFIG['output_path']);
386
+ #$tar_object->extractList("backups/perm.txt", $_CONFIG['output_path']);
387
+
388
+ }else{
389
+
390
+ if($ext == '.tgz') $compress = 'z';
391
+ else $compress = '';
392
+
393
+ shell_exec("tar -x".$compress."pf $file -C $_CONFIG[output_path]");
394
+
395
+ }
396
+
397
+ }
398
+ ##### END extract ######
399
+
400
+
401
+ $new_arr = array();
402
+
403
+
404
+
405
+ #@chmod($_CONFIG[output_path], 0777);
406
+
407
+
408
+
409
+ $tran_file = $_CONFIG[output_path]."/transfer.txt";
410
+
411
+
412
+
413
+ if($_REQUEST[transfer_mode]==2){
414
+
415
+
416
+
417
+ # initialise list arrays, directories and files separately and array counters for them
418
+
419
+ $excludedFolders = array();
420
+
421
+ $d_arr = array(); $d = 0;
422
+
423
+ $ds_arr = array();
424
+
425
+ $f_arr = array(); $f = 0;
426
+
427
+ $s_arr = array(); $s = 0;
428
+
429
+
430
+
431
+ $d_arr[$d] = $_CONFIG[output_path];
432
+
433
+
434
+
435
+ if($_REQUEST['refresh'] < 1){
436
+
437
+ # obtain the list of files by recursing the mambo file store
438
+
439
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders , '', $_CONFIG[output_path]);
440
+
441
+
442
+
443
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $d_arr , '', $_CONFIG[output_path]);
444
+
445
+
446
+
447
+ sort($d_arr);
448
+
449
+ sort($f_arr);
450
+
451
+ $new_arr = array_merge($d_arr, $f_arr);
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ if($_REQUEST[transfer_mode]==2)
460
+
461
+ if($fp = fopen($tran_file, "w")){
462
+
463
+
464
+
465
+ foreach($new_arr as $file){
466
+
467
+
468
+
469
+ fwrite($fp, $file."\n");
470
+
471
+
472
+
473
+ }
474
+
475
+
476
+
477
+ fclose($fp);
478
+
479
+
480
+
481
+ }else{
482
+
483
+
484
+
485
+ echo "Unable to write to directory ".$_CONFIG[output_path]."! Please check that this directory is writeable!"; return;
486
+
487
+
488
+
489
+ }
490
+
491
+
492
+
493
+ else{};
494
+
495
+
496
+
497
+
498
+
499
+ }else{
500
+
501
+
502
+
503
+ $content = "";
504
+
505
+
506
+
507
+ $new_arr = file($tran_file);
508
+
509
+
510
+
511
+ }
512
+
513
+
514
+
515
+
516
+
517
+ if(sizeof($new_arr) != 0 )
518
+
519
+ $percn = sprintf("%.2f",($_REQUEST[next] * 100)/sizeof($new_arr));
520
+
521
+
522
+
523
+ if($percn > sizeof($new_arr))
524
+
525
+ $percn = sizeof($new_arr);
526
+
527
+
528
+
529
+ }
530
+
531
+
532
+
533
+
534
+
535
+ if($_REQUEST['refresh'] == 1){
536
+
537
+
538
+
539
+ echo "<h3>Transfering $percn% of ".sizeof($new_arr)." files through ftp</h3>";
540
+
541
+
542
+
543
+ echo "<textarea cols=70 rows=30 name='ftp_list'></textarea>";
544
+
545
+
546
+
547
+ }
548
+
549
+ elseif($_REQUEST['refresh'] == 2)
550
+
551
+
552
+
553
+ echo "Files transfer finished!";
554
+
555
+
556
+
557
+ $i = (int)$_REQUEST[next];
558
+
559
+ $j = 0;
560
+
561
+
562
+
563
+ ### MOVING THE FILES THROUGH FTP
564
+
565
+
566
+
567
+ #foreach($new_arr as $key=>$file)
568
+
569
+
570
+
571
+ for($key=$i;$key<=sizeof($new_arr);$key++){
572
+
573
+
574
+
575
+ $file = str_replace(array("\r","\n"), array("",""), $new_arr[$key]) ;
576
+
577
+
578
+
579
+ if($_REQUEST['manual_ftp'] == 1)
580
+
581
+ if($j == 100){
582
+
583
+
584
+
585
+ #echo "Transfering files from line: ". (int)$_REQUEST[next];
586
+
587
+
588
+
589
+
590
+
591
+ $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
592
+
593
+
594
+
595
+ $rurl = "XCloner.php?".$qstr[0]."&refresh=1&next=".($_REQUEST[next]+100);
596
+
597
+ ftp_close($conn_id);
598
+
599
+
600
+
601
+ echo "<script> document.location='".$rurl."'</script>";
602
+
603
+
604
+
605
+ exit;
606
+
607
+ }
608
+
609
+
610
+
611
+ $j++;
612
+
613
+
614
+
615
+ $sfile = str_replace($_CONFIG[output_path],"",$file);
616
+
617
+ $fsource = $_CONFIG[output_path]."/".$sfile;
618
+
619
+
620
+
621
+ if(($sfile != "")&&($sfile!="/"))
622
+
623
+ if($_REQUEST[transfer_mode]==2){
624
+
625
+
626
+
627
+ $upload = 1;
628
+
629
+
630
+
631
+
632
+
633
+ $ftarget = $_REQUEST[ftp_path]."/".$sfile;
634
+
635
+
636
+
637
+ if(is_dir($fsource)){
638
+
639
+
640
+
641
+ $upload1 = @ftp_mkdir($conn_id,$ftarget);
642
+
643
+
644
+
645
+ }
646
+
647
+ else{
648
+
649
+ $upload = ftp_put($conn_id, $ftarget, $fsource, FTP_BINARY);
650
+
651
+
652
+
653
+ }
654
+
655
+
656
+
657
+ #echo "$i <br >";
658
+
659
+ if(!$upload){
660
+
661
+ echo "<br /><font color=red>Transfer fail for $fsource to $ftarget</font> <br />File already exists and/or doesn't have writing permissions!<br/>";
662
+
663
+ }
664
+
665
+ else{
666
+
667
+ if($_REQUEST['manual_ftp'] == 1){
668
+
669
+ $ftarget .= '\n';
670
+
671
+ echo "<script>document.form.ftp_list.value = document.form.ftp_list.value + '".$ftarget."'; </script>";
672
+
673
+ #echo "$ftarget <br />\n";
674
+
675
+ }
676
+
677
+ }
678
+
679
+
680
+
681
+ }
682
+
683
+ }
684
+
685
+
686
+
687
+ if($_REQUEST['refresh'] == 1){
688
+
689
+
690
+
691
+ $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
692
+
693
+
694
+
695
+ $rurl = "XCloner.php?".$qstr[0]."&refresh=2&next=".($_REQUEST[next]+102);
696
+
697
+
698
+
699
+ echo "<script> document.location='".$rurl."'</script>";
700
+
701
+
702
+
703
+ exit;
704
+
705
+
706
+
707
+ }
708
+
709
+
710
+
711
+ ############### RESTORING HTACCESS AND CONFIGURATION PERM#####################################
712
+
713
+
714
+ if($_REQUEST[transfer_mode]==2){
715
+
716
+ $cmd = "CHMOD 0777 ".$_REQUEST[ftp_path]."/"."wp-config.php";
717
+
718
+ @ftp_site($conn_id, $cmd);
719
+
720
+ }
721
+
722
+ else{
723
+
724
+ @chmod($_REQUEST[output_path]."/"."wp-config.php", 0777);
725
+
726
+ }
727
+
728
+
729
+
730
+
731
+ #### CUSTOM PERMISSIONS #####
732
+ if($_REQUEST['preserve_perm']){
733
+
734
+
735
+ $perm_data = "";
736
+
737
+ $perm_file = $_CONFIG[output_path]."/administrator/backups/perm.txt";
738
+
739
+ $per = 1;
740
+
741
+
742
+ @chmod($perm_file,0777);
743
+
744
+ $fp = fopen($perm_file,'r');
745
+
746
+
747
+ if($fp){
748
+
749
+ while(!feof($fp))
750
+
751
+ $perm_data .= fread($fp, 1024);
752
+
753
+ fclose($fp);
754
+
755
+ }
756
+
757
+ else{
758
+
759
+ echo "Could not set permissions! Permissions file $perm_file not found!<br />";
760
+
761
+ $per = 0;
762
+
763
+ }
764
+
765
+
766
+ $data = explode("\n",$perm_data);
767
+
768
+ foreach($data as $value){
769
+
770
+ $dir = explode("|", $value);
771
+
772
+ if($dir[1]=="")
773
+
774
+ $dir[1] = '0755';
775
+
776
+ if(strstr($dir[0],"wp-config.php"))
777
+
778
+ $dir[1] = '0777';
779
+
780
+
781
+
782
+ if($_REQUEST[transfer_mode]==2){
783
+
784
+ $cmd = "CHMOD ".$dir[1]." ".$_REQUEST[ftp_path]."/".$dir[0];
785
+
786
+
787
+
788
+ @ftp_site($conn_id, $cmd);
789
+
790
+ }
791
+
792
+ else{
793
+
794
+ @chmod($_CONFIG[output_path]."/".$dir[0], octdec($dir[1]));
795
+
796
+ }
797
+
798
+ }
799
+
800
+ if($per){
801
+
802
+ echo "<h2>Permissions restored to their initial value...</h2>";
803
+
804
+ }
805
+
806
+ }
807
+ #### END CUSTOM PERMISSIONS #####
808
+
809
+
810
+ $_CONFIG[output_path] = str_replace("/archive_tmp/","",$_CONFIG[output_path]);
811
+
812
+
813
+ if($_REQUEST[transfer_mode]==2)
814
+
815
+ {
816
+
817
+ // close the FTP stream
818
+
819
+ @ftp_close($conn_id);
820
+
821
+ recursive_remove_directory($_CONFIG[output_path]."/archive_tmp/");
822
+
823
+ @unlink($_CONFIG[output_path]."/archive_tmp/");
824
+
825
+ echo "<h2>Files succesfully copied to ".$_REQUEST[ftp_path]." on $_REQUEST[ftp_server] using FTP</h2>";
826
+
827
+ }
828
+
829
+ else{
830
+
831
+ echo "<h2>Files succesfully copied to ".$_CONFIG[output_path]."</h2>";
832
+
833
+ }
834
+
835
+
836
+ ######### END DATABASE ONLY RESTRICT #########################################
837
+
838
+ }
839
+
840
+
841
+ ##### RESTORE CONFIGURATION #####
842
+
843
+ if(($_REQUEST['do_database'] != 1) || ($_REQUEST['files_skip'] == 1)){
844
+
845
+ $config_file = $_CONFIG[output_path]."/wp-config.php";
846
+
847
+ @chmod($config_file,0777);
848
+
849
+ @unlink($_CONFIG[output_path]."/administrator/backups/perm.txt");
850
+
851
+ if(($_CONFIG['sql_usefile'] == "database-sql.sql") && (!isset($_REQUEST['fpos'])))
852
+
853
+ if(write_config($config_file)){
854
+
855
+ echo "<H2>Configuration updated!";
856
+ echo "<iframe src='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."/wp-login.php' width=1 height=1></iframe>";
857
+ echo "</H2>";
858
+
859
+ }
860
+
861
+ else{
862
+ echo "<span class='error'>Unable to write to configuration file $config_file... Aborting...</span>";return;
863
+
864
+ }
865
+
866
+ }
867
+
868
+
869
+
870
+ ############ ATTEMPT DATABASE INSERT #####################################
871
+
872
+
873
+
874
+ if($DBcreated!='on'){
875
+
876
+ echo "<h2>Database import skipped!</h2>";
877
+
878
+ echo "<a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...</b></a><br />";
879
+
880
+ return ;
881
+
882
+ }
883
+
884
+ if (($DBcreated=='on')&&($_REQUEST['do_database'] == 1)){
885
+
886
+
887
+ $sqlfile = $_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile'];
888
+
889
+ if(!file_exists($sqlfile)){
890
+
891
+ echo "<span class='error'>Unable to read the database backup file $sqlfile , database was not imported!</span>";
892
+
893
+ }
894
+
895
+ else{
896
+
897
+ if($_REQUEST['manual_sql'])
898
+
899
+ $errors = populate_db_manual( $db, $sqlfile);
900
+
901
+ else
902
+
903
+ $errors = populate_db( $db, $sqlfile);
904
+
905
+
906
+
907
+ if(sizeof($errors)>0){
908
+
909
+ echo "There were some errors while importing the database:<br />";
910
+
911
+ echo "<textarea cols=60 rows=30>".implode("\n",$errors)."</textarea>";
912
+
913
+ exit;
914
+
915
+ }else{
916
+
917
+ @unlink($_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile']);
918
+
919
+ }
920
+
921
+ echo "<h2>Database populated...</h2>";
922
+
923
+
924
+ }
925
+
926
+ }
927
+
928
+ ###################################################################################
929
+
930
+ if($_REQUEST['do_database'] != 1) {
931
+
932
+ $vars = "";
933
+
934
+
935
+
936
+ foreach($_REQUEST as $key=>$value)
937
+
938
+ $vars .= $key.'='.@urlencode($value).'&';
939
+
940
+
941
+
942
+ $href = "XCloner.php?".$vars."do_database=1";
943
+
944
+
945
+
946
+ echo "<br /><a href='$href'>Please click here to continue with database import...</a>";
947
+
948
+
949
+
950
+ return ;
951
+
952
+ }
953
+
954
+ else{
955
+
956
+
957
+
958
+ echo "<br /><a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...<br /></a><br />";
959
+
960
+
961
+
962
+ return ;
963
+
964
+
965
+
966
+ }
967
+
968
+
969
+
970
+ }
971
+
972
+
973
+
974
+ function write_config($file){
975
+
976
+ if(@$fp = fopen($file, "r")){
977
+
978
+ $config_data = "";
979
+
980
+ while(!feof($fp))
981
+
982
+ $config_data .= fread($fp, 1024);
983
+
984
+ fclose($fp);
985
+
986
+ }
987
+
988
+ if ($_REQUEST[DBcreated] == 'on'){
989
+
990
+
991
+ $config_data = str_replace("define('DB_HOST', '", "define('DB_HOST', '".$_REQUEST[mysql_server]."');#", $config_data);
992
+ $config_data = str_replace("define('DB_USER', '", "define('DB_USER', '".$_REQUEST[mysql_username]."');#", $config_data);
993
+ $config_data = str_replace("define('DB_PASSWORD', '", "define('DB_PASSWORD', '".$_REQUEST[mysql_pass]."');#", $config_data);
994
+ $config_data = str_replace("define('DB_NAME', '", "define('DB_NAME', '".$_REQUEST[mysql_db]."');#", $config_data);
995
+ $liveurl = $_REQUEST[output_url_pref]."://".$_REQUEST[output_url];
996
+ $config_data = str_replace("define('DB_HOST", "define('WP_SITEURL','".$liveurl."');\ndefine('WP_HOME','".$liveurl."');\ndefine('RELOCATE',true);\ndefine('DB_HOST", $config_data);
997
+
998
+ $config_data = str_replace("define('WP_SITEURL', '", "define('WP_SITEURL', '".$liveurl."');#", $config_data);
999
+ $config_data = str_replace("define('WP_HOME', '", "define('WP_HOME', '".$liveurl."');#", $config_data);
1000
+
1001
+ }
1002
+
1003
+ if($_REQUEST['transfer_mode'] == 2){
1004
+
1005
+ $config_data = str_replace('$'.'ftp_host =',"$"."ftp_host ='".$_REQUEST[ftp_server]."';#", $config_data);
1006
+
1007
+ $config_data = str_replace('$'.'ftp_port =',"$"."ftp_port ='".$_REQUEST[ftp_port]."';#", $config_data);
1008
+
1009
+ $config_data = str_replace('$'.'ftp_user =',"$"."ftp_user ='".$_REQUEST[ftp_user]."';#", $config_data);
1010
+
1011
+ $config_data = str_replace('$'.'ftp_pass =',"$"."ftp_pass ='".$_REQUEST[ftp_pass]."';#", $config_data);
1012
+
1013
+ $config_data = str_replace('$'.'ftp_root =',"$"."ftp_root ='".$_REQUEST[ftp_path]."';#", $config_data);
1014
+
1015
+ }else{
1016
+
1017
+ $config_data = str_replace('$'.'ftp_enable =',"$"."ftp_enable ='0';#", $config_data);
1018
+
1019
+ }
1020
+
1021
+ $_REQUEST[output_url] = str_replace("/###","",$_REQUEST[output_url]."###");
1022
+
1023
+ $_REQUEST[output_url] = str_replace("###","",$_REQUEST[output_url]);
1024
+
1025
+
1026
+
1027
+ $config_data = str_replace('$'.'live_site =',"$"."live_site ='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."';#", $config_data);
1028
+
1029
+ $config_data = str_replace('$'.'absolute_path =',"$"."absolute_path ='".$_REQUEST[output_path]."';#", $config_data);
1030
+
1031
+
1032
+ if ($fp = fopen($file, "w")) {
1033
+
1034
+ fwrite( $fp, $config_data);
1035
+
1036
+ fclose( $fp );
1037
+
1038
+ } else {
1039
+
1040
+ return false;
1041
+
1042
+ } // if
1043
+
1044
+ return true;
1045
+
1046
+ }
1047
+
1048
+ function step1(){
1049
+
1050
+ global $_CONFIG;
1051
+
1052
+
1053
+ $ftarget = $_CONFIG[output_path]."/".$_REQUEST[ver];
1054
+
1055
+
1056
+ if($_REQUEST['refresh'] < 1)
1057
+
1058
+ if(!is_writable($_CONFIG[output_path])){
1059
+
1060
+ echo "<span class='error'>Directory ".$_CONFIG[output_path]." is not writeable or does not exists! Could not continue...</span>";
1061
+
1062
+ return ;
1063
+
1064
+ }
1065
+
1066
+
1067
+
1068
+ $ftarget = $_REQUEST[ver];
1069
+
1070
+
1071
+ if(!file_exists($ftarget))
1072
+
1073
+ {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>";exit;}
1074
+
1075
+ step2($ftarget);
1076
+
1077
+ return;
1078
+
1079
+ }
1080
+
1081
+
1082
+
1083
+ function start() {
1084
+
1085
+ global $_CONFIG,$pathinfo;
1086
+
1087
+
1088
+
1089
+ $pdir = str_replace($_CONFIG['script_name'], "", $_SERVER["SCRIPT_FILENAME"]);
1090
+
1091
+ $purl = $_SERVER['HTTP_HOST'].str_replace($_CONFIG['script_name'],"", $_SERVER['SCRIPT_NAME']);
1092
+
1093
+ ?>
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+ <input type=hidden name='task' value='step1'>
1100
+
1101
+ <table width='100%'>
1102
+
1103
+
1104
+
1105
+ <tr bgcolor='#dddddd'><td>
1106
+
1107
+ <b>Path configuration: <a href='XCloner.php?task=getinfo' onclick="window.open('XCloner.php?task=getinfo', 'getInfo', 'toolbar,width=550,height=400'); return false;">check PhpInfo</a></b>
1108
+ <br />
1109
+ <b style='color:red'>Security Note:</b> after restore <b>delete the XCloner.php</b> script from your server
1110
+ </td></tr>
1111
+
1112
+ <tr>
1113
+
1114
+ <td>
1115
+
1116
+ Install directory:<br />
1117
+
1118
+ <input type=text size=70 name='output_path' value='<?php echo str_replace("\\", "/", $pdir);?>'>
1119
+
1120
+ <br ><small>please enter the full server path to the install directory, must have writing permissions</small>
1121
+
1122
+ </td>
1123
+
1124
+ </tr>
1125
+
1126
+ <tr>
1127
+
1128
+ <td>
1129
+
1130
+ Install Url:<br />
1131
+
1132
+ <select name='output_url_pref'>
1133
+
1134
+ <option selected value='http'>http://</option>
1135
+
1136
+ <option value='https'>https://</option>
1137
+
1138
+ </select>
1139
+
1140
+ <input type=text size=60 name='output_url' value='<?php echo $purl?>'>
1141
+
1142
+ <br ><small>please enter the url of where Joomla will be accessible from, can be remote also if you use the ftp function below to other host</small>
1143
+
1144
+ </td>
1145
+
1146
+ </tr>
1147
+
1148
+
1149
+
1150
+ <tr><td>
1151
+
1152
+ <b>Choose clone archive to install:</b>
1153
+
1154
+ </td></tr>
1155
+
1156
+ <tr>
1157
+
1158
+ <td>
1159
+
1160
+ <?php
1161
+
1162
+ echo version_list('ver');
1163
+
1164
+ ?>
1165
+
1166
+ </td>
1167
+
1168
+ </tr>
1169
+
1170
+ <tr bgcolor='#dddddd'><td>
1171
+
1172
+ <b>Mysql configuration: </b> <br />
1173
+
1174
+ <input type=checkbox checked name='DBcreated'> <font color='red'>import mysql database</font>
1175
+
1176
+ <br />
1177
+
1178
+ <input type='checkbox' value='1' name='manual_sql' > incremental sql import (<small> recommended for large databases</small>)
1179
+
1180
+ <br />
1181
+ Character set of the file:
1182
+ <select name="charset_of_file">
1183
+
1184
+ <option value="" selected="selected">Default</option>
1185
+ <option value="big5" title="Big5 Traditional Chinese">big5</option>
1186
+ <option value="binary" title="Binary pseudo charset">binary</option>
1187
+ <option value="cp1250" title="Windows Central European">cp1250</option>
1188
+ <option value="cp932" title="SJIS for Windows Japanese">cp932</option>
1189
+ <option value="euckr" title="EUC-KR Korean">euckr</option>
1190
+
1191
+ <option value="gb2312" title="GB2312 Simplified Chinese">gb2312</option>
1192
+ <option value="gbk" title="GBK Simplified Chinese">gbk</option>
1193
+ <option value="latin1" title="cp1252 West European">latin1</option>
1194
+ <option value="latin2" title="ISO 8859-2 Central European">latin2</option>
1195
+ <option value="sjis" title="Shift-JIS Japanese">sjis</option>
1196
+ <option value="tis620" title="TIS620 Thai">tis620</option>
1197
+
1198
+ <option value="ucs2" title="UCS-2 Unicode">ucs2</option>
1199
+ <option value="ujis" title="EUC-JP Japanese">ujis</option>
1200
+ <option value="utf8" title="UTF-8 Unicode" >utf8</option>
1201
+ </select>
1202
+
1203
+ </td></tr>
1204
+
1205
+ <!--<tr bgcolor='#dddddd'>
1206
+
1207
+ <td>
1208
+
1209
+ <input type=checkbox name='use_mysqldump' value='1'> import with mysql server utility, path:
1210
+
1211
+ <input type=text size=40 name='mysqldump_path' value='mysql'> (<small>advanced users only</small>)
1212
+
1213
+ </td>
1214
+
1215
+ </tr>
1216
+
1217
+ -->
1218
+
1219
+ <tr><td>
1220
+
1221
+
1222
+
1223
+ <table width='100%'>
1224
+
1225
+
1226
+
1227
+ <tr>
1228
+
1229
+ <td width='120'>Mysql server:</td>
1230
+
1231
+ <td><input type=text size=40 name='mysql_server' value='localhost'></td>
1232
+
1233
+ <tr>
1234
+
1235
+ <td>Mysql username:</td>
1236
+
1237
+ <td><input type=text size=40 name='mysql_username' value=''></td>
1238
+
1239
+ </tr>
1240
+
1241
+ <tr>
1242
+
1243
+ <td>Mysql password:</td>
1244
+
1245
+ <td><input type=text size=40 name='mysql_pass' value=''></td>
1246
+
1247
+ </tr>
1248
+
1249
+ <tr>
1250
+
1251
+ <td>Mysql database:</td>
1252
+
1253
+ <td><input type=text size=40 name='mysql_db' value=''></td>
1254
+
1255
+ </tr>
1256
+
1257
+
1258
+
1259
+ <?php
1260
+
1261
+ $dir = "administrator/backups/";
1262
+
1263
+ $sql_files =array();
1264
+
1265
+
1266
+
1267
+ if(@is_dir($dir)){
1268
+
1269
+
1270
+
1271
+ if ($handle = @opendir($dir)) {
1272
+
1273
+
1274
+
1275
+ /* This is the correct way to loop over the directory. */
1276
+
1277
+ while (false !== ($file = @readdir($handle))) {
1278
+
1279
+
1280
+
1281
+ if(strstr($file, ".sql"))
1282
+
1283
+
1284
+
1285
+ $sql_files[] = $file;
1286
+
1287
+
1288
+
1289
+ }
1290
+
1291
+
1292
+
1293
+ @closedir($handle);
1294
+
1295
+ }
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+ if(sizeof($sql_files) > 0) {
1302
+
1303
+
1304
+
1305
+ $list = "";
1306
+
1307
+ for($i=0;$i<sizeof($sql_files);$i++){
1308
+
1309
+
1310
+
1311
+ $list .= "<option value='$sql_files[$i]'>$sql_files[$i]</option>";
1312
+
1313
+
1314
+
1315
+ }
1316
+
1317
+ echo "<tr>
1318
+
1319
+ <td>Import Mysql file:</td>
1320
+
1321
+ <td><select name='sql_setfile'><option value='database-sql.sql'>Default</option>$list</select></td>
1322
+
1323
+ </tr>";
1324
+
1325
+
1326
+
1327
+ }
1328
+
1329
+
1330
+
1331
+ }
1332
+
1333
+ ?>
1334
+
1335
+
1336
+
1337
+ </table>
1338
+
1339
+
1340
+
1341
+ </td>
1342
+
1343
+ </tr>
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+ <tr bgcolor='#dddddd'><td>
1350
+
1351
+ <b>Files transfer and configuration:</b><br />
1352
+
1353
+ <input type=checkbox name='files_skip' value='1' > <font color='red'>Skip files restore, will attempt to restore only database</font><br />
1354
+
1355
+ <input type=checkbox name='preserve_perm' value='1'> restore original files permissions<br />
1356
+
1357
+ <input type=checkbox name='file_utilities' value='1' > Restore by using the server utilities unzip/tar
1358
+
1359
+ </td></tr>
1360
+
1361
+
1362
+
1363
+ <tr><td colspan=2>
1364
+
1365
+ <table width='100%'>
1366
+
1367
+ <tr>
1368
+
1369
+ <td width='50%' valign='top'>
1370
+
1371
+
1372
+
1373
+ <table width='100%'>
1374
+
1375
+ <tr><td colspan='2'>
1376
+
1377
+ Install files throught ftp: <input type='checkbox' value='1' name='manual_ftp' checked> - incremental transfer
1378
+
1379
+ </td></tr>
1380
+
1381
+ <tr>
1382
+
1383
+ <td colspan='2'><input type=radio name=transfer_mode value=2 checked>
1384
+
1385
+ <br />
1386
+
1387
+ <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>
1388
+
1389
+ </td>
1390
+
1391
+ </tr>
1392
+
1393
+
1394
+
1395
+ <tr>
1396
+
1397
+ <td nowrap>Ftp server:</td>
1398
+
1399
+ <td><input type=text size=30 name='ftp_server' value='localhost'><br />
1400
+
1401
+ port: <input type=text size=5 name='ftp_port' value='21'></td>
1402
+
1403
+ </tr>
1404
+
1405
+ <tr>
1406
+
1407
+ <td>Ftp user:</td>
1408
+
1409
+ <td><input type=text size=30 name='ftp_user'></td>
1410
+
1411
+ </tr>
1412
+
1413
+ <tr>
1414
+
1415
+ <td>Ftp pass:</td>
1416
+
1417
+ <td><input type=text size=30 name='ftp_pass'></td>
1418
+
1419
+ </tr>
1420
+
1421
+ <tr>
1422
+
1423
+ <td>Ftp path:</td>
1424
+
1425
+ <td><input type=text size=30 name='ftp_path'>
1426
+
1427
+ <br><small>ftp root path of where Joomla will be installed</small>
1428
+
1429
+ </td>
1430
+
1431
+ </tr>
1432
+
1433
+ </table>
1434
+
1435
+
1436
+
1437
+ </td>
1438
+
1439
+ <td width='50%' valign=top>
1440
+
1441
+
1442
+
1443
+ <table width='100%'>
1444
+
1445
+ <tr><td>
1446
+
1447
+ Install files directly:
1448
+
1449
+ </td></tr>
1450
+
1451
+ <tr>
1452
+
1453
+ <td><input type=radio name=transfer_mode value=1>
1454
+
1455
+ <br />
1456
+
1457
+ <small>transfering the files directly will cause some permissions problem in some cases, but it's faster than the other option </small>
1458
+
1459
+ </td>
1460
+
1461
+ </tr>
1462
+
1463
+ </table>
1464
+
1465
+
1466
+
1467
+ </td>
1468
+
1469
+ </tr>
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+ </table>
1476
+
1477
+ </td></tr>
1478
+
1479
+ <tr><td>
1480
+
1481
+
1482
+
1483
+ </td></tr>
1484
+
1485
+
1486
+
1487
+ <tr><td colspan='2'>
1488
+
1489
+
1490
+
1491
+ <input type=submit name=submit value='Start install' >
1492
+
1493
+ <br /><small>*after hitting submit please wait for the package to get unarchived and transfered through ftp if it is the case!</small>
1494
+
1495
+
1496
+
1497
+ <br /><b>NOTE:*** IMPORTANT - if you plan to apply this script to a live site - upgrade or fresh install over existing files please
1498
+
1499
+ make sure you first make a backup of them! </b>
1500
+
1501
+ </td></tr>
1502
+
1503
+
1504
+
1505
+ </table>
1506
+
1507
+
1508
+
1509
+ <?php
1510
+
1511
+
1512
+
1513
+ }
1514
+
1515
+
1516
+
1517
+ function getPHPINFO(){
1518
+
1519
+
1520
+
1521
+ ?>
1522
+
1523
+ <table width='100%'>
1524
+
1525
+ <tr bgcolor='#dddddd'><td>
1526
+
1527
+ <b>Php Configuration: <a target='_blank' href='XCloner.php?task=info'> phpinfo()</a></b>
1528
+
1529
+ </td></tr>
1530
+
1531
+
1532
+
1533
+ <tr><td>
1534
+
1535
+ <table bgcolor='#dddddd' width='65%' style='font-size:10px; text-align:center;' border='1'>
1536
+
1537
+
1538
+
1539
+ <tr>
1540
+
1541
+ <td><b style='color:red'>PHP Setting</b></td>
1542
+
1543
+ <td><b style='color:orange'>Current Value</b></td>
1544
+
1545
+ <td><b style='color:green'>Recomemnded</b></td>
1546
+
1547
+ </tr>
1548
+
1549
+
1550
+
1551
+ <tr>
1552
+
1553
+ <td><b>Open_Basedir:</b> </td>
1554
+
1555
+ <td>
1556
+
1557
+ <?php echo (@ini_get('open_basedir') ? @ini_get('open_basedir') : 'No value')?>
1558
+
1559
+ </td>
1560
+
1561
+ <td><b>No Value</b></td>
1562
+
1563
+ </tr>
1564
+
1565
+
1566
+
1567
+ <tr>
1568
+
1569
+ <td><b>Max Execution Time:</b> </td>
1570
+
1571
+ <td>
1572
+
1573
+ <?php echo (@ini_get('max_execution_time') ? @ini_get('max_execution_time') : 'No value')?>
1574
+
1575
+ </td>
1576
+
1577
+ <td><b>>30</b></td>
1578
+
1579
+ </tr>
1580
+
1581
+
1582
+
1583
+ <tr>
1584
+
1585
+ <td><b>Safe mode:</b> </td>
1586
+
1587
+ <td>
1588
+
1589
+ <?php echo (@ini_get('safe_mode') ? @ini_get('safe_mode') : 'Off')?>
1590
+
1591
+ </td>
1592
+
1593
+ <td><b>Off</b></td>
1594
+
1595
+ </tr>
1596
+
1597
+
1598
+
1599
+ </table>
1600
+
1601
+ </td></tr>
1602
+
1603
+
1604
+
1605
+ </table>
1606
+
1607
+ <?php
1608
+ }
1609
+
1610
+
1611
+ ###END
1612
+
1613
+
1614
+ ###Starting the manual sql backup
1615
+
1616
+ function populate_db_manual( $db, $sqlfile='administrator/backups/database-sql.sql'){
1617
+
1618
+ global $qstr;
1619
+
1620
+ $extra_que = $qstr[0];
1621
+
1622
+ $file = $sqlfile;
1623
+
1624
+ define ('DATA_CHUNK_LENGTH',16384); // How many chars are read per time
1625
+
1626
+ define ('MAX_QUERY_LINES',300); // How many lines may be considered to be one query (except text lines)
1627
+
1628
+ $lines = "";
1629
+
1630
+ $error = "";
1631
+
1632
+ $error_status = 0;
1633
+
1634
+ if((isset($_REQUEST['chunk']))&&((int)$_REQUEST['chunk'] != 0))
1635
+
1636
+ $chunk = $_REQUEST['chunk'];
1637
+
1638
+ else
1639
+
1640
+ $chunk = DATA_CHUNK_LENGTH;
1641
+
1642
+ if($_REQUEST['correct_query'] != 1){
1643
+
1644
+ $start_pos = (int)$_REQUEST['fpos'];
1645
+
1646
+ $fpos = read_file($file, MAX_QUERY_LINES, $start_pos, $chunk, $lines);
1647
+
1648
+ }else{
1649
+
1650
+ $lines[0] = stripslashes($_REQUEST['error_msg']);
1651
+
1652
+ $fpos = $_REQUEST['start_posf'] ;
1653
+
1654
+ }
1655
+
1656
+ foreach($lines as $line)
1657
+
1658
+ if(trim($line) != ''){
1659
+
1660
+ $query = $line;
1661
+
1662
+ $line = $line .";\n";
1663
+
1664
+ #$tmp = explode("DEFAULT CHARSET",$line);
1665
+
1666
+ $line_tmp = $line;
1667
+
1668
+ $start_pos = $start_pos + strlen($line);
1669
+
1670
+ if(isset($_REQUEST['strrep']))
1671
+
1672
+ {
1673
+
1674
+ $strrep = explode("\r\n", stripslashes($_REQUEST['strrep']));
1675
+
1676
+ foreach($strrep as $value)
1677
+
1678
+ if(trim($value)!= ""){
1679
+
1680
+
1681
+ $tmp = explode("|", $value);
1682
+
1683
+
1684
+ $line_tmp = str_replace(trim($tmp[0]),trim($tmp[1]),$line_tmp);
1685
+
1686
+ $query = str_replace(trim($tmp[0]),trim($tmp[1]),$query);
1687
+
1688
+ }
1689
+
1690
+ }
1691
+
1692
+ if(!mysql_query($line_tmp)){
1693
+
1694
+ if($_REQUEST['correct_query'] != 1)
1695
+
1696
+ $fpos = $start_pos ;
1697
+
1698
+ $form_url = rurl($fpos, $chunk);
1699
+
1700
+ echo "</form><form name='' action='".$form_url."' method='POST'>
1701
+
1702
+ <input type='hidden' name='correct_query' value = '1'>
1703
+
1704
+ <input type='hidden' name='start_pos' value='".$start_pos."'>
1705
+
1706
+ <input type='hidden' name='start_posf' value='".$fpos."'>
1707
+
1708
+ <input type='hidden' name='glen' value='".$qlen."'>
1709
+
1710
+ <center>";
1711
+
1712
+ 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);
1713
+
1714
+ echo "<b>Search and replace in query:</b><br /><textarea cols=70 rows=5 name='strrep'>".stripslashes($_REQUEST[strrep])."</textarea><br />
1715
+
1716
+ <small>
1717
+
1718
+ 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>
1719
+
1720
+ </small>";
1721
+
1722
+ echo "<br /> <input type=submit name=submit value='Correct Query &gt;&gt;'>";
1723
+
1724
+ echo "</center></form>";
1725
+
1726
+ $error_status = 1;
1727
+
1728
+ break;
1729
+
1730
+ }
1731
+
1732
+ }
1733
+
1734
+
1735
+ $percent = sprintf("%.2f", (100*$fpos)/ filesize($file));
1736
+
1737
+ if($fpos!='-1'){
1738
+
1739
+ echo "<h3>Processed $percent% from sql backup!</h3>";
1740
+
1741
+ $red_url = rurl($fpos, $chunk);
1742
+
1743
+ if($error_status == 1 ){
1744
+
1745
+ echo "<h3><a href='".$red_url."'>To skip this query, click here to Continue</a></h3>";
1746
+
1747
+ exit;
1748
+
1749
+ }else{
1750
+
1751
+ echo "<h3><a href='".$red_url."'>Continue here</a></h3>";
1752
+
1753
+ echo "<script>window.location='".$red_url."'</script>";
1754
+
1755
+ exit;
1756
+
1757
+ }
1758
+
1759
+ } else {
1760
+
1761
+ echo "<h3>The sql import is finished!</h3>";
1762
+
1763
+ }
1764
+
1765
+ return;
1766
+
1767
+ }
1768
+
1769
+ ########END
1770
+
1771
+
1772
+
1773
+ ### STARTING THE AUTOMATIC BACKUP
1774
+
1775
+ function populate_db( $db, $sqlfile='administrator/backups/database-sql.sql') {
1776
+
1777
+ global $errors, $_CONFIG;
1778
+
1779
+
1780
+
1781
+ if($_REQUEST['use_mysqldump'] == 1){
1782
+
1783
+
1784
+
1785
+ echo shell_exec($_REQUEST['mysqldump_path']." -u ".$_REQUEST[mysql_username]." -p".$_REQUEST[mysql_pass]." -h ".$_REQUEST[mysql_server]." ".$_REQUEST[mysql_db]." < ".$sqlfile);
1786
+
1787
+ return;
1788
+
1789
+
1790
+
1791
+ }
1792
+
1793
+
1794
+
1795
+ $mqr = @get_magic_quotes_runtime();
1796
+
1797
+ @set_magic_quotes_runtime(0);
1798
+
1799
+ @chmod($sqlfile,0777);
1800
+
1801
+ $query = fread( fopen( $sqlfile, 'r' ), filesize( $sqlfile ) );
1802
+
1803
+ @set_magic_quotes_runtime($mqr);
1804
+
1805
+ $pieces = split_sql($query);
1806
+
1807
+
1808
+
1809
+ for ($i=0; $i<count($pieces); $i++) {
1810
+
1811
+ $pieces[$i] = trim($pieces[$i]);
1812
+
1813
+ $tmp = explode("DEFAULT CHARSET",$pieces[$i]);
1814
+
1815
+ $pieces[$i] = $tmp[0].";";
1816
+
1817
+ if(!empty($pieces[$i]) && $pieces[$i] != "#") {
1818
+
1819
+ if (!mysql_query($pieces[$i], $db)) {
1820
+
1821
+ $errors[] = "\n\n##Mysql Query: \n########\n".
1822
+
1823
+ $pieces[$i].
1824
+
1825
+ "\n########\n##Error message: ".
1826
+
1827
+ mysql_error();
1828
+
1829
+
1830
+
1831
+ }
1832
+
1833
+ }
1834
+
1835
+
1836
+
1837
+ }
1838
+
1839
+ return $errors;
1840
+
1841
+ }
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+ function rurl($fpos, $chunk){
1848
+
1849
+ $get_query = "&";
1850
+
1851
+ foreach($_GET as $key=>$value){
1852
+
1853
+ if(($key != 'fpos')&&($key != 'chunk')&&($key != 'strrep_c')&&($key != 'strrep'))
1854
+
1855
+ $get_query .= $key."=".$value."&";
1856
+
1857
+ }
1858
+
1859
+ $url = $_SERVER['PHP_SELF']."?fpos=".$fpos."&chunk=".$chunk.$get_query;
1860
+
1861
+ return $url;
1862
+
1863
+ }
1864
+
1865
+ function read_file($file, $lines, $start_pos, &$chunk, &$text)
1866
+
1867
+ {
1868
+
1869
+ $cline = 0;
1870
+
1871
+ $fp = fopen($file, "r");
1872
+
1873
+ fseek($fp, $start_pos);
1874
+
1875
+ while((!feof($fp)) &&($cline <= $lines)){
1876
+
1877
+ $btemp = fgets($fp, $chunk);
1878
+
1879
+ $buffer .= $btemp;
1880
+
1881
+ if(strstr($btemp, ";\n"))
1882
+
1883
+ $cline++;
1884
+
1885
+ $fpos = ftell($fp);
1886
+
1887
+ }
1888
+
1889
+ $buffer = str_replace(";\r", ";\n", $buffer);
1890
+
1891
+ $text = explode(";\n", $buffer);
1892
+
1893
+ $fpos = $fpos - strlen($text[sizeof($text)-1]);
1894
+
1895
+ if(sizeof($text) == 1)
1896
+
1897
+ $chunk = DATA_CHUNK_LENGTH+$chunk;
1898
+
1899
+ else
1900
+
1901
+ $chunk = DATA_CHUNK_LENGTH;
1902
+
1903
+ if(feof($fp))
1904
+
1905
+ $fpos = '-1';
1906
+
1907
+ fclose ($fp);
1908
+
1909
+ return $fpos; // array_reverse is optional: you can also just return the $text array which consists of the file's lines.
1910
+
1911
+ }
1912
+
1913
+
1914
+
1915
+ /**
1916
+
1917
+ * @param string
1918
+
1919
+ */
1920
+
1921
+ function split_sql($sql) {
1922
+
1923
+
1924
+
1925
+ $ret = array();
1926
+
1927
+ $sql = str_replace("\n) ", "\n) ;\n#\n#", $sql);
1928
+
1929
+ $sql = str_replace("\n--\n","\n#\n",$sql);
1930
+
1931
+ $sql = str_replace("\n-- ","\n# ",$sql);
1932
+
1933
+ $sql = str_replace("\n/*","\n#/*",$sql);
1934
+
1935
+ $sql = ereg_replace("#\n", "#;\n", $sql);
1936
+
1937
+
1938
+ // Processing the SQL file content
1939
+
1940
+ $file_content = explode("\n",$sql);
1941
+
1942
+ $query = "";
1943
+
1944
+ // Parsing the SQL file content
1945
+
1946
+ foreach($file_content as $key=>$sql_line)
1947
+
1948
+ {
1949
+
1950
+
1951
+
1952
+ if(substr($sql_line, 0, 2) == "--")
1953
+
1954
+ $sql_line = "#".substr($sql_line, 2, strlen($sql_line));
1955
+
1956
+
1957
+
1958
+ if(trim($sql_line) != "" )
1959
+
1960
+ {
1961
+
1962
+ $query .= $sql_line;
1963
+
1964
+ // Checking whether the line is a valid statement
1965
+
1966
+ if(preg_match("/(.*);/", $sql_line))
1967
+
1968
+ {
1969
+
1970
+ $query = substr($query, 0, strlen($query)-1);
1971
+
1972
+ //Executing the parsed string, returns the error code in failure
1973
+
1974
+ $ret[] = $query;
1975
+
1976
+ $query = "";
1977
+
1978
+ }
1979
+
1980
+ }
1981
+
1982
+ } //End of foreach
1983
+
1984
+ return($ret);
1985
+
1986
+ }
1987
+
1988
+
1989
+
1990
+ function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $mosConfig_absolute_path) {
1991
+
1992
+
1993
+
1994
+ $currentfullpath = $mosConfig_absolute_path.$path;
1995
+
1996
+ # Open possibly available directory
1997
+
1998
+ if( is_dir( $currentfullpath ) ) {
1999
+
2000
+ if( $handle = opendir( $currentfullpath ) ) {
2001
+
2002
+ while( false !== ( $file = readdir( $handle ) ) ) {
2003
+
2004
+ # Make sure we don't push parental directories or dotfiles (unix) into the arrays
2005
+
2006
+ if( $file != "." && $file != ".." ) {
2007
+
2008
+ if( is_dir( $currentfullpath . "/" . $file ) ) {
2009
+
2010
+ # Create array for directories
2011
+
2012
+ $d_arr[++$d] = $currentfullpath . "/" . $file;
2013
+
2014
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $mosConfig_absolute_path);
2015
+
2016
+ } else {
2017
+
2018
+ if ( in_array($currentfullpath, $includedFolders) ) {
2019
+
2020
+ # Create array for files
2021
+
2022
+ $s_arr[$f] = filesize($currentfullpath.'/'.$file);
2023
+
2024
+ $f_arr[$f++] = str_replace($mosConfig_absolute_path.'/', '', $currentfullpath.'/').$file;
2025
+
2026
+ $s += filesize($currentfullpath.'/'.$file);
2027
+
2028
+ }
2029
+
2030
+ }
2031
+
2032
+ }
2033
+
2034
+ }
2035
+
2036
+ }
2037
+
2038
+ # Wrap things up if we're in a directory
2039
+
2040
+ if( is_dir( $handle ) )
2041
+
2042
+ closedir( $handle );
2043
+
2044
+ }
2045
+
2046
+ }
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+ function version_list($fname) {
2053
+
2054
+ global $_CONFIG;
2055
+
2056
+
2057
+
2058
+ $return = "<select name='$fname'><option value=''>Choose local clone archive</option>";
2059
+
2060
+
2061
+
2062
+ if(is_array($_CONFIG[versions])){
2063
+
2064
+ foreach($_CONFIG[versions] as $key=>$value){
2065
+
2066
+ $size = sprintf("%.2fM", filesize($value)/(1024*1024));
2067
+
2068
+ $return .= "<option selected value='$value'>$value($size)</option>";
2069
+
2070
+
2071
+
2072
+ }
2073
+
2074
+ }
2075
+
2076
+ $return .= "</select>";
2077
+
2078
+
2079
+
2080
+ return $return;
2081
+
2082
+ }
2083
+
2084
+
2085
+ function recursive_remove_directory($directory, $empty=FALSE)
2086
+
2087
+ {
2088
+
2089
+ // if the path has a slash at the end we remove it here
2090
+
2091
+ if(substr($directory,-1) == '/')
2092
+
2093
+ {
2094
+
2095
+ $directory = substr($directory,0,-1);
2096
+
2097
+ }
2098
+
2099
+
2100
+
2101
+ // if the path is not valid or is not a directory ...
2102
+
2103
+ if(!file_exists($directory) || !is_dir($directory))
2104
+
2105
+ {
2106
+
2107
+ // ... we return false and exit the function
2108
+
2109
+ return FALSE;
2110
+
2111
+
2112
+
2113
+ // ... if the path is not readable
2114
+
2115
+ }elseif(!is_readable($directory))
2116
+
2117
+ {
2118
+
2119
+ // ... we return false and exit the function
2120
+
2121
+ return FALSE;
2122
+
2123
+
2124
+
2125
+ // ... else if the path is readable
2126
+
2127
+ }else{
2128
+
2129
+
2130
+
2131
+ // we open the directory
2132
+
2133
+ $handle = opendir($directory);
2134
+
2135
+
2136
+
2137
+ // and scan through the items inside
2138
+
2139
+ while (FALSE !== ($item = readdir($handle)))
2140
+
2141
+ {
2142
+
2143
+ // if the filepointer is not the current directory
2144
+
2145
+ // or the parent directory
2146
+
2147
+ if($item != '.' && $item != '..')
2148
+
2149
+ {
2150
+
2151
+ // we build the new path to delete
2152
+
2153
+ $path = $directory.'/'.$item;
2154
+
2155
+
2156
+
2157
+ // if the new path is a directory
2158
+
2159
+ if(is_dir($path))
2160
+
2161
+ {
2162
+
2163
+ // we call this function with the new path
2164
+
2165
+ recursive_remove_directory($path);
2166
+
2167
+
2168
+
2169
+ // if the new path is a file
2170
+
2171
+ }else{
2172
+
2173
+ // we remove the file
2174
+
2175
+ unlink($path);
2176
+
2177
+ }
2178
+
2179
+ }
2180
+
2181
+ }
2182
+
2183
+ // close the directory
2184
+
2185
+ closedir($handle);
2186
+
2187
+
2188
+
2189
+ // if the option to empty is not set to true
2190
+
2191
+ if($empty == FALSE)
2192
+
2193
+ {
2194
+
2195
+ // try to delete the now empty directory
2196
+
2197
+ if(!@rmdir($directory))
2198
+
2199
+ {
2200
+
2201
+ // return false if not possible
2202
+
2203
+ return FALSE;
2204
+
2205
+ }
2206
+
2207
+ }
2208
+
2209
+ // return success
2210
+
2211
+ return TRUE;
2212
+
2213
+ }
2214
+
2215
+ }
2216
+
2217
+
2218
+
2219
+ ?>
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
toolbar.cloner.html.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
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
+
19
+ echo "<td align='center' class=\"test\" onclick=\"document.adminForm.task.value='$action';document.adminForm.submit();\" onmouseover=\"this.className='test2'\" onmouseout=\"this.className='test'\">
20
+ <a href='#' onclick=\"document.adminForm.task.value='$action';document.adminForm.submit();\" ><b>$text</b></a>
21
+ </td>";
22
+
23
+ }
24
+
25
+ class TOOLBAR_cloner {
26
+
27
+ function _LOGIN() {
28
+ button('dologin','Login',false);
29
+ button('cancel','Cancel',false);
30
+ }
31
+ function _GENERATE() {
32
+ button('clone','Clone',false);
33
+ button('move','Move',false);
34
+ button('view','Back',false);
35
+ }
36
+ function _CONFIRM() {
37
+ button('generate','Continue',false);
38
+ button('cancel','Cancel',false);
39
+ }
40
+ function _CLONE() {
41
+ button('continue','Continue',false);
42
+ button('view','Cancel',false);
43
+ }
44
+ function _CONFIG() {
45
+ button('config', 'Save');
46
+ button('cancel', 'Cancel');
47
+ }
48
+
49
+ function _LANG_EDIT() {
50
+ button('save_lang_apply','Apply');
51
+ button('save_lang', 'Save');
52
+ button('cancel_lang', 'Cancel');
53
+ }
54
+
55
+ function _LANG_ADD() {
56
+ button('add_lang_new', 'New');
57
+ button('cancel_lang', 'Cancel');
58
+ }
59
+
60
+ function _LANG() {
61
+ button('add_lang','New');
62
+ button('edit_lang', 'Edit');
63
+ button('del_lang', 'Delete');
64
+ button('cancel','Cancel');
65
+ }
66
+
67
+ function _RENAME() {
68
+ button('rename_save', 'Save');
69
+ button('rename_cancel', 'Cancel');
70
+ }
71
+ function _VIEW() {
72
+ button('clone','Clone',true);
73
+ button('move','Move',true);
74
+ button('rename','Rename',true);
75
+ button('remove','Delete');
76
+ button('cancel','Cancel');
77
+ }
78
+ function _DEFAULT() {
79
+
80
+ button('logout','Logout');
81
+ button('cancel','Cancel');
82
+
83
+ }
84
+ }
85
+ ?>
toolbar.cloner.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * XCloner
4
+ * Oficial website: http://www.joomlaplug.com/
5
+ * -------------------------------------------
6
+ * Creator: Liuta Romulus Ovidiu
7
+ * License: All Rights Reserved
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
+ ?>
xcloner.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
6
+ Version: 2.1
7
+ Author: Liuta Ovidiu
8
+ Author URI: http://www.xcloner.com
9
+ */
10
+
11
+
12
+ // no direct access
13
+ #defined( '_JEXEC' ) or die( 'Restricted access' );
14
+
15
+ function xcloner_show(){
16
+
17
+ 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>";
18
+
19
+ }
20
+ function xcloner_install(){
21
+
22
+ }
23
+
24
+ function xcloner_page(){
25
+
26
+ if ( function_exists('add_submenu_page') )
27
+ add_submenu_page('plugins.php', XCloner, XCloner, 'manage_options', 'xcloner_show', 'xcloner_show');
28
+
29
+
30
+
31
+ }
32
+
33
+ #add_action('admin_head', 'xcloner');
34
+ add_action('admin_menu', 'xcloner_page');
35
+
36
+ #add_options_page('XCloner Options', 'XCloner', 9, 'index.php', 'xcloner_options');
37
+
38
+ if (isset($_GET['activate']) && $_GET['activate'] == 'true')
39
+ {
40
+ add_action('init', 'xcloner_install');
41
+ }
42
+
43
+ ?>
xcloner_j1.5.xml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <install type="component" version="1.5.0">
2
+ <name>XCloner</name>
3
+ <version>2.1.0</version>
4
+ <license>JoomlaPlug.com</license>
5
+ <author>JoomlaPlug.com</author>
6
+ <authoremail>admin@joomlaplug.com</authoremail>
7
+ <authorurl>http://www.joomlaplug.com</authorurl>
8
+ <creationDate>September 2007</creationDate>
9
+ <copyright>JoomlaPlug.com</copyright>
10
+ <description><![CDATA[
11
+ <a href="http://www.joomlaplug.com"><img src="http://www.joomlaplug.com/logo.gif" border=0></a><br/>
12
+ <h2>XCloner Backup&Restore Utility</h2>
13
+ <pre>XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured!
14
+
15
+ Features:
16
+ -cron script to generate backup
17
+ -multiple backup options
18
+ -restore tool to move the website rapidly to other locations
19
+ -multiple locations of where you could store the backup safelly
20
+ -comnpatible with both Joomla 1.0.x and 1.5.x
21
+
22
+ For reports and suggestions please contact us at admin@joomlaplug.com or visit us on <a href='http://www.joomlaplug.com'>http://www.joomlaplug.com</a>
23
+ </pre>
24
+ <br/><br/>
25
+
26
+ JoomaPlug.com &copy; 2006-2007 | <a href="http://www.joomlaplug.com">www.joomlaplug.com</a>
27
+ <br/><p/><br/>
28
+ ]]>
29
+ </description>
30
+ <installfile>install.xcloner.php</installfile>
31
+ <administration>
32
+ <menu>.XCloner</menu>
33
+ <files>
34
+ <filename>admin.xcloner.php</filename>
35
+ <filename>xcloner.php</filename>
36
+ <filename>administrator/index.html</filename>
37
+ <filename>administrator/backups/index.html</filename>
38
+ <filename>browser/file.gif</filename>
39
+ <filename>browser/filebrowser.css</filename>
40
+ <filename>browser/files_inpage.php</filename>
41
+ <filename>browser/files_xml.php</filename>
42
+ <filename>browser/folder.gif</filename>
43
+ <filename>browser/timer.gif</filename>
44
+ <filename>browser/xmlhttp.js</filename>
45
+ <filename>configs/index.html</filename>
46
+ <filename>css/dtree.css</filename>
47
+ <filename>css/main.css</filename>
48
+ <filename>css/tabber.css</filename>
49
+ <filename>images/about.png</filename>
50
+ <filename>images/actions.gif</filename>
51
+ <filename>images/actions.png</filename>
52
+ <filename>images/backup.png</filename>
53
+ <filename>images/css.png</filename>
54
+ <filename>images/editions.png</filename>
55
+ <filename>images/editionssm.png</filename>
56
+ <filename>images/empty.gif</filename>
57
+ <filename>images/filesave.png</filename>
58
+ <filename>images/folder.png</filename>
59
+ <filename>images/forum.png</filename>
60
+ <filename>images/gen_settings.png</filename>
61
+ <filename>images/help.png</filename>
62
+ <filename>images/helpsm.png</filename>
63
+ <filename>images/join.gif</filename>
64
+ <filename>images/joinbottom.gif</filename>
65
+ <filename>images/keep_icon.gif</filename>
66
+ <filename>images/lang.png</filename>
67
+ <filename>images/lhelp.png</filename>
68
+ <filename>images/line.gif</filename>
69
+ <filename>images/logo.gif</filename>
70
+ <filename>images/logo.png</filename>
71
+ <filename>images/xcloner.png</filename>
72
+ <filename>images/minus.gif</filename>
73
+ <filename>images/minusbottom.gif</filename>
74
+ <filename>images/nolines_minus.gif</filename>
75
+ <filename>images/nolines_plus.gif</filename>
76
+ <filename>images/page.gif</filename>
77
+ <filename>images/plus.gif</filename>
78
+ <filename>images/plusbottom.gif</filename>
79
+ <filename>images/publish_x.png</filename>
80
+ <filename>images/settings.png</filename>
81
+ <filename>images/support.png</filename>
82
+ <filename>images/templatessm.png</filename>
83
+ <filename>images/website.png</filename>
84
+ <filename>images/wizard.png</filename>
85
+ <filename>images/wizardsm.png</filename>
86
+ <filename>images/wizardsm_restore.gif</filename>
87
+ <filename>images/wizardsm_restore.png</filename>
88
+ <filename>javascript/dtree.js</filename>
89
+ <filename>javascript/tabber.js</filename>
90
+ <filename>language/english.php</filename>
91
+ <filename>language/index.html</filename>
92
+ <filename>restore/TAR.php</filename>
93
+ <filename>restore/XCloner.php</filename>
94
+ <filename>.cloner.config.php</filename>
95
+ <filename>admin.cloner.html.php</filename>
96
+ <filename>admin.cloner.php</filename>
97
+ <filename>cloner.config.php</filename>
98
+ <filename>cloner.cron.php</filename>
99
+ <filename>cloner.functions.php</filename>
100
+ <filename>common.php</filename>
101
+ <filename>index.php</filename>
102
+ <filename>index2.php</filename>
103
+ <filename>install.xcloner.php</filename>
104
+ <filename>license.txt</filename>
105
+ <filename>readme.txt</filename>
106
+ <filename>recursive.php</filename>
107
+ <filename>toolbar.cloner.html.php</filename>
108
+ <filename>toolbar.cloner.php</filename>
109
+
110
+
111
+ </files>
112
+ </administration>
113
+ </install>
114
+
115
+