XCloner – Backup and Restore - Version 2.2.1

Version Description

  • Added JSON AJAX interface to the Generate Backup process
  • Added incremental filesystem scan
  • several bug fixes
  • php >=5.2.0 version check
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.2.1

admin.cloner.html.php CHANGED
@@ -1,14 +1,24 @@
1
  <?php
2
- /**
3
- * XCloner
4
- * Oficial website: http://www.joomlaplug.com/
5
- * -------------------------------------------
6
- * Creator: Liuta Romulus Ovidiu
7
- * License: GNU/GPL
8
- * Email: admin@joomlaplug.com
9
- * Revision: 1.0
10
- * Date: July 2007
11
- **/
 
 
 
 
 
 
 
 
 
 
12
 
13
 
14
  /** ensure this file is being included by a parent file */
@@ -65,9 +75,13 @@ function header(){
65
  <link rel="stylesheet" href="css/tabber.css" TYPE="text/css" MEDIA="screen">
66
  <link rel="styleSheet" href="css/dtree.css" type="text/css" />
67
  <link rel="styleSheet" href="css/main.css" type="text/css" />
 
68
 
69
  <script type="text/javascript" src="javascript/tabber.js"></script>
70
  <script type="text/javascript" src="javascript/dtree.js"></script>
 
 
 
71
  <script type="text/javascript">
72
 
73
  /* Optional: Temporarily hide the "tabber" class so it does not "flash"
@@ -172,7 +186,6 @@ document.write(d);
172
  </td></td></table>
173
  <!-- END Ads -->
174
 
175
-
176
  </td><td valign='top' align='left' style="padding-left: 20px;">
177
 
178
 
@@ -197,7 +210,199 @@ function footer(){
197
 
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  function _FDefault(){
 
201
  ?>
202
 
203
  <form action="index2.php" method="post" name="adminForm">
@@ -259,6 +464,76 @@ function _FDefault(){
259
 
260
 
261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  </div>
263
  </td></tr>
264
  </table>
@@ -280,6 +555,7 @@ function Login(){
280
  <tr ><td colspan='2' align='center'><b>Authentification Area:</b></td></tr>
281
  <tr><td>Username:</td><td><input type='text' size='30' name='username'></td></tr>
282
  <tr><td>Password:</td><td><input type='password' size='30' name='password'></td></tr>
 
283
 
284
  <tr><td colspan='2'><?php echo LM_LOGIN_TEXT;?></td></tr>
285
 
@@ -291,9 +567,9 @@ function Login(){
291
  </table>
292
 
293
  <input type="hidden" name="option" value="com_cloner" />
294
- <input type="hidden" name="task" value="lang" />
295
- <input type="hidden" name="boxchecked" value="0" />
296
- <input type="hidden" name="hidemainmenu" value="0" />
297
 
298
  </form>
299
  </center>
@@ -941,6 +1217,26 @@ function showBackups( &$files, &$sizes, $path, $option ) {
941
  </td>
942
  </tr>
943
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
944
  </table>
945
  <?php
946
  $tabs->endTab();
@@ -1289,6 +1585,22 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1289
  </tr>
1290
 
1291
  <tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1292
  <td width='200'>
1293
  <?php echo LM_CONFIG_INFO_T_SAFEMODE?>
1294
  </td>
1
  <?php
2
+ /*
3
+ * admin.cloner.html.php
4
+ *
5
+ * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ * MA 02110-1301, USA.
21
+ */
22
 
23
 
24
  /** ensure this file is being included by a parent file */
75
  <link rel="stylesheet" href="css/tabber.css" TYPE="text/css" MEDIA="screen">
76
  <link rel="styleSheet" href="css/dtree.css" type="text/css" />
77
  <link rel="styleSheet" href="css/main.css" type="text/css" />
78
+ <link rel="styleSheet" href="css/jquery-ui.css" type="text/css" />
79
 
80
  <script type="text/javascript" src="javascript/tabber.js"></script>
81
  <script type="text/javascript" src="javascript/dtree.js"></script>
82
+ <script type="text/javascript" src="javascript/main.js"></script>
83
+ <script type="text/javascript" src="javascript/jquery-1.4.4.min.js"></script>
84
+ <script type="text/javascript" src="javascript/jquery-ui.min.js"></script>
85
  <script type="text/javascript">
86
 
87
  /* Optional: Temporarily hide the "tabber" class so it does not "flash"
186
  </td></td></table>
187
  <!-- END Ads -->
188
 
 
189
  </td><td valign='top' align='left' style="padding-left: 20px;">
190
 
191
 
210
 
211
  }
212
 
213
+ function goRefreshHtml($filename, $perm_lines, $excl_manual){
214
+
215
+ global $_CONFIG;
216
+
217
+ $f = pathinfo($filename);
218
+ $backupFile = $f['basename'];
219
+
220
+ if (file_exists($filename)) {
221
+ echo "Backup <strong>$filename</strong> created, we may continue!<br />";
222
+ //echo "Database backup: ".$databaseResult ."<br />";
223
+ $urlReturn = "index2.php?option=com_cloner&lines=" . $perm_lines . "&task=refresh&backup=$backupFile&excl_manual=$excl_manual";
224
+
225
+ if(!$_CONFIG['refresh_mode']){
226
+
227
+ echo "<a href=\"".$urlReturn."\" id='cLink'>Please click here to continue!</a>";
228
+ echo " <strong id='countdown'>5</strong>";
229
+ echo "<script type='text/javascript'>cLink_load();</script>";
230
+
231
+ }else{
232
+
233
+ ?>
234
+ <!--Start ProgressBar-->
235
+ <script type="text/javascript">
236
+
237
+ $(document).ready(function() {
238
+
239
+ var globalUrl;
240
+ var step = "r1";
241
+
242
+ $("#progressbar").progressbar({ value: 0 });
243
+
244
+ $.ajaxSetup({
245
+ "error":function(request, status, error) {
246
+ //reset state here;
247
+ $("#error").show();
248
+ $("#errorText").append(status+" -- "+error);
249
+ }});
250
+
251
+ function xclonerRecurseJSON(url){
252
+
253
+ $("#result").hide();
254
+
255
+ globalUrl = url;
256
+ step = "r1";
257
+
258
+ $.getJSON(url, function(json) {
259
+
260
+ if(!json){
261
+ $("#error").show();
262
+ $("#errorText").text(url);
263
+ }
264
+
265
+ if(!parseInt(json.finished)){
266
+
267
+ $("#recurseStatus").text(json.tfiles);
268
+
269
+ var recurseUrl = "index2.php?task=recurse_files&mode="+json.mode+"&nohtml=1";
270
+ xclonerRecurseJSON(recurseUrl);
271
+
272
+ }
273
+ else{
274
+ var size = parseFloat(json.size)/(1024*1024);
275
+ $("#recurseStatus").text(" done! (Estimated size:"+size.toFixed(2)+"MB)");
276
+ $("#result").show();
277
+ //xclonerGetJSON("<?php echo $urlReturn;?>");
278
+ returnUrl = "index2.php?option=com_cloner&lines="+json.tfiles+"&task=refresh&backup=<?php echo $backupFile; ?>&excl_manual=";
279
+ xclonerGetJSON(returnUrl);
280
+
281
+ }
282
+
283
+
284
+ });
285
+ }
286
+
287
+ function xclonerGetJSON(url){
288
+
289
+ globalUrl = url;
290
+ step = "r2";
291
+
292
+ $.getJSON(url, function(json) {
293
+
294
+ if(!json){
295
+ $("#error").show();
296
+ $("#errorText").append(url);
297
+ }
298
+
299
+ var percent = parseInt(json.percent);
300
+ $("#progressbar").progressbar({ value: percent });
301
+ $("#backupSize").text(json.backupSize);
302
+ $("#nFiles").text(json.startf);
303
+ $("#percent").text(json.percent);
304
+ if(!json.finished){
305
+ var url = "index2.php?option="+json.option+"&task="+json.task+"&json="+json.json+"&startf="+json.startf+"&lines="+json.lines+"&backup="+json.backup+"&excl_manual="+json.excl_manual;
306
+ xclonerGetJSON(url);
307
+ }else{
308
+
309
+ $("#complete").show();
310
+ $("#nFiles").text(json.lines);
311
+
312
+ }
313
+
314
+ });
315
+
316
+ }
317
+
318
+ $("#retry").click(function(){
319
+ $("#error").hide();
320
+ $("#errorText").empty();
321
+ if(step == "r1"){
322
+ xclonerRecurseJSON(globalUrl);
323
+ }
324
+ else if(step == "r2"){
325
+ xclonerGetJSON(globalUrl);
326
+ }
327
+ });
328
+
329
+ var recurseUrl="index2.php?task=recurse_files&mode=start&nohtml=1";
330
+ xclonerRecurseJSON(recurseUrl);
331
+ //xclonerGetJSON("<?php echo $urlReturn;?>");
332
+
333
+
334
+ });
335
+ </script>
336
+
337
+ <div id="recurseFiles">
338
+ <br /><strong>Scanning files system...</strong> <span id="recurseStatus"></span>
339
+ </div>
340
+
341
+ <div id="result">
342
+ <br /> <strong>Processing Files:</strong> <span id="percent">0</span>% (<span id="nFiles"></span> files)
343
+ <br /><br /> <strong>Backup Size: </strong><span id="backupSize"></span>
344
+ <br /><br /> <div id="progressbar"></div>
345
+ </div>
346
+
347
+ <div id="complete">
348
+ <br /><h2>Backup completed!</h2>
349
+
350
+ <form action="index2.php" name="adminForm" method="post">
351
+ <input type=hidden name=files[1] value='<?php echo $backupFile?>'>
352
+ <input type=hidden name=cid[1] value='<?php echo $backupFile?>'>
353
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
354
+ <input type="hidden" name="task" value=""/>
355
+ </form>
356
+
357
+ </div>
358
+
359
+ <div id="error" style="display:none;">
360
+ <br /><h2 style="color:Red"><?php echo LM_REFRESH_ERROR;?></h2>
361
+ <br /><b>Details:</b> <span id="errorText"></span>
362
+ <br /><br />
363
+ <a href="#" id="retry"><h3>Click to Retry >></h3></a>
364
+
365
+ </div>
366
+
367
+ <!-- End ProgressBar -->
368
+
369
+ <?php
370
+
371
+ }
372
+ return;
373
+ } else {
374
+ E_print("Backup failed, please check your tar server utility support!");
375
+ return;
376
+ }
377
+
378
+ }
379
+
380
+ function path_check($path){
381
+
382
+ if(!is_dir($path)){
383
+ $stat['code'] = 1;
384
+ $stat['message'] = "Invalid directory";
385
+ return $stat;
386
+ }
387
+
388
+ if(!is_readable($path)){
389
+ $stat['code'] = 2;
390
+ $stat['message'] = "Directory is not readable";
391
+ return $stat;
392
+ }
393
+
394
+ if(!is_writeable($path)){
395
+ $stat['code'] = 3;
396
+ $stat['message'] = "Directory not writeable";
397
+ return $stat;
398
+ }
399
+
400
+ return 0;
401
+
402
+ }
403
+
404
  function _FDefault(){
405
+ global $_CONFIG;
406
  ?>
407
 
408
  <form action="index2.php" method="post" name="adminForm">
464
 
465
 
466
 
467
+ </div>
468
+ </td></tr>
469
+ <tr><td>
470
+
471
+ <?php
472
+ $error = 0;
473
+ ?>
474
+
475
+ <div class="statusCheck">
476
+
477
+ <div class="status">
478
+ <span class="mtext">Backup Start Path Check: </span>
479
+ <?php
480
+
481
+ $stat = HTML_cloner::path_check($_CONFIG[backup_start_path]);
482
+
483
+ if( $stat['code'] > 0 and $stat['code'] < 3){
484
+ echo "<span class='error'>".$stat['message']; $error = 1;
485
+ }
486
+ else{
487
+ echo "<span class='success'>OK";
488
+ }
489
+ echo " ($_CONFIG[backup_start_path])";
490
+ ?>
491
+ </span></div>
492
+ <div class="status">
493
+ <span class="mtext">Backup Store Path Check: </span>
494
+ <?php
495
+
496
+ $stat = HTML_cloner::path_check($_CONFIG[backup_store_path]);
497
+
498
+ if( $stat['code'] > 0){
499
+ echo "<span class='error'>".$stat['message']; $error = 1;
500
+ }
501
+ else{
502
+ echo "<span class='success'>OK";
503
+ }
504
+ echo " ($_CONFIG[backup_store_path])";
505
+ ?>
506
+ </span></div>
507
+ <div class="status">
508
+ <span class="mtext">Temporary Path Check: </span>
509
+ <?php
510
+
511
+ $stat = HTML_cloner::path_check($_CONFIG[temp_dir]);
512
+
513
+ if( $stat['code'] > 0){
514
+ echo "<span class='error'>".$stat['message']; $error = 1;
515
+ }
516
+ else{
517
+ echo "<span class='success'>OK";
518
+ }
519
+ echo " ($_CONFIG[temp_dir])";
520
+ ?>
521
+ </span></div>
522
+
523
+ <div class="status">
524
+ <span class="mtext">Backup Ready: </span>
525
+ <?php
526
+
527
+ if($error ){
528
+ echo "<span class='error'>NO"; $error = 1;
529
+ }
530
+ else{
531
+ echo "<span class='success'>YES";
532
+ }
533
+
534
+ ?>
535
+ </span></div>
536
+
537
  </div>
538
  </td></tr>
539
  </table>
555
  <tr ><td colspan='2' align='center'><b>Authentification Area:</b></td></tr>
556
  <tr><td>Username:</td><td><input type='text' size='30' name='username'></td></tr>
557
  <tr><td>Password:</td><td><input type='password' size='30' name='password'></td></tr>
558
+ <tr><td></td><td><input type="submit" value='Login' name="login"> <input type="reset" value='Cancel'></td></tr>
559
 
560
  <tr><td colspan='2'><?php echo LM_LOGIN_TEXT;?></td></tr>
561
 
567
  </table>
568
 
569
  <input type="hidden" name="option" value="com_cloner" />
570
+ <input type="hidden" name="task" value="dologin" />
571
+ <input type="hidden" name="boxchecked" value="0" />
572
+ <input type="hidden" name="hidemainmenu" value="0" />
573
 
574
  </form>
575
  </center>
1217
  </td>
1218
  </tr>
1219
 
1220
+ <tr>
1221
+ <td>
1222
+ <?php echo LM_REFRESH_MODE?>
1223
+ </td>
1224
+ <td>
1225
+ Normal <input type=radio size=50 value=0 name='refresh_mode' <?php if($_CONFIG[refresh_mode]==0) echo 'checked';?>>
1226
+ AJAX <input type=radio size=50 value=1 name='refresh_mode' <?php if($_CONFIG[refresh_mode]==1) echo 'checked';?>>
1227
+ </td>
1228
+ </tr>
1229
+
1230
+ <tr>
1231
+ <td>
1232
+ <?php echo LM_DEBUG_MODE?>
1233
+ </td>
1234
+ <td>
1235
+ No <input type=radio size=50 value=0 name='debug' <?php if($_CONFIG[debug]==0) echo 'checked';?>>
1236
+ Yes <input type=radio size=50 value=1 name='debug' <?php if($_CONFIG[debug]==1) echo 'checked';?>>
1237
+ </td>
1238
+ </tr>
1239
+
1240
  </table>
1241
  <?php
1242
  $tabs->endTab();
1585
  </tr>
1586
 
1587
  <tr>
1588
+ <td width='200'>
1589
+ <?php echo LM_CONFIG_INFO_T_VERSION?>
1590
+ </td>
1591
+ <td>
1592
+ <b><?php
1593
+ $version = phpversion();
1594
+ $ver = str_replace(".", "", $version);
1595
+ $val = ($ver < 520)? $version: "Off";
1596
+ echo HTML_cloner::get_color($version, $val);
1597
+ ?></b>
1598
+ <br />
1599
+ <?php echo LM_CONFIG_INFO_VERSION?>
1600
+ </td>
1601
+ </tr>
1602
+
1603
+ <tr>
1604
  <td width='200'>
1605
  <?php echo LM_CONFIG_INFO_T_SAFEMODE?>
1606
  </td>
admin.cloner.php CHANGED
@@ -1,191 +1,202 @@
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
  ?>
1
  <?php
2
+ /*
3
+ * admin.cloner.php
4
+ *
5
+ * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ * MA 02110-1301, USA.
21
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
+
24
+ session_start();
25
+ @set_time_limit("3600");
26
+ @error_reporting(E_ALL ^ E_NOTICE);
27
+
28
+ define("_VALID_MOS", 1);
29
+
30
+ //load configuration
31
+ $config_file = "cloner.config.php";
32
+ require_once($config_file);
33
+ require_once("restore/TAR.php");
34
+ require_once("cloner.functions.php");
35
+ require_once("admin.cloner.html.php");
36
+ require_once("common.php");
37
+
38
+
39
+ //Doing some basic authentification
40
+ if ((!isset($_SESSION['clone'])) && ($task != 'dologin')) {
41
+ $task = 'login';
42
+
43
+ HTML_cloner::header();
44
+
45
+ HTML_cloner::Login();
46
+
47
+ HTML_cloner::footer();
48
+
49
+ exit;
50
+ } elseif ($task == 'dologin') {
51
+ if (($_REQUEST['username'] == $_CONFIG['jcuser']) && (md5($_REQUEST['password']) == $_CONFIG['jcpass'])) {
52
+ if (function_exists('session_register')) {
53
+ @session_register('clone');
54
+ }
55
+ $_SESSION['clone'] = 1;
56
+
57
+ mosRedirect('index2.php?option=' . $option, "Welcome to XCloner backend");
58
+ } else {
59
+
60
+
61
+ mosRedirect('index2.php?option=' . $option, "Incorrect username and/or password");
62
+ }
63
+ }
64
+
65
+
66
+
67
+ //###########GLOBALS in effect
68
+ $GLOBALS['lang_dir'] = $lang_dir;
69
+ //###########
70
+ $lang_array = get_avalaible_langs();
71
+
72
+
73
+ // retrieve row selection from forms
74
+ $cid = $_REQUEST['cid'];
75
+ if (!is_array($cid)) {
76
+ $cid = array(0);
77
+ }
78
+
79
+ if(!$_REQUEST['nohtml'])
80
+ if (($task != 'download') and (($_REQUEST['task']!="refresh") or (!$_CONFIG['refresh_mode'])))
81
+ HTML_cloner::header();
82
+
83
+
84
+ //########## SETTING THE GLOBALS VARIABLES #########################
85
+
86
+ $GLOBALS['joomla_compatible'] = $joomla_compatible;
87
+
88
+ $GLOBALS['_CONFIG'] = $_CONFIG;
89
+
90
+ $GLOBALS['clonerPath'] = $clonerPath;
91
+
92
+ $GLOBALS['baDownloadPath'] = $baDownloadPath;
93
+
94
+ $GLOBALS['config_file'] = $config_file;
95
+
96
+ $GLOBALS['lang_array'] = $lang_array;
97
+
98
+ openXLog();
99
+
100
+ // process the workflow selection
101
+ switch ($task) {
102
+ case 'rename_save':
103
+ case 'rename':
104
+ clone_rename($option);
105
+ break;
106
+ case 'action':
107
+ action($option);
108
+ break;
109
+
110
+
111
+ case 'cancel_lang':
112
+ mosRedirect('index2.php?option=' . $option . "&task=lang");
113
+ break;
114
+ case 'add_lang':
115
+ case 'add_lang_new':
116
+ translator_add($option, $task);
117
+ break;
118
+ case 'save_lang_apply':
119
+ case 'save_lang':
120
+ case 'edit_lang':
121
+ translator_edit($option, $task);
122
+ break;
123
+
124
+
125
+ case 'del_lang':
126
+ case 'lang':
127
+ translator($option);
128
+ break;
129
+
130
+ case 'recurse_files':
131
+ goRecurseFiles();
132
+ break;
133
+
134
+ case 'refresh':
135
+ generateBackuprefresh($cid, $option, $_REQUEST['backup'], $_CONFIG['refresh_mode']);
136
+ break;
137
+
138
+ case 'generate':
139
+ generateBackup($cid, $option);
140
+ break;
141
+
142
+ case 'confirm':
143
+ deleteXLog();
144
+ confirmBackup($option);
145
+ break;
146
+ case 'download':
147
+ downloadBackup($_REQUEST[file]);
148
+ break;
149
+ case 'cron':
150
+ HTML_cloner::Cron();
151
+ break;
152
+ case 'about':
153
+ case 'credits':
154
+ showHelp($option);
155
+ break;
156
+ case 'restore':
157
+ HTML_cloner::Restore($option);
158
+ break;
159
+
160
+ case 'cron_delete':
161
+ if (unlink($_CONFIG['multiple_config_dir'] . "/" . $_REQUEST['fconfig']))
162
+ $msg = " was deleted";
163
+ else
164
+ $msg = " was not deleted, please delete it manually!";
165
+
166
+ mosRedirect('index2.php?option=' . $option . "&task=config", $_REQUEST['fconfig'] . $msg);
167
+ break;
168
+
169
+ case 'remove':
170
+ deleteBackups($cid, $option);
171
+ break;
172
+ case 'continue':
173
+ case 'move':
174
+ case 'clone':
175
+ moveBackup($option);
176
+ break;
177
+
178
+ case 'cancel':
179
+ mosRedirect('index2.php?option=' . $option);
180
+ break;
181
+ case 'config':
182
+ config($option);
183
+ break;
184
+ case 'rename_cancel':
185
+ mosRedirect('index2.php?option=' . $option . "&task=view");
186
+ break;
187
+ case 'show':
188
+ case 'view':
189
+ showBackups($option);
190
+ break;
191
+ case 'logout':
192
+ doLogout();
193
+ break;
194
+ default:
195
+ fdefault();
196
+ break;
197
+ }
198
+
199
+ closeXLog();
200
+
201
+ HTML_cloner::footer();
202
  ?>
classes/fileRecursion.php ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * fileRecursion.php
4
+ *
5
+ * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ * MA 02110-1301, USA.
21
+ */
22
+
23
+
24
+ class fileRecursion{
25
+
26
+ public static $debug = 0;
27
+
28
+ private static $fp;
29
+ private static $fpd;
30
+ private static $d_arr;
31
+ private static $f_arr;
32
+ private static $BACKUP_EXTENSIONS = array("tar", "zip", "tgz", "tar.gz");
33
+ private static $INCL_EXTENSIONS = array("sql", "txt");
34
+
35
+ public static $excludeList = array();
36
+ public static $count;
37
+ public static $TEMP_PERM = ".excl";
38
+ public static $TEMP_D_ARR = "tmp/.dir";
39
+ public static $TEMP_EXCL = "tmp/.excl";
40
+ public static $TEMP_DIR = "/opt/lampp/htdocs/joomla/administrator/backups"; //exclude other backups
41
+ public static $START_DIR = "/"; # Backups Start Dir
42
+
43
+
44
+
45
+ public static function setData($TEMP_PERM,$TEMP_EXCL,$TEMP_D_ARR,$TEMP_DIR, $START_DIR) {
46
+
47
+ self::$TEMP_PERM = $TEMP_PERM;
48
+ self::$TEMP_EXCL = $TEMP_EXCL;
49
+ self::$TEMP_D_ARR = $TEMP_D_ARR;
50
+ self::$TEMP_DIR = $TEMP_DIR;
51
+ self::$START_DIR = $START_DIR;
52
+ }
53
+ /*
54
+ * Init the recursion system
55
+ * name: init
56
+ * @param string $startDir Initial directory
57
+ * @return
58
+ */
59
+ public static function init($startDir = ""){
60
+
61
+ ///if(self::$init)
62
+ //@unlink(PERM);
63
+
64
+ if($startDir != ""){
65
+ self::debug("Starting fresh, deleting ". self::$TEMP_PERM);
66
+ @unlink(self::$TEMP_PERM);
67
+ self::$d_arr[] = $startDir;
68
+ }
69
+ else{
70
+ self::debug("Starting a new queue ". self::$TEMP_D_ARR);
71
+ self::debug("Opened directory $dir");
72
+ self::$d_arr = array_filter(explode("\n", file_get_contents(self::$TEMP_D_ARR)));
73
+ }
74
+
75
+ self::$fp = fopen(self::$TEMP_PERM, "a");
76
+ self::$fpd = fopen(self::$TEMP_D_ARR, "w");
77
+
78
+ self::initEXCL();
79
+
80
+ if($startDir != ""){
81
+ $inclFiles = self::getInclFiles();
82
+ self::writePermFiles($inclFiles, "F", 1);
83
+ }
84
+
85
+ }
86
+
87
+ /*
88
+ * Count the number of files saved in TEMP_PERM
89
+ * name: countPermFiles
90
+ * @param
91
+ * @return array $return($num, $size) (number of files saved, size of total files)
92
+ */
93
+ public static function countPermFiles(){
94
+
95
+ $handle = fopen(self::$TEMP_PERM, "r");
96
+ $return['count'] = 0;
97
+ $return['size'] = 0;
98
+
99
+ while (($buffer = fgets($handle, 4096)) !== false) {
100
+
101
+ $return['count']++;
102
+
103
+ $data = @explode("|", str_replace("\n", "", $buffer));
104
+ //if($data[3] == 'F')
105
+ $return['size'] = $return['size'] + $data[2];
106
+ }
107
+ fclose($handle);
108
+
109
+ return $return;
110
+
111
+ }
112
+
113
+ /*
114
+ * Return the backup files from TEMP_DIR
115
+ * name: getBackupFiles
116
+ * @param
117
+ * @return array $backupFiles files list
118
+ */
119
+ public static function getBackupFiles(){
120
+
121
+ $files = scandir(self::$TEMP_DIR);
122
+ $backupFiles = array();
123
+
124
+ foreach($files as $file){
125
+ $info = pathinfo(self::$TEMP_DIR."/".$file);
126
+
127
+ if(in_array($info['extension'], self::$BACKUP_EXTENSIONS)){
128
+ //self::debug("Found previous files: ".$info['basename']);
129
+ $backupFiles[sizeof($backupFiles)] = $info['dirname']."/".$info['basename'];
130
+ }
131
+ }
132
+
133
+ self::debug("Found previous backup: ".implode(".",$backupFiles));
134
+ return $backupFiles;
135
+
136
+ }
137
+
138
+ /*
139
+ * Return the force include files from TEMP_DIR
140
+ * name: getInclFiles
141
+ * @param
142
+ * @return array $backupFiles files list
143
+ */
144
+ public static function getInclFiles(){
145
+
146
+ self::debug("Reading the ".self::$TEMP_DIR ." for inclusion files");
147
+ if(self::isNotExcluded(self::$TEMP_DIR))
148
+ return;
149
+
150
+ $files = scandir(self::$TEMP_DIR);
151
+ $backupFiles = array();
152
+
153
+ foreach($files as $file){
154
+ $info = pathinfo(self::$TEMP_DIR."/".$file);
155
+
156
+ if(in_array($info['extension'], self::$INCL_EXTENSIONS)){
157
+ self::debug("Found previous files: ".$info['basename']);
158
+ $backupFiles[sizeof($backupFiles)] = $info['dirname']."/".$info['basename'];
159
+ }
160
+ }
161
+
162
+ self::debug("Found previous backup: ".implode(".",$backupFiles));
163
+ return $backupFiles;
164
+
165
+ }
166
+
167
+ /*
168
+ * Initialize the excluded file list
169
+ * name: initEXCL
170
+ * @param
171
+ * @return
172
+ */
173
+ public static function initEXCL(){
174
+
175
+ //adding files from the TEMP_EXCL file
176
+ if(file_exists(self::$TEMP_EXCL))
177
+ self::$excludeList = array_filter(explode("\n", file_get_contents(self::$TEMP_EXCL)));
178
+
179
+ //excluding existing backup archives
180
+ $excludeBackupFiles = self::getBackupFiles();
181
+ foreach($excludeBackupFiles as $file){
182
+ self::$excludeList[sizeof(self::$excludeList)] = $file;
183
+ }
184
+ //self::debug(self::$TEMP_EXCL);
185
+ self::debug("Excluded list:".implode("\n", self::$excludeList));
186
+
187
+ }
188
+
189
+ /*
190
+ * Check if we processed the full directory
191
+ * name: isQueueFinished
192
+ * @param
193
+ * @return
194
+ */
195
+ public static function isQueueFinished(){
196
+
197
+ $return = true;
198
+
199
+ if(sizeof(self::$d_arr) != 0){
200
+ $return = false;
201
+ }
202
+
203
+ return $return;
204
+
205
+ }
206
+
207
+ /*
208
+ * End recursion file system
209
+ * name: end
210
+ * @param
211
+ * @return
212
+ */
213
+ public static function end(){
214
+
215
+ fclose(self::$fp);
216
+ fclose(self::$fpd);
217
+
218
+ self::debug("All done, existing... ");
219
+
220
+ }
221
+
222
+ /*
223
+ * Send debug messages
224
+ *
225
+ * name: debug
226
+ * @param string $message
227
+ * @return
228
+ */
229
+ public static function debug($message, $force=0){
230
+
231
+ if((self::$debug) || ($force)){
232
+ print($message."<br />\n");
233
+ }
234
+
235
+ return;
236
+
237
+ }
238
+
239
+ /*
240
+ * Start the recursion
241
+ *
242
+ * name: start
243
+ * @param
244
+ * @return
245
+ */
246
+ public static function start(){
247
+
248
+ self::debug("Start ");
249
+ foreach(self::$d_arr as $key=>$startdir)
250
+ if($startdir != ""){
251
+
252
+ self::debug("Processing ". $startdir);
253
+
254
+ unset(self::$d_arr[$key]);
255
+
256
+ if(self::isNotExcluded($startdir)){
257
+ self::writePermFile($startdir, "D");
258
+ self::$count++;
259
+ self::getDirectories($startdir);
260
+ }else{
261
+
262
+ self::debug("$startdir excluded");
263
+ }
264
+
265
+ }
266
+
267
+ self::$d_arr = array_filter(self::$d_arr);
268
+ if(sizeof(self::$d_arr) != 0){
269
+
270
+ $data = implode("\n", self::$d_arr);
271
+ fwrite(self::$fpd, $data);
272
+ self::debug("Found $data");
273
+ self::$count++;
274
+ }
275
+ else{
276
+ self::debug("Queue finished");
277
+ }
278
+
279
+ }
280
+
281
+ /*
282
+ * Check if the file is not in the exclusion list
283
+ *
284
+ * name: isNotExcluded
285
+ * @param string $file System File
286
+ * @return
287
+ */
288
+ public static function isNotExcluded($file){
289
+
290
+ $excluded = true;
291
+
292
+ foreach(self::$excludeList as $exclFile){
293
+ $mfile = str_replace(array("/","\\","\n","\r"), array("",""), trim($file));
294
+ $mexclFile = str_replace(array("/","\\","\n","\r"), array("",""), ($exclFile));
295
+
296
+ self::debug("exclude:".$mfile."--".$mexclFile);
297
+ $string = stristr($mfile, $mexclFile);
298
+ if($string != ""){
299
+ $excluded = false;
300
+ self::debug("$file excluded");
301
+ return $excluded;
302
+ }else
303
+ self::debug("$file not excluded # $string");
304
+ }
305
+
306
+ return $excluded;
307
+
308
+ }
309
+
310
+
311
+ /*
312
+ * Return the size of a file, tries to overcome the 4GB php filesize limitation
313
+ *
314
+ * name: getFileSize
315
+ * @param string $file file path
316
+ * @return string $sizeInBytes return the size in bytes of the file, PHP only returns values up to 4GB
317
+ */
318
+ public static function getFileSize($file){
319
+
320
+ $sizeInBytes = sprintf("%u", filesize($file));
321
+ if ((!$sizeInBytes) and (function_exists("exec"))){
322
+ $command = "ls -l \"$file\" | cut -d \" \" -f 5";
323
+ $sizeInBytes = @exec($command);
324
+ }
325
+
326
+ return $sizeInBytes;
327
+
328
+ }
329
+
330
+ /*
331
+ * Writing file details(path, permissions, size) to file
332
+ *
333
+ * name: writePermFile
334
+ * @param file handler $fp file handler of where to write
335
+ * @param string $file File to write
336
+ * @return
337
+ */
338
+ public static function writePermFile($file, $append = "", $force = 0){
339
+
340
+ $file = realpath($file);
341
+ if((self::isNotExcluded($file)) or ($force)){
342
+ $fperm = substr(sprintf('%o', @fileperms($file)), -4);
343
+ $fsize = self::getFileSize($file);
344
+
345
+ $file = str_replace(self::$START_DIR, "", str_replace("\\","/", $file));
346
+
347
+ fwrite(self::$fp, $file."|".$fperm."|".$fsize."|".$append."\n");
348
+ self::debug($file ." added to list");
349
+ }
350
+ else{
351
+ self::debug("$file excluded");
352
+ }
353
+ return;
354
+ }
355
+
356
+ /*
357
+ * Handle an array of files
358
+ *
359
+ * name: writePermFiles
360
+ * @param file handler $fp File handler of where to write
361
+ * @param array $files The array of files
362
+ * @return
363
+ */
364
+ public static function writePermFiles($files, $append = "", $force = 0){
365
+
366
+ if(is_array($files)){
367
+ foreach($files as $file){
368
+ self::writePermFile($file, $append, $force);
369
+ }
370
+ }else{
371
+ self::writePermFile($files, $append, $force);
372
+ }
373
+ return;
374
+ }
375
+
376
+ /*
377
+ * Recurse the directory $dir and get all files in it
378
+ *
379
+ * name: getDirectories
380
+ * @param string $dir Directory to scan
381
+ * @param array &f_arr File list array
382
+ * @param array &fd_arr Directory list array
383
+ * @return
384
+ */
385
+ public static function getDirectories($dir){
386
+
387
+ self::debug("Processing $dir");
388
+
389
+ if(is_dir($dir)) {
390
+ self::debug("OK directory $dir");
391
+ if($dh = opendir($dir)) {
392
+
393
+ self::debug("Opened directory $dir");
394
+
395
+ while(($file = readdir($dh)) !== false) {
396
+ if($file != "." && $file != "..") {
397
+
398
+ $cfile = $dir."/".$file;
399
+
400
+ if(@is_dir($cfile))
401
+ self::$d_arr[] = $cfile;
402
+ else{
403
+
404
+ self::writePermFile($cfile, "F");
405
+ self::$count++;
406
+ }
407
+ }
408
+ }
409
+ @closedir($dh);
410
+ }else{
411
+ self::debug("Unable to open $dir");
412
+ }
413
+ }else{
414
+ self::debug($dir." is not directory");
415
+ }
416
+
417
+
418
+ return;
419
+
420
+ }
421
+
422
+ }
cloner.config.php CHANGED
@@ -29,6 +29,7 @@ $_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";
29
  $_CONFIG['mem']="";
30
  $_CONFIG['backup_refresh']="1";
31
  $_CONFIG['refresh_time']="1";
32
+ $_CONFIG['refresh_mode']="1";
33
  $_CONFIG['backup_refresh_number']="100";
34
  $_CONFIG['sql_mem']="";
35
  $_CONFIG['enable_db_backup']="1";
cloner.functions.php CHANGED
@@ -1,1960 +1,1966 @@
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 type=\"text/javascript\">
37
-
38
- window.location = \"$url&mosmsg=".urlencode($msg)."\";
39
-
40
- </script>";
41
-
42
- exit;
43
-
44
- }
45
 
46
- function fdefault(){
 
47
 
48
- HTML_cloner::_FDefault();
 
49
 
50
- }
51
 
52
- function config($option){
53
- global $mosConfig_absolute_path, $_CONFIG, $config_file;
 
54
 
55
 
56
- if(@$_REQUEST['action']=='save'){
57
- #print_r($_REQUEST);exit;
58
- $databases_incl_list = "";
59
- if(is_array($_REQUEST['databases_incl']))
60
- foreach($_REQUEST['databases_incl'] as $database){
61
-
62
- $databases_incl_list .= $database. ",";
63
-
64
- }
65
- if($fp = @fopen($config_file,'w')){
66
-
67
- $cfg = '<?'.'php'."\n";
68
-
69
- $cfg .= '$_CONFIG[\'license_code\']="'.$_REQUEST[license_code].'";'."\n";
70
-
71
- $cfg .= '$_CONFIG[\'backup_path\']="'.$_REQUEST[backup_path].'";'."\n";
72
-
73
- $cfg .= '$_CONFIG[\'clonerPath\']="'.$_REQUEST[clonerPath].'";'."\n";
74
-
75
- $cfg .= '$_CONFIG[\'jcuser\']="'.$_REQUEST[jcuser].'";'."\n";
76
-
77
- if($_REQUEST['jcpass'] == ''){
78
-
79
- $jcpass = $_CONFIG['jcpass'];
80
-
81
- }else{
82
-
83
- $jcpass = md5($_REQUEST['jcpass']);
84
-
85
- }
86
-
87
- $cfg .= '$_CONFIG[\'jcpass\']=\''.$jcpass.'\';'."\n";
88
-
89
- $cfg .= '$_CONFIG[\'mysql_host\']="'.$_REQUEST[mysql_host].'";'."\n";
90
-
91
- $cfg .= '$_CONFIG[\'mysql_user\']="'.$_REQUEST[mysql_user].'";'."\n";
92
-
93
- $cfg .= '$_CONFIG[\'mysql_pass\']=\''.$_REQUEST[mysql_pass].'\';'."\n";
94
-
95
- $cfg .= '$_CONFIG[\'mysql_database\']="'.$_REQUEST[mysql_database].'";'."\n";
96
-
97
- $cfg .= '$_CONFIG[\'select_folders\']="'.$_REQUEST[select_folders].'";'."\n";
98
-
99
- $cfg .= '$_CONFIG[\'select_lang\']="'.$_REQUEST[select_lang].'";'."\n";
100
-
101
- $cfg .= '$_CONFIG[\'secure_ftp\']="'.$_REQUEST[secure_ftp].'";'."\n";
102
-
103
- $cfg .= '$_CONFIG[\'backup_compress\']="'.$_REQUEST[backup_compress].'";'."\n";
104
-
105
- $cfg .= '$_CONFIG[\'cron_logemail\']="'.$_REQUEST[cron_logemail].'";'."\n";
106
-
107
- $cfg .= '$_CONFIG[\'cron_exclude\']="'.$_REQUEST[cron_exclude].'";'."\n";
108
-
109
- $cfg .= '$_CONFIG[\'cron_send\']="'.$_REQUEST[cron_send].'";'."\n";
110
-
111
- $cfg .= '$_CONFIG[\'cron_btype\']="'.$_REQUEST[cron_btype].'";'."\n";
112
-
113
- $cfg .= '$_CONFIG[\'cron_bname\']="'.$_REQUEST[cron_bname].'";'."\n";
114
-
115
- $cfg .= '$_CONFIG[\'cron_ip\']="'.$_REQUEST[cron_ip].'";'."\n";
116
-
117
- $cfg .= '$_CONFIG[\'cron_ftp_server\']="'.$_REQUEST[cron_ftp_server].'";'."\n";
118
-
119
- $cfg .= '$_CONFIG[\'cron_ftp_user\']="'.$_REQUEST[cron_ftp_user].'";'."\n";
120
-
121
- $cfg .= '$_CONFIG[\'cron_ftp_pass\']=\''.$_REQUEST[cron_ftp_pass].'\';'."\n";
122
-
123
- $cfg .= '$_CONFIG[\'cron_ftp_path\']="'.$_REQUEST[cron_ftp_path].'";'."\n";
124
-
125
- $cfg .= '$_CONFIG[\'cron_ftp_delb\']="'.$_REQUEST[cron_ftp_delb].'";'."\n";
126
-
127
- $cfg .= '$_CONFIG[\'databases_incl_list\']="'.$databases_incl_list.'";'."\n";
128
-
129
- $cfg .= '$_CONFIG[\'cron_sql_drop\']="'.$_REQUEST[cron_sql_drop].'";'."\n";
130
-
131
- $cfg .= '$_CONFIG[\'cron_email_address\']="'.$_REQUEST[cron_email_address].'";'."\n";
132
-
133
- $cfg .= '$_CONFIG[\'cron_file_delete\']="'.$_REQUEST[cron_file_delete].'";'."\n";
134
-
135
- $cfg .= '$_CONFIG[\'cron_file_delete_act\']="'.$_REQUEST[cron_file_delete_act].'";'."\n";
136
-
137
- $cfg .= '$_CONFIG[\'mem\']="'.$_REQUEST[mem].'";'."\n";
138
-
139
- $cfg .= '$_CONFIG[\'backup_refresh\']="'.$_REQUEST[backup_refresh].'";'."\n";
140
-
141
- $cfg .= '$_CONFIG[\'refresh_time\']="'.$_REQUEST[refresh_time].'";'."\n";
142
-
143
- $cfg .= '$_CONFIG[\'backup_refresh_number\']="'.$_REQUEST[backup_refresh_number].'";'."\n";
144
-
145
- $cfg .= '$_CONFIG[\'sql_mem\']="'.$_REQUEST[sql_mem].'";'."\n";
146
-
147
- $cfg .= '$_CONFIG[\'enable_db_backup\']="'.$_REQUEST[enable_db_backup].'";'."\n";
148
-
149
- $cfg .= '$_CONFIG[\'zippath\']="'.$_REQUEST[zippath].'";'."\n";
150
-
151
- $cfg .= '$_CONFIG[\'tarpath\']="'.$_REQUEST[tarpath].'";'."\n";
152
-
153
- $cfg .= '$_CONFIG[\'sqldump\']="'.$_REQUEST[sqldump].'";'."\n";
154
-
155
- $cfg .= '$_CONFIG[\'system_dlink\']="'.$_REQUEST[system_dlink].'";'."\n";
156
-
157
- $cfg .= '$_CONFIG[\'mosConfig_live_site\']="'.$_SERVER['HTTP_HOST'].'";'."\n";
158
-
159
- $cfg .= '$_CONFIG[\'system_ftptransfer\']="'.$_REQUEST[system_ftptransfer].'";'."\n";
160
-
161
- $cfg .= '$_CONFIG[\'system_mdatabases\']="'.$_REQUEST[system_mdatabases].'";'."\n";
162
-
163
- $cfg .= '$_CONFIG[\'add_backups_dir\']="'.$_REQUEST[add_backups_dir].'";'."\n";
164
 
165
-
166
- $cfg .= '$_CONFIG[\'cron_amazon_active\']="'.$_REQUEST[cron_amazon_active].'";'."\n";
167
 
168
- $cfg .= '$_CONFIG[\'cron_amazon_awsAccessKey\']="'.$_REQUEST[cron_amazon_awsAccessKey].'";'."\n";
 
 
 
 
 
 
169
 
170
- $cfg .= '$_CONFIG[\'cron_amazon_awsSecretKey\']="'.$_REQUEST[cron_amazon_awsSecretKey].'";'."\n";
171
 
172
- $cfg .= '$_CONFIG[\'cron_amazon_bucket\']="'.$_REQUEST[cron_amazon_bucket].'";'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
- $cfg .= '$_CONFIG[\'cron_amazon_dirname\']="'.$_REQUEST[cron_amazon_dirname].'";'."\n";
175
 
 
176
 
177
- $cfg .= '?'.'>';
178
 
179
- fwrite($fp, $cfg);
 
 
 
 
180
 
 
 
 
 
 
181
  fclose($fp);
182
-
183
- $msg = LM_MSG_BACK_1;
184
-
185
- if($_REQUEST['cron_save_as'] != ""){
186
-
187
- $fcron = $_CONFIG['multiple_config_dir']."/".$_REQUEST['cron_save_as'].".php";
188
-
189
- if($fp = @fopen($fcron, "w")){
190
-
191
- fwrite($fp, $cfg);
192
-
193
- fclose($fp);
194
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
196
- else{
197
-
198
- $msg = "Unable to save $fcron file, please make sure the folder is writeable!";
199
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
203
 
204
-
205
- mosRedirect( 'index2.php?option='.$option."&task=config" , $msg);
 
 
 
 
 
 
 
 
206
  }
 
 
 
 
207
  else
208
- {
209
- $msg ="<font color='red'>ERROR... Unable to write to $config_file, please change the permissions!</font>";
210
- E_print($msg);
 
 
 
 
 
 
 
211
  }
212
 
213
- }
214
- HTML_cloner::Config($option);
215
- }
216
-
217
- ### JoomlaCloner Language Manager
218
- function translator($option){
219
- global $mosConfig_absolute_path, $lang_array, $lang_dir;
220
-
221
- $langs = array();
222
- $cid = $_REQUEST['cid'];
223
- $files = $_REQUEST['files'];
224
-
225
- if(is_array($cid))
226
- foreach($cid as $value){
227
-
228
- $langs[] = $files[$value];
229
-
230
- }
231
-
232
- if($_REQUEST['task'] == 'del_lang'){
233
-
234
- foreach($langs as $lang){
235
-
236
- @unlink ($lang_dir."/".$lang.".php");
237
-
238
- }
239
-
240
- $msg = LM_LANG_MSG_DEL;
241
- mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
242
-
243
- }
244
-
245
- HTML_cloner::Translator($option, $lang_array);
246
- }
247
-
248
- function translator_add($option, $task){
249
- global $_CONFIG, $lang_array, $lang_dir;
250
-
251
- if($task == 'add_lang_new') {
252
-
253
- $lfile = $lang_dir."/".strtolower($_REQUEST['lname']).".php";
254
-
255
- if(file_exists($lfile)){
256
-
257
- $msg = "Language ".$_REQUEST['lname']." already exists!";
258
- }
259
- else
260
- if($fp = @fopen($lfile, 'w')){
261
-
262
- fwrite($fp, "");
263
-
264
- fclose($fp);
265
-
266
- $msg = "Language ".ucfirst($_REQUEST['language'])." successfully added!";
267
-
268
- }
269
- else{
270
-
271
- $msg = "File $lfile could not be updated, please check it's permissions'!";
272
-
273
- }
274
-
275
- mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
276
-
277
- }
278
-
279
-
280
- HTML_cloner::Translator_Add($option);
281
- }
282
- function translator_edit($option, $task){
283
- global $_CONFIG, $lang_array, $lang_dir;
284
-
285
- if(($task == 'save_lang')||($task == 'save_lang_apply')){
286
-
287
- $lfile = $lang_dir."/".$_REQUEST['language'].".php";
288
-
289
- if($_REQUEST['language'] == 'english'){
290
-
291
- if($fp = @fopen($lfile, 'w')){
292
-
293
- fwrite($fp, stripslashes($_REQUEST['def_content']));
294
-
295
- fclose($fp);
296
-
297
- $msg = "Language ".ucfirst($_REQUEST['language'])." successfully updated!";
298
-
299
- }
300
- else{
301
-
302
- $msg = "File $lfile could not be created, please check it's permissions'!";
303
-
304
- }
305
- if($task == 'save_lang_apply')
306
- mosRedirect( 'index2.php?option='.$option."&task=edit_lang&langx=".$_REQUEST['language'] , $msg);
307
- else
308
- mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
309
-
310
- }
311
- else{
312
-
313
- $lfile = $_REQUEST['lfile'];
314
- $ldata = $_REQUEST['lang'];
315
-
316
- if($fp = @fopen($lfile, 'w')){
317
-
318
- fwrite($fp, "<"."?php\n");
319
- foreach($ldata as $key=>$value){
320
-
321
- fwrite($fp, "define(\"".$key."\",\"".stripslashes($value)."\");\n");
322
-
323
- }
324
-
325
- fwrite($fp, "?".">");
326
-
327
- fclose($fp);
328
-
329
- $msg = "Language ".ucfirst($_REQUEST['language'])." successfully updated!";
330
-
331
- }
332
- else{
333
-
334
- $msg = "File $lfile could not be updated, please check it's permissions'!";
335
-
336
- }
337
-
338
-
339
- }
340
- if($task == 'save_lang_apply')
341
- mosRedirect( 'index2.php?option='.$option."&task=edit_lang&langx=".$_REQUEST['language'] , $msg);
342
- else
343
- mosRedirect( 'index2.php?option='.$option."&task=lang" , $msg);
344
-
345
- }
346
-
347
- $content = "";
348
- $lang = "";
349
- $cid = $_REQUEST['cid'];
350
- $files = $_REQUEST['files'];
351
-
352
- if(is_array($cid))
353
- foreach($cid as $value){
354
-
355
- $lang = $files[$value];
356
-
357
- }
358
-
359
- if($_REQUEST['langx']){
360
-
361
- $lang = $_REQUEST['langx'];
362
-
363
- }
364
-
365
- if($fp = fopen($lang_dir."/english.php", 'r')){
366
-
367
- while(!feof($fp)){
368
-
369
- $content .= fread($fp, 1024);
370
 
371
- }
372
-
373
- fclose($fp);
374
-
375
- }
376
-
377
- $file = $lang_dir."/".$lang.".php";
378
- $dfile = $lang_dir."/english.php";
379
-
380
-
381
-
382
- if($lang == 'english') {
383
-
384
- HTML_cloner::Translator_Edit_DEFAULT($option, $content, $file, $lang);
385
-
386
- }
387
- else {
388
-
389
- $def_data = get_lang_data($dfile);
390
- $cur_data = get_lang_data($file);
391
-
392
- $data = array_merge($def_data, $cur_data);
393
-
394
- HTML_cloner::Translator_Edit($option, $data, $def_data, $file, $lang);
395
-
396
- }
397
 
398
- }
 
 
399
 
400
- function get_lang_data($file){
401
- global $_CONFIG;
402
-
403
- if($fp = fopen($file, 'r')){
404
-
405
- while(!feof($fp)){
406
-
407
- $content .= fread($fp, 1024);
408
 
409
- }
410
-
411
- fclose($fp);
412
-
413
- }
414
 
415
- $data = array();
416
-
417
- $tmp = explode("define(\"", $content);
418
- foreach($tmp as $key=>$value){
419
-
420
- $temp = explode("\",", $value);
421
-
422
- $tst = explode("\");", $temp[1]);
423
- $data[$temp[0]] = substr(trim($tst[0]), 1, strlen($tst[0]));
424
 
425
- }
426
-
427
- return $data;
428
 
429
- }
 
 
 
 
 
 
 
430
 
431
- function get_avalaible_langs(){
432
- global $_CONFIG, $lang_dir;
433
 
434
- $lang_arr = array();
435
-
436
- if ($handle = @opendir($lang_dir)) {
437
 
438
- /* This is the correct way to loop over the directory. */
439
- while (false !== ($file = readdir($handle)))
440
- if(($file != 'index.html') &&($file != '..')&&($file != '.'))
441
- {
442
- $lang_arr[] = str_replace(".php", "", $file);
443
- }
444
 
445
- closedir($handle);
446
-
447
- }
448
-
449
- return $lang_arr;
450
- }
451
-
452
- function showBackups( $option ) {
453
- // ----------------------------------------------------------
454
- // Generate a selectable list of the files in Backup Folder
455
- // ----------------------------------------------------------
456
- global $_CONFIG;
457
-
458
- if(!is_dir($_CONFIG['clonerPath'])){
459
- E_print( "Your backup directory ".$_CONFIG['clonerPath']." is not correct! Unable to continue...");
460
- return ;
461
- }
462
-
463
- # initialise list arrays, directories and files separately and array counters for them
464
- $d_arr = array(); $d = 0;
465
- $f_arr = array(); $f = 0;
466
- $s_arr = array(); $s = 0;
467
-
468
- # obtain the list of backup archive files
469
- getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
470
-
471
- # load presentation layer
472
- HTML_cloner::showBackups( $f_arr, $s_arr, $_CONFIG['clonerPath'], $option );
473
- }
474
-
475
- function moveBackup($option){
476
- global $task;
477
- $files_out = array();
478
- if(is_array($_REQUEST[files]))
479
- {
480
-
481
- foreach($_REQUEST[files] as $key=>$value)
482
- if($_REQUEST[cid][$key]!="")
483
- $files_out[] = $value;
484
- }
485
-
486
- if($_REQUEST['action']=="connect"){
487
-
488
- $ret = start_connect($_REQUEST[files]);
489
-
490
- }
491
- if(!$ret)
492
- HTML_cloner::TransferForm($option, $files_out);
493
- }
494
-
495
- function start_connect($files){
496
- global $task, $_CONFIG;
497
-
498
-
499
- if(($_REQUEST[task]=='move')||($_REQUEST[task2]=='move')){
500
- }
501
- else{
502
- $source_file[0] = "restore/XCloner.php";
503
- $destination_file[0] = $_REQUEST[ftp_dir]."/XCloner.php";
504
-
505
- $source_file[1] = "restore/TAR.php";
506
- $destination_file[1] = $_REQUEST[ftp_dir]."/TAR.php";
507
-
508
- }
509
-
510
- foreach($files as $file){
511
- $source_file[] = $_CONFIG['clonerPath']."/".$file;
512
- $destination_file[] = $_REQUEST[ftp_dir]."/".$file;
513
- }
514
-
515
-
516
-
517
- list($fhost, $fport) = explode(":",$_REQUEST[ftp_server]);
518
- if($fport == "")
519
- $fport = '21';
520
-
521
- $ftp_timeout = '3600';
522
- // set up basic connection
523
- if(!$_CONFIG[secure_ftp]){
524
- $conn_id = ftp_connect($fhost, (int)$fport, (int)$ftp_timeout);
525
- $connect = "Normal";
526
- }
527
- else{
528
- $conn_id = ftp_ssl_connect($fhost, (int)$fport, (int)$ftp_timeout);
529
- $connect = "Secure";
530
- }
531
-
532
- // login with username and password
533
- $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]);
534
-
535
- // check connection
536
- if ((!$conn_id) || (!$login_result)) {
537
- echo "<b style='color:red'>".LM_MSG_BACK_2."</b>";
538
- echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server]." for user ".$_REQUEST[ftp_user]."</b>";
539
- return;
540
- } else {
541
- #echo "Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user]";
542
- }
543
-
544
- if($_CONFIG[system_ftptransfer]==1)
545
- {
546
- // turn passive mode on
547
- @ftp_pasv($conn_id, true);
548
- $mode = "Passive";
549
- }
550
- else
551
- {
552
- // turn passive mode off
553
- @ftp_pasv($conn_id, false);
554
- $mode = "Active";
555
- }
556
-
557
- echo "Connected to $connect ftp server <b>$_REQUEST[ftp_server] - $mode Mode</b><br />";
558
- for($i=0;$i<sizeof($source_file);$i++)
559
- {
560
- echo "<br />Moving source file <b>".$source_file[$i]."</b>";
561
- // upload the file
562
- if(!$_REQUEST['ftp_inct']){
563
-
564
- $ret = ftp_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY);
565
-
566
- if ($ret) echo "<br /><b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
567
- else {echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";return;}
568
-
569
-
570
- }
571
-
572
- if($_REQUEST['ftp_inct']){
573
-
574
- $size = filesize($source_file[$i]);
575
- $dsize = ftp_size($conn_id, $destination_file[$i]);
576
- $perc = sprintf("%.2f", ($dsize*100)/$size);
577
-
578
- echo " - uploaded $perc% from $size bytes <br>";
579
- $ret = ftp_nb_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY , FTP_AUTORESUME);
580
-
581
-
582
-
583
- // check upload status
584
- if ($ret == FTP_FAILED ) {
585
- echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";return;
586
-
587
- } else {
588
-
589
- $j = 1;
590
-
591
- while ($ret == FTP_MOREDATA) {
592
-
593
- // Do whatever you want
594
- #echo ". ";
595
-
596
-
597
- // Continue uploading...
598
- $ret = ftp_nb_continue($conn_id);
599
-
600
- if($j++ % 500 == 0){
601
-
602
- @ftp_close($conn_id);
603
-
604
- echo "<script>
605
- var sURL = unescape('".$_SERVER[REQUEST_URI]."');
606
-
607
- function refresh()
608
- {
609
- // This version of the refresh function will cause a new
610
- // entry in the visitor's history. It is provided for
611
- // those browsers that only support JavaScript 1.0.
612
- //
613
- window.location.href = sURL;
614
- }
615
-
616
- setTimeout( \"refresh()\", 2*1000 );
617
-
618
- </script>";
619
- return 1;
620
-
621
- break;
622
-
623
- }
624
-
625
- }
626
- if ($ret == FTP_FINISHED) {
627
- echo "<b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
628
- }
629
-
630
- }
631
-
632
- }
633
-
634
- }
635
- // close the FTP stream
636
- @ftp_close($conn_id);
637
-
638
- $redurl = $_REQUEST[ftp_url]."/XCloner.php";
639
-
640
- if((substr($redurl, 0, 7)!= "http://") && (substr($redurl, 0, 8)!="https://") )
641
- $redurl = "http://".trim($redurl);
642
-
643
- if($_REQUEST['ftp_inct']){
644
-
645
- if($_REQUEST['refresh_done'] != 1){
646
- echo "<script>
647
- var sURL = unescape('".$_SERVER[REQUEST_URI]."&refresh_done=1');
648
-
649
- function refresh()
650
- {
651
- // This version of the refresh function will cause a new
652
- // entry in the visitor's history. It is provided for
653
- // those browsers that only support JavaScript 1.0.
654
- //
655
- window.location.href = sURL;
656
- }
657
-
658
- setTimeout( \"refresh()\", 2*1000 );
659
-
660
- </script>";
661
- return 1;
662
- }
663
-
664
- }
665
- else{
666
-
667
- $_REQUEST['refresh_done'] = 1;
668
-
669
- }
670
- if($_REQUEST['refresh_done'] == 1)
671
-
672
- if(($_REQUEST[task]=='move')||($_REQUEST[task2]=='move')){
673
- echo "<br><br><h2>".LM_MSG_BACK_3."</h2>"; return 1;
674
- }
675
- else{
676
- echo "<br><br><h2>".LM_MSG_BACK_4." <br /><a href='".$redurl."'>click here to continue...</a></h2>"; return 1;
677
- }
678
-
679
-
680
- return 0;
681
-
682
- }
683
- function copyls($source, $dest){
684
-
685
- $handle = fopen($dest, "a");
686
- if($handle){
687
- fclose($handle);
688
- return 1;
689
- }
690
- else{
691
- return 0;
692
- }
693
-
694
- }
695
-
696
- function action($option){
697
- global $_CONFIG;
698
-
699
- $userfile = $_CONFIG['baDownloadPath']."/".$_REQUEST[file];
700
- $localfile = $_CONFIG['clonerPath']."/".$_REQUEST[file];
701
-
702
-
703
- if($_REQUEST[action]=='delete'){
704
-
705
- if(@unlink($userfile))
706
- $msg = LM_MSG_BACK_5;
707
- else
708
- $msg = LM_MSG_BACK_6;
709
- }
710
- elseif($_REQUEST[action]=='copy'){
711
-
712
- if(@copyls($localfile, $userfile))
713
- $msg = LM_MSG_BACK_7;
714
- else
715
- $msg = LM_MSG_BACK_8;
716
- }
717
- mosRedirect( 'index2.php?option='.$option."&task=view" , $msg);
718
-
719
- }
720
-
721
- function clone_rename($option){
722
- global $_CONFIG;
723
-
724
- if($_REQUEST[task] == 'rename_save'){
725
- $files = $_REQUEST['cfile'];
726
- foreach($files as $key=>$value){
727
- @rename($_CONFIG[clonerPath]."/".$_REQUEST[cfile][$key],$_CONFIG[clonerPath]."/".$_REQUEST[dfile][$key]);
728
- @rename($_CONFIG[baDownloadPath]."/".$_REQUEST[cfile][$key],$_CONFIG[baDownloadPath]."/".$_REQUEST[dfile][$key]);
729
- }
730
-
731
- $msg = LM_MSG_BACK_9;
732
- mosRedirect( 'index2.php?option='.$option."&task=view" , $msg);
733
- }
734
-
735
- $files = array();
736
-
737
- foreach($_REQUEST[cid] as $key=>$value){
738
- $files[] = $_REQUEST[files][$key];
739
- }
740
-
741
-
742
-
743
- HTML_Cloner::Rename($files, $option);
744
-
745
- }
746
- function downloadBackup($file){
747
-
748
- global $_CONFIG;
749
-
750
- $file = $_CONFIG['clonerPath']."/$file";
751
-
752
- //First, see if the file exists
753
- if (!is_file($file)) { die("<b>404 File $file was not found!</b>"); }
754
-
755
- //File Info
756
- $len = filesize($file);
757
- $filename = basename($file);
758
- $file_extension = strtolower(substr(strrchr($filename,"."),1));
759
-
760
- //Setam Content-Type-urile pentru fisierul in cauza
761
- switch( $file_extension ) {
762
- case "pdf": $ctype="application/pdf"; break;
763
- case "exe": $ctype="application/octet-stream"; break;
764
- case "zip": $ctype="application/zip"; break;
765
- case "doc": $ctype="application/msword"; break;
766
- case "xls": $ctype="application/vnd.ms-excel"; break;
767
- case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
768
- case "gif": $ctype="image/gif"; break;
769
- case "png": $ctype="image/png"; break;
770
- case "jpeg":
771
- case "jpg": $ctype="image/jpg"; break;
772
- case "mp3": $ctype="audio/mpeg"; break;
773
- case "wav": $ctype="audio/x-wav"; break;
774
- case "mpeg":
775
- case "mpg":
776
- case "mpe": $ctype="video/mpeg"; break;
777
- case "mov": $ctype="video/quicktime"; break;
778
- case "avi": $ctype="video/x-msvideo"; break;
779
-
780
- default: $ctype="application/force-download";
781
- }
782
-
783
- //Writing Headers
784
- header("Pragma: public");
785
- header("Expires: 0");
786
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
787
- header("Cache-Control: public");
788
- header("Content-Description: File Transfer");
789
-
790
- //Content-Type-ul
791
- header("Content-Type: $ctype");
792
-
793
- //Force Download
794
- $header="Content-Disposition: attachment; filename=".$filename.";";
795
- header($header );
796
- header("Content-Transfer-Encoding: binary");
797
- header("Content-Length: ".$len);
798
- @readfile($file);
799
- exit;
800
- }
801
-
802
-
803
- function confirmBackup( $option ) {
804
- // ----------------------------------------------------------
805
- // Routine to display a confirmation screen prior to backup
806
- // containing the selectable folders and a confirmation for
807
- // backing up the database
808
- // ----------------------------------------------------------
809
- global $_CONFIG;
810
-
811
- if(!is_writeable($_CONFIG['clonerPath'])){
812
- E_print( "Your backup directory $_CONFIG[clonerPath] is not writeable or does not exists!");
813
- return;
814
- }
815
-
816
- # Initialise list arrays, directories and files separately and array counters for them
817
- $excludedFolders = array();
818
- $d_arr = array(); $d = 0;
819
- $ds_arr = array();
820
- $f_arr = array(); $f = 0;
821
- $s_arr = array(); $s = 0;
822
- $d_arr[$d] = $_CONFIG['backup_path'];
823
-
824
- #if($_CONFIG['select_folders']==0){
825
- # obtain the list of folders by recursing the mambo file store
826
- #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders, '');
827
- #}
828
-
829
- if($_CONFIG['select_folders'] == 2)
830
- if($fp = @fopen($_CONFIG['exfile'], 'w')){
831
-
832
- $excl = explode("\r\n", $_CONFIG['cron_exclude']);
833
- foreach($excl as $value)
834
- if($value != ""){
835
-
836
- $value = str_replace($_CONFIG['backup_path'], "", $value);
837
- if($value [0] !='/')
838
- $value = '/'.$value;
839
-
840
- if((substr($value, strlen($value)-1, 1) == '/')&&(strlen($value)!=1))
841
- $value = substr($value, 0 , strlen($value)-1);
842
-
843
- fwrite($fp, $value."\r\n");
844
- }
845
- fclose($fp);
846
- }
847
 
848
- # load presentation layer
849
- if($option != 'nohtml')
850
- HTML_cloner::confirmBackups( $d_arr, $ds_arr, $_CONFIG['clonerPath'], $option );
851
- else
852
- return $d_arr;
853
- }
854
 
 
 
 
 
 
 
 
 
 
855
 
856
- function deleteBackups( $cid, $option ) {
857
- // ----------------------------------------------------------
858
- // Routine to delete the Backup Sets selected in the list
859
- // backup sets screen
860
- // ----------------------------------------------------------
861
- global $_CONFIG;
862
 
 
 
 
 
863
 
864
- # Cycle through all the selected Backups and Deleted them
865
- foreach ($cid as $key=>$value) {
866
 
867
- $file = $_CONFIG['clonerPath'].'/'. $_REQUEST['f'.$value];
868
 
869
 
870
- if ( unlink( $file ) ) {
871
- $msg .= $_REQUEST['f'.$value].' - '.LM_DELETE_FILE_SUCCESS;
872
- } else {
873
- $msg .= $_REQUEST['f'.$value].' - '.LM_DELETE_FILE_FAILED ;
874
- }
875
- }
876
 
877
- # redirect to list screen
878
- #$msg = _DELETE_FILE_SUCCESS;
879
- mosRedirect( 'index2.php?option='.$option."&task=view" , $msg );
880
- }
881
 
882
- function generateBackuprefresh($cid, $option, $backup_file){
883
-
884
- global $_CONFIG;
885
- global $databases_incl, $back_path, $sql_file, $perm_file, $htaccess;
886
 
887
- $perm_file = $_CONFIG['backups_dir']."/perm.txt";
888
-
889
 
890
- $lines = $_REQUEST['lines'];
891
-
892
- $fperm = fopen($perm_file,"r");
893
-
894
-
895
- $startf = (int)$_REQUEST['startf'];
896
-
897
- $endf = $startf + $_CONFIG['backup_refresh_number'];
898
-
899
- $excluded_cmd = "";
900
-
901
- if($fp = @fopen($_REQUEST['excl_manual'], "r")){
902
-
903
- while(!feof($fp))
904
- $excluded_cmd .= fread($fp, 1024);
905
-
906
- fclose($fp);
907
- }
908
-
909
-
910
- $url = "index2.php?option=com_cloner&task=refresh&startf=$endf&lines=$lines&backup=$backup_file&excl_manual=".$_REQUEST['excl_manual'];
911
-
912
-
913
- if($endf>=$lines)
914
- $endf = $lines;
915
- else
916
- echo "Continue link: <a href='$url'>click here&gt;&gt;</a><br />";
917
-
918
- if((int)$lines!=0)
919
- $percent = sprintf("%d",($endf*100)/(int)$lines);
920
-
921
-
922
- echo "Total process: $percent% out of $lines files<br />";
923
- echo "Processing files $startf to $endf for backup file $backup_file!<br />";
924
- echo "Current backup size: ".getFileSizeText(filesize($backup_file))."<br /><br />";
925
-
926
- chdir($_CONFIG['backup_path']);
927
-
928
- if($fperm){
929
- while ((!feof($fperm))&&($line < $endf)) {
930
-
931
- $line++;
932
-
933
- $buffer = explode("|", fgets($fperm, 4096));
934
-
935
- if(($line < $endf) && ($line >= $startf)){
936
-
937
-
938
- echo $inc_message = "<br />$line. ";
939
-
940
- if(($buffer[0]!="")&&(is_file($buffer[0]))){
941
-
942
- $file = $buffer[0];
943
-
944
- ### appending files
945
- echo $inc_message = "file - $file";
946
-
947
-
948
- if(!$_CONFIG['mem']){
949
- #### CREATE BACKUP USING TAR LIBRARIES
950
- $file_path_full = $buffer[0];
951
-
952
- {
953
-
954
- #$return = PclTarAddList($backup_file, array($file_path_full), '', $_CONFIG['backup_path'], "tar");
955
- $tar_object = new Archive_Tar($backup_file);
956
- $return = $tar_object->addModify(array($file_path_full), '', $_CONFIG['backup_path']);
957
-
958
- }
959
-
960
- #### END TAR #########################
961
- }
962
- else{
963
- #### CREATE BACKUP USING SERVER UTILITIES
964
-
965
- $file = str_replace(" ","\ ", $file);
966
-
967
- exec($_CONFIG[tarpath]." $excluded_cmd -".$_CONFIG['tarcompress']."vf $backup_file --update $file");
968
-
969
-
970
- #### END SERVER UTILITIES
971
- }
972
-
973
- }
974
- else{
975
-
976
- echo $inc_message = "directory - <b>".$buffer[0]."</b>";
977
-
978
- }
979
-
980
- }
981
-
982
- }
983
-
984
-
985
- #exit;
986
-
987
- echo "<br />New backup size: ".getFileSizeText(filesize($backup_file))."<br />";
988
-
989
-
990
- if($endf>=$lines){
991
-
992
- ## ALL DONE
993
- echo LM_MSG_BACK_11;
994
- @fclose($fperm);
995
-
996
-
997
- }
998
- else{
999
- ## REDIRECTING
1000
- @fclose($fperm);
1001
-
1002
- echo "<br>All done, redirecting in ".$_CONFIG['refresh_time']." seconds, or <a href='$url'>click here </a>";
1003
-
1004
- echo "
1005
- <script language='javascript'>
1006
- function redirect(){
1007
- window.location = '".$url."';
1008
- }
1009
-
1010
- setTimeout(\"redirect()\",".$_CONFIG['refresh_time']."000);
1011
-
1012
- </script>";
1013
-
1014
-
1015
- }
1016
-
1017
- }
1018
- else{
1019
-
1020
- echo "Unable to continue, could not open file $perm_file for reading!";
1021
-
1022
- }
1023
-
1024
- if($endf>=$lines){
1025
- $back_path = $_CONFIG['backups_dir'];
1026
- @unlink($back_path."/database-sql.sql");
1027
- @unlink($back_path."/perm.txt");
1028
- @unlink($back_path."/htaccess.txt");
1029
- @unlink($back_path."/.excl");
1030
- @unlink($back_path."/.excl_tar");
1031
- }
1032
- return;
1033
-
1034
- }
1035
-
1036
-
1037
- function generateBackup( $cid, $option ) {
1038
- // ----------------------------------------------------------
1039
- // Routine to generate recurse a folder structure and record
1040
- // the files, their sizes and parent folders
1041
- // ----------------------------------------------------------
1042
- global $_CONFIG;
1043
-
1044
-
1045
- # generate database backup if required
1046
-
1047
- if(!$_CONFIG['enable_db_backup']){
1048
-
1049
- $backupDatabase = 0;
1050
-
1051
- }else{
1052
-
1053
- $backupDatabase = $_REQUEST['dbbackup'];
1054
-
1055
- }
1056
 
1057
- if($_REQUEST[cron_access]){
 
1058
 
1059
- $_CONFIG['backup_refresh'] = 0;
1060
-
1061
- $_REQUEST['dbbackup_drop'] = $_CONFIG['cron_sql_drop'];
1062
 
1063
- if($_CONFIG[cron_btype] == '1')
1064
- $backupDatabase = 0;
1065
- }
1066
-
1067
-
1068
- if(!is_writeable($_CONFIG['clonerPath'])){
1069
- E_print( "Your backup directory ".$_CONFIG['clonerPath']." is not writeable or does not exists!");
1070
- return;
1071
- }
1072
- if(!is_writeable($_CONFIG['backups_dir'])){
1073
- E_print( "Required sql backup directory ".$_CONFIG['backups_dir']." is not writeable or does not exists!");
1074
- return;
1075
- }
1076
-
1077
-
1078
- # generate the backup set filename
1079
- #$urlinfo = parse_url($mosConfig_live_site);
1080
- #$domainname = strtolower(str_replace('.','_',$urlinfo[host]));
1081
- #$domainname= $_SERVER['HTTP_HOST'];
1082
- $domainname= $_CONFIG['mosConfig_live_site'];
1083
-
1084
-
1085
- if(($_CONFIG['mem']) && ($_CONFIG['backup_refresh'])){
1086
-
1087
- $f_ext = '.tar';
1088
- $_CONFIG['tarcompress'] = '';
1089
-
1090
- }elseif($_CONFIG['backup_compress']){
1091
-
1092
- $f_ext = '.tgz';
1093
- $_CONFIG['tarcompress'] = 'z';
1094
-
1095
- }else{
1096
-
1097
- $f_ext = '.tar';
1098
- $_CONFIG['tarcompress'] = '';
1099
- }
1100
-
1101
- /*if($_CONFIG['backup_refresh']){
1102
- $f_ext = ".tar";
1103
- }
1104
- elseif($_REQUEST[cron_dbonly]){
1105
- $f_ext = ".tar";
1106
- }
1107
- else{
1108
- $f_ext = ".tgz";
1109
- }*/
1110
 
1111
- if($_REQUEST['bname']==""){
 
1112
 
1113
- if($backupDatabase == 1){
1114
- if($_REQUEST['dbbackup_drop']){
1115
- $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-sql-drop'.$f_ext;
1116
- }
1117
- else{
1118
- $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-sql-nodrop'.$f_ext;
1119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1120
  }
1121
- else
1122
- $filename1 = 'backup_'.date("Y-m-d_H-i").'_'.$domainname.'-nosql'.$f_ext;
1123
- }
1124
- else{
1125
- $filename1 = $_REQUEST['bname'].$f_ext;
1126
- }
1127
-
1128
- $sql_file = array();
1129
-
1130
- if ($backupDatabase == 1) {
1131
- $tables = array(); $tables[0] = 'all';
1132
- $excltables = $_REQUEST['excltables'];
1133
-
1134
- $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult, 'database' , $excltables, $_CONFIG['mysql_database']);
1135
-
1136
- $databaseResult = "<b>".$_CONFIG['mysql_database'].":</b> ".$databaseResult;
1137
- ############## ADD multiple databases #######################
1138
- $databases_incl = $_REQUEST['databases_incl'];
1139
-
1140
- if(is_array($databases_incl)){
1141
- foreach($databases_incl as $database_name)
1142
- if($database_name!=''){
1143
-
1144
- $excltables = "";
1145
- mysql_query("USE $database_name");
1146
-
1147
- $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult_incl, $database_name , $excltables, $database_name);
1148
-
1149
- $databaseResult .= "<br /> <b>$database_name:</b> ".$databaseResult_incl;
1150
-
1151
- }
1152
-
1153
- mysql_query("USE ".$_CONFIG['mysql_database']);
1154
 
1155
- }
1156
-
 
 
 
 
 
 
 
1157
 
1158
- } else {
1159
- $databaseResult = LM_DATABASE_EXCLUDED;
1160
- }
1161
 
1162
 
1163
- $excluded = array();
1164
-
1165
- $data = "";
 
1166
 
1167
- $excluded[] = $_CONFIG['backups_dir']."/".$filename1;
1168
 
1169
- if($_REQUEST['cron_access']){
1170
-
1171
- $data = $_CONFIG['cron_exclude'];
1172
-
1173
- }
1174
- elseif($_CONFIG[select_folders] == 1){
1175
-
1176
- $data = $_REQUEST['exluded'];
1177
-
1178
- }
1179
-
1180
- ##### START THE EXCLUSION FILTER
1181
- if(($fp = @fopen($_CONFIG['exfile'],"r"))&&(!$_REQUEST['cron_access'])){
1182
-
1183
- while(!feof($fp)){
1184
- $data .= fread($fp, 1024);
1185
- }
1186
- fclose($fp);
1187
- }
1188
-
1189
- if(sizeof($_REQUEST[cid])>0)
1190
- $data .=implode("\r\n", $_REQUEST[cid]);
1191
-
1192
- $_COOKIES = explode("\r\n", $data);
1193
-
1194
-
1195
- if(is_array($_COOKIES))
1196
- foreach($_COOKIES as $key=>$value)
1197
- if($value != ""){
1198
-
1199
- $value = str_replace($_CONFIG['backup_path'], "", $value);
1200
- if($value [0] !='/')
1201
- $value = '/'.$value;
1202
-
1203
- if((substr($value, strlen($value)-1, 1) == '/')&&(strlen($value)!=1))
1204
- $value = substr($value, 0 , strlen($value)-1);
1205
-
1206
- if(($value!="")&&($value!='/administrator/backups')){
1207
-
1208
- if(trim($value) != '/administrator')
1209
- $excluded[] = str_replace("//","/",$_CONFIG['backup_path']."/".$value);
1210
- else{
1211
- if ($handle = opendir($_CONFIG['backup_path'].'/administrator')) {
1212
- while (false !== ($file = readdir($handle))) {
1213
- if ($file != "." && $file != ".." && $file != "backups") {
1214
- $excluded[] = str_replace("//","/",$_CONFIG['backup_path']."/administrator/".$file);
1215
- }
1216
- }
1217
- closedir($handle);
1218
- }
1219
-
1220
- }
1221
-
1222
- }
1223
-
1224
- }
1225
- #### END EXCLUSION FILTER
1226
-
1227
- if(!$_CONFIG['add_backups_dir'])
1228
- {
1229
- # initialise list arrays, directories and files separately and array counters for them
1230
- $d_arr = array(); $d = 0;
1231
- $f_arr = array(); $f = 0;
1232
- $s_arr = array(); $s = 0;
1233
-
1234
- getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);;
1235
- $i = 0;
1236
- while($i<sizeof($f_arr)){
1237
-
1238
- $excluded[] = $_CONFIG['clonerPath']."/".$f_arr[$i];
1239
- $i++;
1240
-
1241
- }
1242
-
1243
- }
1244
- # obtain list of folders included in the backup
1245
- $includeFolder = array();
1246
-
1247
- #print_r($excluded);exit;
1248
-
1249
- #$includeFolder = confirmBackup('nohtml');
1250
-
1251
- #initialise list arrays, directories and files separately and array counters for them
1252
- $d_arr = array(); $d = 0;
1253
- $ds_arr = array();
1254
- $f_arr = array(); $f = 0;
1255
- $s_arr = array(); $s = 0;$mdir=0;
1256
-
1257
- $perm_file = $_CONFIG['backups_dir']."/perm.txt";
1258
- @unlink($perm_file);
1259
- $fperm = fopen($perm_file,"w");
1260
-
1261
- for($i=0; $i<sizeof($excluded); $i++ ){
1262
-
1263
- $excluded[$i] = str_replace("//", "/", $excluded[$i]);
1264
- }
1265
- #print_r($excluded);exit;
1266
- # obtain the list of files by recursing the mambo file store
1267
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includeFolder, '', $excluded, $fperm);
1268
 
1269
- @fclose($fperm);
 
 
 
 
 
 
 
 
 
 
 
 
1270
 
1271
- @chmod($perm_file, 0777);
 
 
 
 
1272
 
 
 
 
1273
 
1274
- # format total archive size
1275
- $originalSize = getFileSizeText($s);
1276
 
1277
- # extend the file locations to include the full path
 
 
 
 
 
 
 
1278
 
1279
- for( $i=0; $i < count( $f_arr ); $i++ ) {
 
 
 
 
 
1280
 
1281
- if(!file_exists($f_arr[$i])){
1282
- unset($f_arr[$i]);
1283
- }
1284
 
 
 
 
 
1285
 
1286
- }
 
1287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1288
 
1289
-
1290
-
1291
- #if((file_exists($perm_file))&&(!in_array($perm_file, $f_arr)))
1292
- # $f_arr[] = $perm_file;
 
 
 
 
 
1293
 
 
1294
 
1295
- # add sql file to the backup
1296
 
1297
- if($_REQUEST[cron_access]){
1298
-
1299
- if(is_array($sql_file))
1300
- foreach($sql_file as $key=>$sqlfile)
1301
- if(($backupDatabase == 1)&&(!in_array($_CONFIG['backups_dir'].$sqlfile, $f_arr)))
1302
- $f_arr[] = $sqlfile;
1303
-
1304
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1305
 
 
 
 
 
 
 
 
 
 
1306
 
1307
 
1308
- $filename = $_CONFIG['clonerPath'].'/'.$filename1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1309
 
1310
- $f_arr = array_unique($f_arr);
 
 
1311
 
1312
- # create the Zip file from the fileset array
1313
- @unlink($filename);
1314
-
1315
- $perm_lines = 0;
1316
-
1317
- $handle = @fopen($perm_file, "r");
1318
-
1319
- if ($handle) {
1320
-
1321
- while (!feof($handle)) {
1322
- fgets($handle, 4096);
1323
- $perm_lines++;
1324
- }
1325
-
1326
- fclose($handle);
1327
-
1328
- }
1329
-
1330
-
1331
- if(!$_CONFIG['mem']){
1332
- #### START TAR MANUAL MODE ############################################################
1333
 
1334
- if($_CONFIG['backup_refresh']){
1335
-
1336
- $f_arr = array($_CONFIG['backups_dir']."/index.html");
1337
-
1338
  }
1339
-
1340
-
1341
- if($_CONFIG['backup_refresh'])
1342
- $tar_type= "tar";
1343
- else
1344
- $tar_type= "tgz";
1345
-
1346
-
1347
- $tar_object = new Archive_Tar($filename, compression($tar_type));
1348
- #$tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
1349
- $return = $tar_object->addModify($f_arr, '', $_CONFIG['backup_path']);
1350
-
1351
- if($return != 1){
1352
-
1353
- echo "Backup failed using tar mode, error code $return!";
1354
-
1355
- }
1356
-
1357
-
1358
-
1359
- if($_CONFIG['backup_refresh']){
1360
-
1361
- echo "Starting the manual backup process!<br />";
1362
- echo "Database backup: ".$databaseResult."<br /><br />";
1363
-
1364
- if(file_exists($filename))
1365
- {
1366
-
1367
- echo "Backup $filename created, we may continue!<br />";
1368
- #echo "Database backup: ".$databaseResult ."<br />";
1369
- 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>";
1370
- return;
1371
-
1372
- }
1373
- else
1374
- {
1375
-
1376
- E_print( "Backup failed, please check your tar server utility support!");
1377
- return ;
1378
-
1379
- }
1380
-
1381
- }
1382
-
1383
-
1384
- #### END TAR MODE ############################################################
1385
- }
1386
- else{
1387
- #### CREATE BACKUP USING SERVER UTILITIES
1388
- $i=0;
1389
- chdir($_CONFIG['backup_path']);
1390
-
1391
- $excl_files = "";
1392
- while($i<sizeof($excluded)){
1393
- $file = $excluded[$i];
1394
- $file = str_replace($_CONFIG['backup_path'],"",$file);
1395
- $file = "##".$file;
1396
- $file = str_replace("##//","",$file);
1397
- $file = str_replace("##/","",$file);
1398
- $file = str_replace("##","",$file);
1399
-
1400
- $excl_files .= "/".$file."* ";
1401
-
1402
- $i++;
1403
- }
1404
-
1405
-
1406
- chdir($_CONFIG['backup_path']);
1407
-
1408
- $excl_cmd = "";
1409
-
1410
- if($fp = fopen($_CONFIG['exfile_tar'], "w")){
1411
- $i = 0;
1412
- while($i<sizeof($excluded)){
1413
- $file = $excluded[$i];
1414
- $file = str_replace($_CONFIG['backup_path'],"",$file);
1415
- $file = "##".$file;
1416
- $file = str_replace("##//","",$file);
1417
- $file = str_replace("##/","",$file);
1418
- $file = str_replace("##","",$file);
1419
-
1420
- $excl_cmd .= " --exclude=./".$file." ";
1421
-
1422
- $excl_files = "./".$file."\r\n";
1423
- fwrite($fp, $excl_files);
1424
- $i++;
1425
- }
1426
-
1427
- fclose($fp);
1428
- }
1429
-
1430
-
1431
-
1432
- if($_CONFIG['backup_refresh']){
1433
- ########## STARTING THE MANUAL BACKUP ######################################################
1434
-
1435
-
1436
- $exclude = $excl_cmd ." -X ".$_CONFIG['exfile_tar'];
1437
-
1438
- $excl_manual = $_CONFIG['exfile_tar']."_manual";
1439
-
1440
- if($fp = fopen($excl_manual, "w")){
1441
-
1442
- fwrite($fp, $exclude);
1443
-
1444
- fclose($fp);
1445
- }
1446
-
1447
-
1448
-
1449
- echo "Starting the manual backup process!<br />";
1450
- echo "Database backup: ".$databaseResult."<br /><br />";
1451
-
1452
- chdir($_CONFIG['backup_path']);
1453
-
1454
- #$filename = str_replace(".tgz",".tar",$filename);
1455
-
1456
- exec($_CONFIG[tarpath]." $exclude -c".$_CONFIG['tarcompress']."vf $filename ./administrator/backups/index.html");
1457
- exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/database-sql.sql");
1458
- exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/htaccess.txt");
1459
- exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/perm.txt");
1460
-
1461
- if(file_exists($filename))
1462
- {
1463
- echo "Backup $filename created, we may continue!<br />";
1464
- #echo "Database backup: ".$databaseResult."<br />" ;
1465
- 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>";
1466
- return;
1467
- }
1468
- else{
1469
- E_print( "Backup failed, please check your tar server utility support!"); return ;
1470
- }
1471
-
1472
- return;
1473
-
1474
- }
1475
-
1476
-
1477
- if($_REQUEST[cron_dbonly]!=1){
1478
-
1479
- exec($_CONFIG[tarpath]." $excl_cmd "." -X ".$_CONFIG['exfile_tar']." -chv".$_CONFIG['tarcompress']."f $filename ./");
1480
-
1481
- }else{
1482
-
1483
- exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."cvf $filename ./administrator/backups/database-sql.sql");
1484
-
1485
- if(is_array($databases_incl)){
1486
- foreach($databases_incl as $database_name)
1487
- if($database_name!="") {
1488
- exec($_CONFIG[tarpath]." -".$_CONFIG['tarcompress']."vf $filename --update ./administrator/backups/".$database_name."-sql.sql");
1489
- }
1490
- }
1491
-
1492
- }
1493
-
1494
- #######END
1495
-
1496
-
1497
- chdir($_CONFIG['script_path']);
1498
- #### END
1499
- }
1500
-
1501
- if(!file_exists($filename)){
1502
- if($_CONFIG[archive_type]==1)
1503
- echo LM_MSG_BACK_12;
1504
- else
1505
- echo LM_MSG_BACK_13;
1506
- return;
1507
- }
1508
- # format the compressed size of the fileset
1509
- $archiveSize = getFileSizeText(filesize($filename));
1510
-
1511
-
1512
-
1513
- # load presentation layer
1514
- if($option!='nohtml'){
1515
-
1516
- HTML_cloner::generateBackup($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option );
1517
-
1518
- }else{
1519
-
1520
- logxx(HTML_cloner::generateBackup_text($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option ));
1521
-
1522
- }
1523
-
1524
- if(is_array($databases_incl)){
1525
- foreach($databases_incl as $database_name){
1526
- @unlink($_CONFIG['backups_dir']."/".$database_name."-sql.sql");
1527
- }
1528
- }
1529
- @unlink($_CONFIG['backups_dir']."/database-sql.sql");
1530
- @unlink($sql_file);
1531
- @unlink($perm_file);
1532
- @unlink($htaccess);
1533
- @unlink($_CONFIG['exfile']);
1534
- @unlink($_CONFIG['exfile_tar']);
1535
- return $filename1;
1536
-
1537
-
1538
- }
1539
-
1540
- function showHelp( $option ) {
1541
- // ----------------------------------------------------------
1542
- // Display the Help Screen
1543
- // ----------------------------------------------------------
1544
-
1545
- # load presentation layer
1546
- HTML_cloner::showHelp( $option );
1547
- }
1548
-
1549
-
1550
- function multidimsort(&$a)
1551
- {
1552
- sort($a);
1553
- $c = count($a);
1554
- for($i = 0; $i < $c; $i++)
1555
- if (is_array($a[$i]))
1556
- multidimsort($a[$i]);
1557
- }
1558
-
1559
- function compression($ext){
1560
-
1561
- switch ($ext){
1562
-
1563
- case 'tar': $compresion = 'false'; break;
1564
-
1565
- case 'tgz': $compresion = 'true'; break;
1566
-
1567
- default: $compresion = 'false'; break;
1568
-
1569
- }
1570
-
1571
- return $compression;
1572
- }
1573
-
1574
- function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $excluded=array(), $fperm = '') {
1575
- // ----------------------------------------------------------
1576
- // Routine to recurse a folder structure and record the files
1577
- // their sizes and parent folders
1578
- // ----------------------------------------------------------
1579
- global $mdir, $_CONFIG;
1580
-
1581
- $currentfullpath = $_CONFIG['backup_path'].$path;
1582
-
1583
- # Open possibly available directory
1584
- if((is_dir( $currentfullpath ) )&&(!is_link($currentfullpath))) {
1585
- if( $handle = @opendir( $currentfullpath ) ) {
1586
- while( false !== ( $file = readdir( $handle ) ) ) {
1587
- # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1588
- if( ($file != "." && $file != "..") ) {
1589
- $exc =0;
1590
- $cfile = $currentfullpath . "/" . $file;
1591
- if(sizeof($excluded)!=0)
1592
- {
1593
- foreach($excluded as $key=>$value){
1594
-
1595
- if(($value!='')&&(!$exc)){
1596
- $cfile = str_replace("//", "/", $cfile);
1597
- if((strstr($cfile, $value)!='')||(strstr($cfile."/", $value)!='')){
1598
- $exc=1; break;
1599
- }
1600
- }
1601
- }
1602
- }
1603
- if(( @is_dir( $cfile ) ) && (!@is_link($currentfullpath))) {
1604
-
1605
- # Create array for directories
1606
- if(($fperm)&&(!$exc)){
1607
-
1608
- $perm = substr(sprintf('%o', fileperms($cfile)), -4);
1609
-
1610
- fwrite($fperm, str_replace($_CONFIG['backup_path'], "" , $cfile)."|".$perm."\n");
1611
-
1612
- }
1613
-
1614
- #$d_arr[++$d] = $cfile;
1615
-
1616
- if(!$exc)
1617
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $excluded, $fperm);
1618
- } else {
1619
- #if ( in_array($currentfullpath, $includedFolders) )
1620
- {
1621
-
1622
- # Create array for files
1623
-
1624
- if(($fperm)&&(!$exc)){
1625
-
1626
- $perm = substr(sprintf('%o', @fileperms($cfile)), -4);
1627
-
1628
- #$sfile = sprintf("%.2f",get_filesize($cfile)/1024);
1629
-
1630
- fwrite($fperm, str_replace($_CONFIG['backup_path'], "" , $cfile)."|".$perm."\n");
1631
-
1632
- }
1633
- if(!$exc){
1634
-
1635
- #$s_arr[$f] = @filesize($cfile);
1636
-
1637
- if((!$_CONFIG['mem']) && ($_CONFIG['backup_refresh'] != 1 )){
1638
-
1639
- $f_arr[$f++] = $cfile;
1640
-
1641
- }else{
1642
-
1643
- $f++;
1644
-
1645
- }
1646
-
1647
-
1648
- $s += @filesize($cfile);
1649
-
1650
- }
1651
-
1652
-
1653
-
1654
- }
1655
- }
1656
- }
1657
- }
1658
- }
1659
- # Wrap things up if we're in a directory
1660
- #if( is_dir( $currentfullpath ) )
1661
- @closedir( $handle );
1662
- }
1663
- }
1664
-
1665
- function get_filesize($path){
1666
-
1667
- $sizeInBytes = filesize($path);
1668
- if (!$sizeInBytes) {
1669
- $command = "ls -l \"$path\" | cut -d \" \" -f 6";
1670
- $sizeInBytes = @exec($command);
1671
- }
1672
 
1673
- return $sizeInBytes;
1674
-
1675
- }
1676
-
1677
- function getBackupFiles(&$d_arr, &$f_arr, &$s_arr, &$d, &$f) {
1678
- // ----------------------------------------------------------
1679
- // Routine to list the existing backup files in the Component
1680
- // Backup folder
1681
- // ----------------------------------------------------------
1682
- global $_CONFIG;
1683
-
1684
- $path = $_CONFIG['clonerPath'];
1685
- # Open possibly available directory
1686
- if( is_dir( $path ) ) {
1687
- if( $handle = opendir( $path ) ) {
1688
- while( false !== ( $file = readdir( $handle ) ) ) {
1689
- # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1690
- if( $file != "." && $file != ".." && $file[0] != "." ) {
1691
- if( is_dir( $path . "/" . $file ) )
1692
- # Create array for directories
1693
- $d_arr[$d++] = $file;
1694
- else
1695
- if ((strstr($file, '.zip' ))||(strstr($file, '.tgz' ))||(strstr($file, '.tar' ))) {
1696
- # Create array for files
1697
- $f_arr[$f++] = $file;
1698
- }
1699
- }
1700
- }
1701
- }
1702
- }
1703
-
1704
- # Wrap things up if we're in a directory
1705
- if( is_dir( $path ) )
1706
- closedir( $handle );
1707
- sort($f_arr);
1708
- # Print file list
1709
- for( $i=0; $i < count( $f_arr ); $i++ ) {
1710
- $s_arr[$i] = getFileSizeText(get_filesize( $path . "/" . $f_arr[$i] ));
1711
- }
1712
- }
1713
-
1714
-
1715
- function getFileSizeText($filesize) {
1716
- // ----------------------------------------------------------
1717
- // Routine to display a formatted version of a filesize
1718
- // ----------------------------------------------------------
1719
-
1720
- if( $filesize >= 1024 && $filesize < 1048576) {
1721
- # Size in kilobytes
1722
- return round( $filesize / 1024, 2 ) . " KB";
1723
- } elseif( $filesize >= 1048576 ) {
1724
- # Size in megabytes
1725
- return round( $filesize / 1024 / 1024, 2 ) . " MB";
1726
- } else {
1727
- # Size in bytes
1728
- return $filesize . " bytes";
1729
- }
1730
- }
1731
-
1732
- function doBackup( $tables, $OutType, $OutDest, $toBackUp, $UserAgent, $local_backup_path, &$databaseResult, $backupname, $excltables = array(), $dbname) {
1733
- global $database, $mosConfig_db, $mosConfig_sitename, $version,$option,$task, $mosConfig_dbprefix, $_CONFIG,$mosConfig_user,$mosConfig_password,$mosConfig_host;
1734
-
1735
-
1736
- if (!$tables[0])
1737
- {
1738
- $databaseResult = LM_DATABASE_MISSING_TABLES;
1739
- return;
1740
- }
1741
-
1742
-
1743
- /* Determine the mime type and file extension for the output file */
1744
-
1745
- if ($OutType == "zip") {
1746
- $filename = $backupname ."-sql". ".zip";
1747
-
1748
- } elseif ($OutType == "html") {
1749
- $filename = $backupname ."-sql". ".html";
1750
-
1751
- } else {
1752
- $filename = $backupname ."-sql". ".sql";
1753
-
1754
- };
1755
-
1756
-
1757
- $sqlfile = "$local_backup_path/$filename";
1758
- @unlink($sqlfile);
1759
- /* Store all the tables we want to back-up in variable $tables[] */
1760
-
1761
- if ($tables[0] == "all") {
1762
- array_pop($tables);
1763
- $query = mysql_query("SHOW tables");
1764
- while($row = mysql_fetch_array($query)){
1765
-
1766
- $tables_list[] = $row[0];
1767
-
1768
- }
1769
-
1770
-
1771
- $tables = array_merge($tables, $tables_list);
1772
- }
1773
- $newtables = array();
1774
-
1775
- #if(is_array($excltables))
1776
- foreach($tables as $key=>$value){
1777
- if(is_array($excltables)){
1778
- if(!in_array($value, $excltables))
1779
- $newtables[] = $value;
1780
- }
1781
- else
1782
- $newtables[] = $value;
1783
 
1784
- }
1785
-
 
 
 
 
 
1786
 
1787
- if(sizeof($tables) == sizeof($newtables))
1788
- $ex_dump = "";
1789
- else
1790
- $ex_dump = @implode(" ",$newtables);
1791
- $tables = $newtables;
1792
 
1793
- if($_REQUEST['dbbackup_drop']){
1794
- $drop = " --add-drop-table";
1795
- }
1796
- else{
1797
- $drop = "";
1798
- }
1799
-
1800
- if($_REQUEST['dbbackup_comp']){
1801
-
1802
- $drop .= " --compatible=".strtolower($_REQUEST['dbbackup_comp'])." ";
1803
-
1804
- }
1805
-
1806
- if($_CONFIG['sql_mem']){
1807
- exec ($_CONFIG[sqldump]." -h ".$_CONFIG['mysql_host']." -u ".$_CONFIG['mysql_user']." -p".$_CONFIG['mysql_pass']." ".$dbname." > ".$sqlfile ." $drop --allow-keywords ". $ex_dump);
1808
-
1809
- if(filesize($sqlfile))
1810
- $databaseResult = LM_DATABASE_BACKUP_COMPLETED.' ( '.getFileSizeText(filesize($sqlfile)).' )';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1811
  else
1812
- $databaseResult = LM_MSG_BACK_14;
1813
-
1814
- exec("chmod 777 $sqlfile");
1815
-
1816
- return $sqlfile;
1817
- }
1818
-
1819
- /*Added some default values for quotes and auto_increment problems*/
1820
- mysql_query("SET SQL_QUOTE_SHOW_CREATE=1;");
1821
- mysql_query("SET sql_mode = 0;");
1822
-
1823
- if($_REQUEST['dbbackup_comp'])
1824
- {
1825
-
1826
- mysql_query("SET sql_mode=".$_REQUEST['dbbackup_comp'].";");
1827
-
1828
- }
1829
-
1830
-
1831
- /* Store the "Create Tables" SQL in variable $CreateTable[$tblval] */
1832
- if ($toBackUp!="data")
1833
- {
1834
- foreach ($tables as $tblval)
1835
- {
1836
- $query = mysql_query("SHOW CREATE table `$tblval`");
1837
- $row = mysql_fetch_array($query);
1838
- $CreateTable[$tblval] = $row[1];
1839
- }
1840
- }
1841
-
1842
- /* Store all the FIELD TYPES being backed-up (text fields need to be delimited) in variable $FieldType*/
1843
- if ($toBackUp!="structure")
1844
- {
1845
- foreach ($tables as $tblval)
1846
- {
1847
- $query = mysql_query("SHOW FIELDS FROM $tblval");
1848
- while($row = mysql_fetch_row($query)){
1849
-
1850
- $fields[] = $row[0];
1851
-
1852
- }
1853
- foreach($fields as $field)
1854
- {
1855
- $FieldType[$tblval][$field->Field] = preg_replace("/[(0-9)]/",'', $field->Type);
1856
- }
1857
- }
1858
- }
1859
-
1860
-
1861
- if ($OutDest == "local") {
1862
-
1863
-
1864
-
1865
- $fp = fopen($sqlfile, "w");
1866
- if (!$fp) {
1867
- $databaseResult = LM_DATABASE_BACKUP_FAILED;
1868
- return ;
1869
- }
1870
- }
1871
-
1872
- /* Build the fancy header on the dump file */
1873
- $OutBuffer = "";
1874
- if ($OutType == 'html') {
1875
- } else {
1876
- $OutBuffer .= "#\n";
1877
- $OutBuffer .= "# Powered by XCloner Site Backup\n";
1878
- $OutBuffer .= "# http://www.joomlaplug.com\n";
1879
- $OutBuffer .= "#\n";
1880
- $OutBuffer .= "# Host: ".$_SERVER['HTTP_HOST']."\n";
1881
- $OutBuffer .= "# Generation Time: " . date("M j, Y \a\\t H:i") . "\n";
1882
- $OutBuffer .= "# Server version: " . getVersion() . "\n";
1883
- $OutBuffer .= "# PHP Version: " . phpversion() . "\n";
1884
- $OutBuffer .= "# Database : `" . $dbname . "`\n# --------------------------------------------------------\n";
1885
- }
1886
- fwrite($fp, $OutBuffer);
1887
- unset($OutBuffer);
1888
-
1889
- /* Okay, here's the meat & potatoes */
1890
- foreach ($tables as $tblval) {
1891
- if ($toBackUp != "data") {
1892
- if ($OutType == 'html') {
1893
- } else {
1894
- $OutBuffer .= "#\n# Table structure for table `$tblval`\n#\n";
1895
- if($_REQUEST['dbbackup_drop'])
1896
- $OutBuffer .= "#\nDROP table IF EXISTS $tblval;\n";
1897
-
1898
- $OutBuffer .= $CreateTable[$tblval].";\r\n";
1899
- }
1900
- }
1901
- fwrite($fp, $OutBuffer);
1902
- unset($OutBuffer);
1903
-
1904
-
1905
- if ($toBackUp != "structure") {
1906
 
1907
- $OutBuffer .= "#\n# Dumping data for table `$tblval`\n#\n";
1908
- $query = @mysql_query("SELECT * FROM $tblval");
1909
-
1910
- while($row = @mysql_fetch_array($query, MYSQL_ASSOC))
1911
- {
1912
-
1913
- $InsertDump = "INSERT INTO $tblval VALUES (";
1914
- $arr =$row;
1915
- foreach($arr as $key => $value)
1916
- {
1917
- $value = addslashes( $value );
1918
- $value = str_replace( "\n", '\r\n', $value );
1919
- $value = str_replace( "\r", '', $value );
1920
- #if (@preg_match ("/\b" . $FieldType[$tblval][$key] . "\b/i", "DATE TIME DATETIME CHAR VARCHAR TEXT TINYTEXT MEDIUMTEXT LONGTEXT BLOB TINYBLOB MEDIUMBLOB LONGBLOB ENUM SET"))
1921
- {
1922
- $InsertDump .= "'$value',";
1923
- }
1924
- /*else
1925
- {
1926
- $InsertDump .= "'$value',";
1927
- } */
1928
- }
1929
- $OutBuffer .= rtrim($InsertDump,',') . ");\n";
1930
- fwrite($fp, $OutBuffer);
1931
- unset($OutBuffer);
1932
- $i++;
1933
- }
1934
- }
1935
- }
1936
 
1937
  if ($OutDest == "local") {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1938
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1939
 
1940
- #fwrite($fp, $OutBuffer);
1941
- fclose($fp);
 
1942
 
1943
- @chmod($sqlfile, 0777);
1944
 
1945
- $databaseResult = LM_DATABASE_BACKUP_COMPLETED.' ( '.getFileSizeText(filesize($sqlfile)).' )';
1946
- return $sqlfile;
 
 
1947
 
1948
- }
1949
- }
1950
-
1951
-
1952
- function getVersion(){
1953
-
1954
- $query = mysql_query("SELECT version()");
1955
- $row = mysql_fetch_array($query);
1956
- return $row[0];
1957
-
1958
- }
1959
 
 
 
 
 
 
 
1960
  ?>
1
  <?php
2
+ /*
3
+ * cloner.functions.php
4
+ *
5
+ * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ * MA 02110-1301, USA.
21
+ */
22
+
23
+ /*
24
+ * Process the logout request
25
+ * name: doLogout()
26
+ * @param
27
+ * @return
28
+ */
29
+
30
+ /*processing the Logout task*/
31
+ function doLogout()
32
+ {
33
+ if (function_exists('session_unregister')) {
34
+ @session_unregister('clone');
35
+ }
36
+
37
+ unset($_SESSION['clone']);
38
+
39
+ mosRedirect("index.php?option=com_cloner", "");
40
+ }
41
+
42
+ /*Error printing
43
+ *
44
+ * name: E_print
45
+ * @param
46
+ * @return
47
+ */
48
+ function E_print($message)
49
+ {
50
+ print "<center><font color='red' size='4'>$message</font></center>";
51
+ }
52
+
53
+ /*
54
+ * Will send a log output to file
55
+ * name: addLog
56
+ * @param
57
+ * @return
58
+ */
59
+ function addXLog($message){
60
+
61
+ global $flog, $_CONFIG;
62
+
63
+ if($_CONFIG['debug']){
64
+
65
+ $message = strip_tags($message);
66
+
67
+ @fwrite($flog, $message."\n");
68
+
69
  }
70
+
71
+ }
72
+ function openXLog(){
73
+
74
+ global $flog, $_CONFIG;
75
+
76
+ if($_CONFIG['debug']){
77
+
78
+ $flog = @fopen($_CONFIG['logfile'],"a");
79
+
80
+ addXLog("Log output started");
81
+
82
+ }
83
+
84
+ }
85
+ function closeXLog(){
86
+
87
+ global $flog, $_CONFIG;
88
+
89
+ if($_CONFIG['debug']){
90
+
91
+ addXLog("Log output finished");
92
+
93
+ @fclose($flog);
94
+
95
+ }
96
+
97
+ }
98
+ function deleteXLog(){
99
+
100
+ global $_CONFIG;
101
+
102
+ if($_CONFIG['debug']){
103
+
104
+ @unlink($_CONFIG['logfile']);
105
+
106
+ }
107
+
108
+ }
109
+
110
+ /*Simple redirect function*/
111
+ function mosRedirect($url, $msg = "")
112
+ {
113
+ echo "<script type=\"text/javascript\">
114
+
115
+ window.location = \"$url&mosmsg=" . urlencode($msg) . "\";
116
+
117
+ </script>";
118
+
119
+ exit;
120
+ }
121
+
122
+ function fdefault()
123
+ {
124
+ HTML_cloner::_FDefault();
125
+ }
126
+
127
+ function config($option)
128
+ {
129
+ global $mosConfig_absolute_path, $_CONFIG, $config_file;
130
+
131
+
132
+ if (@$_REQUEST['action'] == 'save') {
133
+ //print_r($_REQUEST);exit;
134
+ $databases_incl_list = "";
135
+ if (is_array($_REQUEST['databases_incl']))
136
+ foreach ($_REQUEST['databases_incl'] as $database) {
137
+ $databases_incl_list .= $database . ",";
138
+ }
139
+ if ($fp = @fopen($config_file, 'w')) {
140
+ $cfg = '<?' . 'php' . "\n";
141
+
142
+ $cfg .= '$_CONFIG[\'license_code\']="' . $_REQUEST[license_code] . '";' . "\n";
143
+
144
+ $cfg .= '$_CONFIG[\'backup_path\']="' . $_REQUEST[backup_path] . '";' . "\n";
145
+
146
+ $cfg .= '$_CONFIG[\'clonerPath\']="' . $_REQUEST[clonerPath] . '";' . "\n";
147
+
148
+ $cfg .= '$_CONFIG[\'jcuser\']="' . $_REQUEST[jcuser] . '";' . "\n";
149
+
150
+ if ($_REQUEST['jcpass'] == '') {
151
+ $jcpass = $_CONFIG['jcpass'];
152
+ } else {
153
+
154
+
155
+ $jcpass = md5($_REQUEST['jcpass']);
156
+ }
157
+
158
+ $cfg .= '$_CONFIG[\'jcpass\']=\'' . $jcpass . '\';' . "\n";
159
+
160
+ $cfg .= '$_CONFIG[\'mysql_host\']="' . $_REQUEST[mysql_host] . '";' . "\n";
161
+
162
+ $cfg .= '$_CONFIG[\'mysql_user\']="' . $_REQUEST[mysql_user] . '";' . "\n";
163
+
164
+ $cfg .= '$_CONFIG[\'mysql_pass\']=\'' . $_REQUEST[mysql_pass] . '\';' . "\n";
165
+
166
+ $cfg .= '$_CONFIG[\'mysql_database\']="' . $_REQUEST[mysql_database] . '";' . "\n";
167
+
168
+ $cfg .= '$_CONFIG[\'select_folders\']="' . $_REQUEST[select_folders] . '";' . "\n";
169
+
170
+ $cfg .= '$_CONFIG[\'select_lang\']="' . $_REQUEST[select_lang] . '";' . "\n";
171
+
172
+ $cfg .= '$_CONFIG[\'secure_ftp\']="' . $_REQUEST[secure_ftp] . '";' . "\n";
173
+
174
+ $cfg .= '$_CONFIG[\'backup_compress\']="' . $_REQUEST[backup_compress] . '";' . "\n";
175
+
176
+ $cfg .= '$_CONFIG[\'cron_logemail\']="' . $_REQUEST[cron_logemail] . '";' . "\n";
177
+
178
+ $cfg .= '$_CONFIG[\'cron_exclude\']="' . $_REQUEST[cron_exclude] . '";' . "\n";
179
+
180
+ $cfg .= '$_CONFIG[\'cron_send\']="' . $_REQUEST[cron_send] . '";' . "\n";
181
+
182
+ $cfg .= '$_CONFIG[\'cron_btype\']="' . $_REQUEST[cron_btype] . '";' . "\n";
183
+
184
+ $cfg .= '$_CONFIG[\'cron_bname\']="' . $_REQUEST[cron_bname] . '";' . "\n";
185
+
186
+ $cfg .= '$_CONFIG[\'cron_ip\']="' . $_REQUEST[cron_ip] . '";' . "\n";
187
+
188
+ $cfg .= '$_CONFIG[\'cron_ftp_server\']="' . $_REQUEST[cron_ftp_server] . '";' . "\n";
189
+
190
+ $cfg .= '$_CONFIG[\'cron_ftp_user\']="' . $_REQUEST[cron_ftp_user] . '";' . "\n";
191
+
192
+ $cfg .= '$_CONFIG[\'cron_ftp_pass\']=\'' . $_REQUEST[cron_ftp_pass] . '\';' . "\n";
193
+
194
+ $cfg .= '$_CONFIG[\'cron_ftp_path\']="' . $_REQUEST[cron_ftp_path] . '";' . "\n";
195
+
196
+ $cfg .= '$_CONFIG[\'cron_ftp_delb\']="' . $_REQUEST[cron_ftp_delb] . '";' . "\n";
197
+
198
+ $cfg .= '$_CONFIG[\'databases_incl_list\']="' . $databases_incl_list . '";' . "\n";
199
+
200
+ $cfg .= '$_CONFIG[\'cron_sql_drop\']="' . $_REQUEST[cron_sql_drop] . '";' . "\n";
201
+
202
+ $cfg .= '$_CONFIG[\'cron_email_address\']="' . $_REQUEST[cron_email_address] . '";' . "\n";
203
+
204
+ $cfg .= '$_CONFIG[\'cron_file_delete\']="' . $_REQUEST[cron_file_delete] . '";' . "\n";
205
+
206
+ $cfg .= '$_CONFIG[\'cron_file_delete_act\']="' . $_REQUEST[cron_file_delete_act] . '";' . "\n";
207
+
208
+ $cfg .= '$_CONFIG[\'mem\']="' . $_REQUEST[mem] . '";' . "\n";
209
+
210
+ $cfg .= '$_CONFIG[\'backup_refresh\']="' . $_REQUEST[backup_refresh] . '";' . "\n";
211
+
212
+ $cfg .= '$_CONFIG[\'refresh_time\']="' . $_REQUEST[refresh_time] . '";' . "\n";
213
+
214
+ $cfg .= '$_CONFIG[\'refresh_mode\']="' . $_REQUEST[refresh_mode] . '";' . "\n";
215
+
216
+ $cfg .= '$_CONFIG[\'backup_refresh_number\']="' . $_REQUEST[backup_refresh_number] . '";' . "\n";
217
+
218
+ $cfg .= '$_CONFIG[\'sql_mem\']="' . $_REQUEST[sql_mem] . '";' . "\n";
219
+
220
+ $cfg .= '$_CONFIG[\'enable_db_backup\']="' . $_REQUEST[enable_db_backup] . '";' . "\n";
221
+
222
+ $cfg .= '$_CONFIG[\'zippath\']="' . $_REQUEST[zippath] . '";' . "\n";
223
+
224
+ $cfg .= '$_CONFIG[\'tarpath\']="' . $_REQUEST[tarpath] . '";' . "\n";
225
+
226
+ $cfg .= '$_CONFIG[\'sqldump\']="' . $_REQUEST[sqldump] . '";' . "\n";
227
+
228
+ $cfg .= '$_CONFIG[\'system_dlink\']="' . $_REQUEST[system_dlink] . '";' . "\n";
229
+
230
+ $cfg .= '$_CONFIG[\'mosConfig_live_site\']="' . $_SERVER['HTTP_HOST'] . '";' . "\n";
231
+
232
+ $cfg .= '$_CONFIG[\'system_ftptransfer\']="' . $_REQUEST[system_ftptransfer] . '";' . "\n";
233
+
234
+ $cfg .= '$_CONFIG[\'system_mdatabases\']="' . $_REQUEST[system_mdatabases] . '";' . "\n";
235
+
236
+ $cfg .= '$_CONFIG[\'add_backups_dir\']="' . $_REQUEST[add_backups_dir] . '";' . "\n";
237
+
238
+ $cfg .= '$_CONFIG[\'cron_amazon_active\']="' . $_REQUEST[cron_amazon_active] . '";' . "\n";
239
+
240
+ $cfg .= '$_CONFIG[\'cron_amazon_awsAccessKey\']="' . $_REQUEST[cron_amazon_awsAccessKey] . '";' . "\n";
241
+
242
+ $cfg .= '$_CONFIG[\'cron_amazon_awsSecretKey\']="' . $_REQUEST[cron_amazon_awsSecretKey] . '";' . "\n";
243
+
244
+ $cfg .= '$_CONFIG[\'cron_amazon_bucket\']="' . $_REQUEST[cron_amazon_bucket] . '";' . "\n";
245
+
246
+ $cfg .= '$_CONFIG[\'cron_amazon_dirname\']="' . $_REQUEST[cron_amazon_dirname] . '";' . "\n";
247
+
248
+ $cfg .= '$_CONFIG[\'debug\']="' . $_REQUEST[debug] . '";' . "\n";
249
+
250
+
251
+ $cfg .= '?' . '>';
252
+
253
+ fwrite($fp, $cfg);
254
+
255
+ fclose($fp);
256
+
257
+ $msg = LM_MSG_BACK_1;
258
+
259
+ if ($_REQUEST['cron_save_as'] != "") {
260
+ $fcron = $_CONFIG['multiple_config_dir'] . "/" . $_REQUEST['cron_save_as'] . ".php";
261
+
262
+ if ($fp = @fopen($fcron, "w")) {
263
+ fwrite($fp, $cfg);
264
+
265
+ fclose($fp);
266
+ } else {
267
+
268
+
269
+ $msg = "Unable to save $fcron file, please make sure the folder is writeable!";
270
+ }
271
+ }
272
+
273
+
274
+ //exit;
275
+ mosRedirect('index2.php?option=' . $option . "&task=config", $msg);
276
+ } else {
277
+ $msg = "<font color='red'>ERROR... Unable to write to ".realpath($config_file).", please make it writeable!</font>";
278
+ E_print($msg);
279
+ }
280
+ }
281
+ HTML_cloner::Config($option);
282
+ }
283
+
284
+ //## JoomlaCloner Language Manager
285
+ function translator($option)
286
+ {
287
+ global $mosConfig_absolute_path, $lang_array, $lang_dir;
288
+
289
+ $langs = array();
290
+ $cid = $_REQUEST['cid'];
291
+ $files = $_REQUEST['files'];
292
+
293
+ if (is_array($cid))
294
+ foreach ($cid as $value) {
295
+ $langs[] = $files[$value];
296
+ }
297
+
298
+ if ($_REQUEST['task'] == 'del_lang') {
299
+ foreach ($langs as $lang) {
300
+ @unlink($lang_dir . "/" . $lang . ".php");
301
+ }
302
+
303
+ $msg = LM_LANG_MSG_DEL;
304
+ mosRedirect('index2.php?option=' . $option . "&task=lang", $msg);
305
+ }
306
+
307
+ HTML_cloner::Translator($option, $lang_array);
308
+ }
309
+
310
+ function translator_add($option, $task)
311
+ {
312
+ global $_CONFIG, $lang_array, $lang_dir;
313
+
314
+ if ($task == 'add_lang_new') {
315
+ $lfile = $lang_dir . "/" . strtolower($_REQUEST['lname']) . ".php";
316
+
317
+ if (file_exists($lfile)) {
318
+ $msg = "Language " . $_REQUEST['lname'] . " already exists!";
319
+ } elseif ($fp = @fopen($lfile, 'w')) {
320
+ fwrite($fp, "");
321
+
322
+ fclose($fp);
323
+
324
+ $msg = "Language " . ucfirst($_REQUEST['language']) . " successfully added!";
325
+ } else {
326
+
327
+
328
+ $msg = "File $lfile could not be updated, please check it's permissions'!";
329
+ }
330
+
331
+ mosRedirect('index2.php?option=' . $option . "&task=lang", $msg);
332
+ }
333
+
334
+
335
+ HTML_cloner::Translator_Add($option);
336
+ }
337
+ function translator_edit($option, $task)
338
+ {
339
+ global $_CONFIG, $lang_array, $lang_dir;
340
+
341
+ if (($task == 'save_lang') || ($task == 'save_lang_apply')) {
342
+ $lfile = $lang_dir . "/" . $_REQUEST['language'] . ".php";
343
+
344
+ if ($_REQUEST['language'] == 'english') {
345
+ if ($fp = @fopen($lfile, 'w')) {
346
+ fwrite($fp, stripslashes($_REQUEST['def_content']));
347
+
348
+ fclose($fp);
349
+
350
+ $msg = "Language " . ucfirst($_REQUEST['language']) . " successfully updated!";
351
+ } else {
352
+
353
+
354
+ $msg = "File $lfile could not be created, please check it's permissions'!";
355
+ }
356
+ if ($task == 'save_lang_apply')
357
+ mosRedirect('index2.php?option=' . $option . "&task=edit_lang&langx=" . $_REQUEST['language'], $msg);
358
+ else
359
+ mosRedirect('index2.php?option=' . $option . "&task=lang", $msg);
360
+ } else {
361
+
362
+
363
+ $lfile = $_REQUEST['lfile'];
364
+ $ldata = $_REQUEST['lang'];
365
+
366
+ if ($fp = @fopen($lfile, 'w')) {
367
+ fwrite($fp, "<" . "?php\n");
368
+ foreach ($ldata as $key => $value) {
369
+ fwrite($fp, "define(\"" . $key . "\",\"" . stripslashes($value) . "\");\n");
370
+ }
371
+
372
+ fwrite($fp, "?" . ">");
373
+
374
+ fclose($fp);
375
+
376
+ $msg = "Language " . ucfirst($_REQUEST['language']) . " successfully updated!";
377
+ } else {
378
+
379
+
380
+ $msg = "File $lfile could not be updated, please check it's permissions'!";
381
+ }
382
+ }
383
+ if ($task == 'save_lang_apply')
384
+ mosRedirect('index2.php?option=' . $option . "&task=edit_lang&langx=" . $_REQUEST['language'], $msg);
385
+ else
386
+ mosRedirect('index2.php?option=' . $option . "&task=lang", $msg);
387
+ }
388
+
389
+ $content = "";
390
+ $lang = "";
391
+ $cid = $_REQUEST['cid'];
392
+ $files = $_REQUEST['files'];
393
+
394
+ if (is_array($cid))
395
+ foreach ($cid as $value) {
396
+ $lang = $files[$value];
397
+ }
398
+
399
+ if ($_REQUEST['langx']) {
400
+ $lang = $_REQUEST['langx'];
401
+ }
402
+
403
+ if ($fp = fopen($lang_dir . "/english.php", 'r')) {
404
+ while (!feof($fp)) {
405
+ $content .= fread($fp, 1024);
406
+ }
407
+
408
+ fclose($fp);
409
+ }
410
+
411
+ $file = $lang_dir . "/" . $lang . ".php";
412
+ $dfile = $lang_dir . "/english.php";
413
+
414
+
415
+
416
+ if ($lang == 'english') {
417
+ HTML_cloner::Translator_Edit_DEFAULT($option, $content, $file, $lang);
418
+ } else {
419
+ $def_data = get_lang_data($dfile);
420
+ $cur_data = get_lang_data($file);
421
+
422
+ $data = array_merge($def_data, $cur_data);
423
+
424
+ HTML_cloner::Translator_Edit($option, $data, $def_data, $file, $lang);
425
+ }
426
+ }
427
+
428
+ function get_lang_data($file)
429
+ {
430
+ global $_CONFIG;
431
+
432
+ if ($fp = fopen($file, 'r')) {
433
+ while (!feof($fp)) {
434
+ $content .= fread($fp, 1024);
435
+ }
436
+
437
+ fclose($fp);
438
+ }
439
+
440
+ $data = array();
441
+
442
+ $tmp = explode("define(\"", $content);
443
+ foreach ($tmp as $key => $value) {
444
+ $temp = explode("\",", $value);
445
+
446
+ $tst = explode("\");", $temp[1]);
447
+ $data[$temp[0]] = substr(trim($tst[0]), 1, strlen($tst[0]));
448
+ }
449
+
450
+ return $data;
451
+ }
452
+
453
+ function get_avalaible_langs()
454
+ {
455
+ global $_CONFIG, $lang_dir;
456
+
457
+ $lang_arr = array();
458
+
459
+ if ($handle = @opendir($lang_dir)) {
460
+ /* This is the correct way to loop over the directory. */
461
+ while (false !== ($file = readdir($handle)))
462
+ if (($file != 'index.html') && ($file != '..') && ($file != '.')) {
463
+ $lang_arr[] = str_replace(".php", "", $file);
464
+ }
465
+
466
+ closedir($handle);
467
+ }
468
+
469
+ return $lang_arr;
470
+ }
471
+
472
+
473
+ function goRecurseFiles(){
474
+
475
+ global $_CONFIG;
476
 
477
+ include_once("classes/fileRecursion.php");
478
+
479
+ $status['finished'] = "1";
480
+ $status['task'] = $_REQUEST['task'];
481
+
482
+ $handle = new fileRecursion();
483
+
484
+ $TEMP_PERM = $_CONFIG['backups_dir']."/perm.txt";
485
+ $TEMP_EXCL = $_CONFIG['exfile'];
486
+ $TEMP_D_ARR = $_CONFIG['backups_dir']."/.dir";
487
+ $TEMP_DIR = $_CONFIG['clonerPath'];
488
+ $START_DIR = $_CONFIG['backup_path'];
489
+
490
+ $handle->setData($TEMP_PERM,$TEMP_EXCL,$TEMP_D_ARR,$TEMP_DIR, $START_DIR);
491
+
492
+ if($_REQUEST['mode'] == 'start')
493
+ $handle->init($_CONFIG['backup_path']);
494
+ else
495
+ $handle->init();
496
+
497
+ $handle->start();
498
+ $handle->end();
499
+
500
+ $data = $handle->countPermFiles();
501
+
502
+ $status['size'] = $data['size'];
503
+ $status['tfiles'] = $data['count'];
504
+ $status['mode'] = "";
505
+
506
+ if(!$handle->isQueueFinished())
507
+ $status['finished'] = "0";
508
+
509
+
510
+
511
+ echo json_encode($status);
512
+ exit;
513
+
514
+ }
515
+
516
+ function showBackups($option)
517
+ {
518
+ // ----------------------------------------------------------
519
+ // Generate a selectable list of the files in Backup Folder
520
+ // ----------------------------------------------------------
521
+ global $_CONFIG;
522
+
523
+ if (!is_dir($_CONFIG['clonerPath'])) {
524
+ E_print("Your backup directory " . $_CONFIG['clonerPath'] . " is not correct! Unable to continue...");
525
+ return;
526
+ }
527
+
528
+ // initialise list arrays, directories and files separately and array counters for them
529
+ $d_arr = array();
530
+ $d = 0;
531
+ $f_arr = array();
532
+ $f = 0;
533
+ $s_arr = array();
534
+ $s = 0;
535
+
536
+ // obtain the list of backup archive files
537
+ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
538
+
539
+ // load presentation layer
540
+ HTML_cloner::showBackups($f_arr, $s_arr, $_CONFIG['clonerPath'], $option);
541
+ }
542
+
543
+ function moveBackup($option)
544
+ {
545
+ global $task;
546
+ $files_out = array();
547
+ if (is_array($_REQUEST[files])) {
548
+ foreach ($_REQUEST[files] as $key => $value)
549
+ if ($_REQUEST[cid][$key] != "")
550
+ $files_out[] = $value;
551
+ }
552
+
553
+ if ($_REQUEST['action'] == "connect") {
554
+ $ret = start_connect($_REQUEST[files]);
555
+ }
556
+ if (!$ret)
557
+ HTML_cloner::TransferForm($option, $files_out);
558
+ }
559
+
560
+ function start_connect($files)
561
+ {
562
+ global $task, $_CONFIG;
563
+
564
+
565
+ if (($_REQUEST[task] == 'move') || ($_REQUEST[task2] == 'move')) {
566
+ } else {
567
+
568
+ $source_file[0] = "restore/XCloner.php";
569
+ $destination_file[0] = $_REQUEST[ftp_dir] . "/XCloner.php";
570
+
571
+ $source_file[1] = "restore/TAR.php";
572
+ $destination_file[1] = $_REQUEST[ftp_dir] . "/TAR.php";
573
+ }
574
+
575
+ foreach ($files as $file) {
576
+ $source_file[] = $_CONFIG['clonerPath'] . "/" . $file;
577
+ $destination_file[] = $_REQUEST[ftp_dir] . "/" . $file;
578
+ }
579
+
580
+
581
+
582
+ list($fhost, $fport) = explode(":", $_REQUEST[ftp_server]);
583
+ if ($fport == "")
584
+ $fport = '21';
585
+
586
+ $ftp_timeout = '3600';
587
+ // set up basic connection
588
+ if (!$_CONFIG[secure_ftp]) {
589
+ $conn_id = ftp_connect($fhost, (int)$fport, (int)$ftp_timeout);
590
+ $connect = "Normal";
591
+ } else {
592
+
593
+ $conn_id = ftp_ssl_connect($fhost, (int)$fport, (int)$ftp_timeout);
594
+ $connect = "Secure";
595
+ }
596
+
597
+ // login with username and password
598
+ $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]);
599
+
600
+ // check connection
601
+ if ((!$conn_id) || (!$login_result)) {
602
+ echo "<b style='color:red'>" . LM_MSG_BACK_2 . "</b>";
603
+ echo "<b style='color:red'>Attempted to connect to " . $_REQUEST[ftp_server] . " for user " . $_REQUEST[ftp_user] . "</b>";
604
+ return;
605
+ } else {
606
+ //echo "Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user]";
607
+ }
608
+
609
+ if ($_CONFIG[system_ftptransfer] == 1) {
610
+ // turn passive mode on
611
+ @ftp_pasv($conn_id, true);
612
+ $mode = "Passive";
613
+ } else {
614
+ // turn passive mode off
615
+ @ftp_pasv($conn_id, false);
616
+ $mode = "Active";
617
+ }
618
+
619
+ echo "Connected to $connect ftp server <b>$_REQUEST[ftp_server] - $mode Mode</b><br />";
620
+ for ($i = 0; $i < sizeof($source_file); $i++) {
621
+ echo "<br />Moving source file <b>" . $source_file[$i] . "</b>";
622
+ // upload the file
623
+ if (!$_REQUEST['ftp_inct']) {
624
+ $ret = ftp_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY);
625
+
626
+ if ($ret)
627
+ echo "<br /><b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
628
+ else {
629
+ echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";
630
+ return;
631
+ }
632
+ }
633
+
634
+ if ($_REQUEST['ftp_inct']) {
635
+ $size = get_filesize($source_file[$i]);
636
+ $dsize = ftp_size($conn_id, $destination_file[$i]);
637
+ $perc = sprintf("%.2f", ($dsize * 100) / $size);
638
+
639
+ echo " - uploaded $perc% from $size bytes <br>";
640
+ $ret = ftp_nb_put($conn_id, $destination_file[$i], $source_file[$i], FTP_BINARY, FTP_AUTORESUME);
641
+
642
+
643
+
644
+ // check upload status
645
+ if ($ret == FTP_FAILED) {
646
+ echo "<b style='color:red'>FTP upload has failed for file $destination_file[$i] ! Stopping ....<br /></b>";
647
+ return;
648
+ } else {
649
+ $j = 1;
650
+
651
+ while ($ret == FTP_MOREDATA) {
652
+ // Do whatever you want
653
+ //echo ". ";
654
+
655
+
656
+ // Continue uploading...
657
+ $ret = ftp_nb_continue($conn_id);
658
+
659
+ if ($j++ % 500 == 0) {
660
+ @ftp_close($conn_id);
661
+
662
+ echo "<script>
663
+ var sURL = unescape('" . $_SERVER[REQUEST_URI] . "');
664
+
665
+ function refresh()
666
+ {
667
+ // This version of the refresh function will cause a new
668
+ // entry in the visitor's history. It is provided for
669
+ // those browsers that only support JavaScript 1.0.
670
+ //
671
+ window.location.href = sURL;
672
+ }
673
+
674
+ setTimeout( \"refresh()\", 2*1000 );
675
+
676
+ </script>";
677
+ return 1;
678
+
679
+ break;
680
+ }
681
+ }
682
+ if ($ret == FTP_FINISHED) {
683
+ echo "<b>Upload success to <i>$destination_file[$i]</i> ...<br /></b>";
684
+ }
685
+ }
686
+ }
687
+ }
688
+ // close the FTP stream
689
+ @ftp_close($conn_id);
690
+
691
+ $redurl = $_REQUEST[ftp_url] . "/XCloner.php";
692
+
693
+ if ((substr($redurl, 0, 7) != "http://") && (substr($redurl, 0, 8) != "https://"))
694
+ $redurl = "http://" . trim($redurl);
695
+
696
+ if ($_REQUEST['ftp_inct']) {
697
+ if ($_REQUEST['refresh_done'] != 1) {
698
+ echo "<script>
699
+ var sURL = unescape('" . $_SERVER[REQUEST_URI] . "&refresh_done=1');
700
+
701
+ function refresh()
702
+ {
703
+ // This version of the refresh function will cause a new
704
+ // entry in the visitor's history. It is provided for
705
+ // those browsers that only support JavaScript 1.0.
706
+ //
707
+ window.location.href = sURL;
708
+ }
709
+
710
+ setTimeout( \"refresh()\", 2*1000 );
711
+
712
+ </script>";
713
+ return 1;
714
+ }
715
+ } else {
716
+
717
+
718
+ $_REQUEST['refresh_done'] = 1;
719
+ }
720
+ if ($_REQUEST['refresh_done'] == 1)
721
+ if (($_REQUEST[task] == 'move') || ($_REQUEST[task2] == 'move')) {
722
+ echo "<br><br><h2>" . LM_MSG_BACK_3 . "</h2>";
723
+ return 1;
724
+ } else {
725
+
726
+ echo "<br><br><h2>" . LM_MSG_BACK_4 . " <br /><a href='" . $redurl . "'>click here to continue...</a></h2>";
727
+ return 1;
728
+ }
729
+
730
+
731
+ return 0;
732
+ }
733
+ function copyls($source, $dest)
734
+ {
735
+ $handle = fopen($dest, "a");
736
+ if ($handle) {
737
+ fclose($handle);
738
+ return 1;
739
+ } else {
740
+
741
+ return 0;
742
+ }
743
+ }
744
+
745
+ function action($option)
746
+ {
747
+ global $_CONFIG;
748
+
749
+ $userfile = $_CONFIG['baDownloadPath'] . "/" . $_REQUEST[file];
750
+ $localfile = $_CONFIG['clonerPath'] . "/" . $_REQUEST[file];
751
+
752
+
753
+ if ($_REQUEST[action] == 'delete') {
754
+ if (@unlink($userfile))
755
+ $msg = LM_MSG_BACK_5;
756
+ else
757
+ $msg = LM_MSG_BACK_6;
758
+ } elseif ($_REQUEST[action] == 'copy') {
759
+ if (@copyls($localfile, $userfile))
760
+ $msg = LM_MSG_BACK_7;
761
+ else
762
+ $msg = LM_MSG_BACK_8;
763
+ }
764
+ mosRedirect('index2.php?option=' . $option . "&task=view", $msg);
765
+ }
766
+
767
+ function clone_rename($option)
768
+ {
769
+ global $_CONFIG;
770
+
771
+ if ($_REQUEST[task] == 'rename_save') {
772
+ $files = $_REQUEST['cfile'];
773
+ foreach ($files as $key => $value) {
774
+ @rename($_CONFIG[clonerPath] . "/" . $_REQUEST[cfile][$key], $_CONFIG[clonerPath] . "/" . $_REQUEST[dfile][$key]);
775
+ @rename($_CONFIG[baDownloadPath] . "/" . $_REQUEST[cfile][$key], $_CONFIG[baDownloadPath] . "/" . $_REQUEST[dfile][$key]);
776
+ }
777
+
778
+ $msg = LM_MSG_BACK_9;
779
+ mosRedirect('index2.php?option=' . $option . "&task=view", $msg);
780
+ }
781
+
782
+ $files = array();
783
+
784
+ foreach ($_REQUEST[cid] as $key => $value) {
785
+ $files[] = $_REQUEST[files][$key];
786
+ }
787
+
788
+
789
+
790
+ HTML_Cloner::rename($files, $option);
791
+ }
792
+ function downloadBackup($file)
793
+ {
794
+ global $_CONFIG;
795
+
796
+ $file = $_CONFIG['clonerPath'] . "/$file";
797
+
798
+ //First, see if the file exists
799
+ if (!is_file($file)) {
800
+ die("<b>404 File $file was not found!</b>");
801
+ }
802
+
803
+ //File Info
804
+ $len = get_filesize($file);
805
+ $filename = basename($file);
806
+ $file_extension = strtolower(substr(strrchr($filename, "."), 1));
807
+
808
+ //Setam Content-Type-urile pentru fisierul in cauza
809
+ switch ($file_extension) {
810
+ case "pdf":
811
+ $ctype = "application/pdf";
812
+ break;
813
+ case "exe":
814
+ $ctype = "application/octet-stream";
815
+ break;
816
+ case "zip":
817
+ $ctype = "application/zip";
818
+ break;
819
+ case "doc":
820
+ $ctype = "application/msword";
821
+ break;
822
+ case "xls":
823
+ $ctype = "application/vnd.ms-excel";
824
+ break;
825
+ case "ppt":
826
+ $ctype = "application/vnd.ms-powerpoint";
827
+ break;
828
+ case "gif":
829
+ $ctype = "image/gif";
830
+ break;
831
+ case "png":
832
+ $ctype = "image/png";
833
+ break;
834
+ case "jpeg":
835
+ case "jpg":
836
+ $ctype = "image/jpg";
837
+ break;
838
+ case "mp3":
839
+ $ctype = "audio/mpeg";
840
+ break;
841
+ case "wav":
842
+ $ctype = "audio/x-wav";
843
+ break;
844
+ case "mpeg":
845
+ case "mpg":
846
+ case "mpe":
847
+ $ctype = "video/mpeg";
848
+ break;
849
+ case "mov":
850
+ $ctype = "video/quicktime";
851
+ break;
852
+ case "avi":
853
+ $ctype = "video/x-msvideo";
854
+ break;
855
+
856
+ default:
857
+ $ctype = "application/force-download";
858
+ }
859
+
860
+ //Writing Headers
861
+ header("Pragma: public");
862
+ header("Expires: 0");
863
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
864
+ header("Cache-Control: public");
865
+ header("Content-Description: File Transfer");
866
+
867
+ //Content-Type-ul
868
+ header("Content-Type: $ctype");
869
+
870
+ //Force Download
871
+ $header = "Content-Disposition: attachment; filename=" . $filename . ";";
872
+ header($header);
873
+ header("Content-Transfer-Encoding: binary");
874
+ header("Content-Length: " . $len);
875
+ @readfile($file);
876
+ exit;
877
+ }
878
+
879
+
880
+ function confirmBackup($option)
881
+ {
882
+ // ----------------------------------------------------------
883
+ // Routine to display a confirmation screen prior to backup
884
+ // containing the selectable folders and a confirmation for
885
+ // backing up the database
886
+ // ----------------------------------------------------------
887
+ global $_CONFIG;
888
+
889
+ if (!is_writeable($_CONFIG['clonerPath'])) {
890
+ E_print("Your backup directory $_CONFIG[clonerPath] is not writeable or does not exists(Backup Store Path:)! <br />Please note, the ./administrator/backups/ folder needs to be created and made writeable!");
891
+ return;
892
+ }
893
+
894
+ // Initialise list arrays, directories and files separately and array counters for them
895
+ $excludedFolders = array();
896
+ $d_arr = array();
897
+ $d = 0;
898
+ $ds_arr = array();
899
+ $f_arr = array();
900
+ $f = 0;
901
+ $s_arr = array();
902
+ $s = 0;
903
+ $d_arr[$d] = $_CONFIG['backup_path'];
904
+
905
+ //if($_CONFIG['select_folders']==0){
906
+ // obtain the list of folders by recursing the mambo file store
907
+ //recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders, '');
908
+ //}
909
+
910
+ if ($_CONFIG['select_folders'] == 2)
911
+ if ($fp = @fopen($_CONFIG['exfile'], 'w')) {
912
+ $excl = explode("\r\n", $_CONFIG['cron_exclude']);
913
+ foreach ($excl as $value)
914
+ if ($value != "") {
915
+ $value = str_replace($_CONFIG['backup_path'], "", $value);
916
+ if ($value[0] != '/')
917
+ $value = '/' . $value;
918
+
919
+ if ((substr($value, strlen($value) - 1, 1) == '/') && (strlen($value) != 1))
920
+ $value = substr($value, 0, strlen($value) - 1);
921
+
922
+ fwrite($fp, $value . "\r\n");
923
+ }
924
+ fclose($fp);
925
+ }
926
+
927
+ // load presentation layer
928
+ if ($option != 'nohtml')
929
+ HTML_cloner::confirmBackups($d_arr, $ds_arr, $_CONFIG['clonerPath'], $option);
930
+ else
931
+ return $d_arr;
932
+ }
933
+
934
+
935
+ function deleteBackups($cid, $option)
936
+ {
937
+ // ----------------------------------------------------------
938
+ // Routine to delete the Backup Sets selected in the list
939
+ // backup sets screen
940
+ // ----------------------------------------------------------
941
+ global $_CONFIG;
942
+
943
+
944
+ // Cycle through all the selected Backups and Deleted them
945
+ foreach ($cid as $key => $value) {
946
+ $file = $_CONFIG['clonerPath'] . '/' . $_REQUEST['f' . $value];
947
+
948
+
949
+ if (unlink($file)) {
950
+ $msg .= $_REQUEST['f' . $value] . ' - ' . LM_DELETE_FILE_SUCCESS;
951
+ } else {
952
+ $msg .= $_REQUEST['f' . $value] . ' - ' . LM_DELETE_FILE_FAILED;
953
+ }
954
+ }
955
+
956
+ // redirect to list screen
957
+ //$msg = _DELETE_FILE_SUCCESS;
958
+ mosRedirect('index2.php?option=' . $option . "&task=view", $msg);
959
+ }
960
+
961
+ function generateBackuprefresh($cid, $option, $backup_filename, $json = 0)
962
+ {
963
+ global $_CONFIG;
964
+ global $databases_incl, $back_path, $sql_file, $perm_file, $htaccess;
965
+
966
+ $log = "";
967
+
968
+ $backup_file = $_CONFIG['clonerPath']."/".$backup_filename ;
969
+
970
+ $perm_file = $_CONFIG['backups_dir'] . "/perm.txt";
971
+
972
+
973
+ $lines = $_REQUEST['lines'];
974
+
975
+ $fperm = fopen($perm_file, "r");
976
+
977
+
978
+ $startf = (int)$_REQUEST['startf'];
979
+
980
+ $endf = $startf + $_CONFIG['backup_refresh_number'];
981
+
982
+ $excluded_cmd = "";
983
+
984
+ if ($fp = @fopen($_REQUEST['excl_manual'], "r")) {
985
+ while (!feof($fp))
986
+ $excluded_cmd .= fread($fp, 1024);
987
+
988
+ fclose($fp);
989
+ }
990
+
991
+
992
+ $url = "index2.php?option=com_cloner&task=refresh&json=$json&startf=$endf&lines=$lines&backup=$backup_filename&excl_manual=" . $_REQUEST['excl_manual'];
993
+
994
+
995
+ if ($endf >= $lines)
996
+ $endf = $lines;
997
+ else
998
+ $log .= "Continue link: <a href='$url'>click here&gt;&gt;</a><br />\n";
999
+
1000
+ if ((int)$lines != 0)
1001
+ $percent = sprintf("%d", ($endf * 100) / (int)$lines);
1002
+
1003
+
1004
+ $log .= "Total process: $percent% out of $lines files<br />\n";
1005
+ $log .= "Processing files $startf to $endf for backup file $backup_file!<br />\n";
1006
+ $log .= "Current backup size: " . getFileSizeText(get_filesize($backup_file)) . "<br /><br />\n";
1007
+
1008
+ chdir($_CONFIG['backup_path']);
1009
+
1010
+ if ($fperm) {
1011
+ while ((!feof($fperm)) && ($line < $endf)) {
1012
+ $line++;
1013
+
1014
+ $buffer = explode("|", fgets($fperm, 4096));
1015
+
1016
+ if (($line < $endf) && ($line >= $startf)) {
1017
+ $log .= "\n<br />$line. ";
1018
+
1019
+ if (($buffer[0] != "") && (is_file($buffer[0]))) {
1020
+ $file = $buffer[0];
1021
+
1022
+ //## appending files
1023
+ $log .= "file - $file";
1024
+
1025
+
1026
+ if (!$_CONFIG['mem']) {
1027
+ //### CREATE BACKUP USING TAR LIBRARIES
1028
+ $file_path_full = $buffer[0];
1029
+
1030
+ {
1031
+ //$return = PclTarAddList($backup_file, array($file_path_full), '', $_CONFIG['backup_path'], "tar");
1032
+ $tar_object = new Archive_Tar($backup_file);
1033
+ $return = $tar_object->addModify(array($file_path_full), '', $_CONFIG['backup_path']);
1034
+
1035
+ }
1036
+
1037
+ //### END TAR #########################
1038
+ } else {
1039
+
1040
+ //### CREATE BACKUP USING SERVER UTILITIES
1041
+
1042
+ $file = str_replace(" ", "\ ", $file);
1043
+
1044
+ exec($_CONFIG[tarpath] . " $excluded_cmd -" . $_CONFIG['tarcompress'] . "vf $backup_file --update $file");
1045
+
1046
+
1047
+ //### END SERVER UTILITIES
1048
+ }
1049
+ } else {
1050
+
1051
+
1052
+ $log .= "directory - <b>" . $buffer[0] . "</b>";
1053
+ }
1054
+ }
1055
+ }
1056
+
1057
+ //exit;
1058
+ $newFileSize = getFileSizeText(get_filesize($backup_file));
1059
+ $log .= "\n<br />New backup size: " . $newFileSize . "<br />\n";
1060
+
1061
+ addXLog($log);
1062
+
1063
+
1064
+ if ($endf >= $lines) {
1065
+ //# ALL DONE
1066
+ $log .= LM_MSG_BACK_11;
1067
+ @fclose($fperm);
1068
+ } else {
1069
+
1070
+ //# REDIRECTING
1071
+ @fclose($fperm);
1072
+
1073
+ $log .= "<br>All done, redirecting in " . $_CONFIG['refresh_time'] . " seconds, or <a href='$url'>click here </a>";
1074
+
1075
+ $log .= "
1076
+ <script language='javascript'>
1077
+ function redirect(){
1078
+ window.location = '" . $url . "';
1079
+ }
1080
+
1081
+ setTimeout(\"redirect()\"," . $_CONFIG['refresh_time'] . "000);
1082
+
1083
+ </script>";
1084
+ }
1085
+ } else {
1086
+
1087
+
1088
+ $log .= "Unable to continue, could not open file $perm_file for reading!";
1089
+ }
1090
+
1091
+ if ($endf >= $lines) {
1092
+ $back_path = $_CONFIG['backups_dir'];
1093
+ @unlink($back_path . "/database-sql.sql");
1094
+ @unlink($back_path . "/perm.txt");
1095
+ @unlink($back_path . "/htaccess.txt");
1096
+ @unlink($back_path . "/.excl");
1097
+ @unlink($back_path . "/.excl_tar");
1098
+ $status['finished'] = 1;
1099
+ }
1100
+
1101
+ if(!$json){
1102
+ echo $log;
1103
+ }
1104
+ else{
1105
+ $status['backupSize'] = $newFileSize;
1106
+ $status['percent'] = $percent;
1107
+ $status['option'] = 'com_cloner';
1108
+ $status['task'] = 'refresh';
1109
+ $status['json'] = $json;
1110
+ $status['startf'] = $endf;
1111
+ $status['lines'] = $lines;
1112
+ $status['backup'] = $backup_filename;
1113
+ $status['excl_manual'] = $_REQUEST['excl_manual'];
1114
+
1115
+ echo json_encode($status);
1116
+ exit;
1117
+
1118
+ }
1119
+
1120
+ return;
1121
+ }
1122
+
1123
+
1124
+ function generateBackup($cid, $option)
1125
+ {
1126
+ // ----------------------------------------------------------
1127
+ // Routine to generate recurse a folder structure and record
1128
+ // the files, their sizes and parent folders
1129
+ // ----------------------------------------------------------
1130
+ global $_CONFIG;
1131
+
1132
+ // generate database backup if required
1133
+
1134
+ if (!$_CONFIG['enable_db_backup']) {
1135
+ $backupDatabase = 0;
1136
+ } else {
1137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1138
 
1139
+ $backupDatabase = $_REQUEST['dbbackup'];
1140
+ }
1141
 
1142
+ if ($_REQUEST[cron_access]) {
1143
+ $_CONFIG['backup_refresh'] = 0;
1144
 
1145
+ $_REQUEST['dbbackup_drop'] = $_CONFIG['cron_sql_drop'];
1146
 
1147
+ if ($_CONFIG[cron_btype] == '1')
1148
+ $backupDatabase = 0;
1149
+ }
1150
 
1151
 
1152
+ if (!is_writeable($_CONFIG['clonerPath'])) {
1153
+ E_print("Your backup directory " . $_CONFIG['clonerPath'] . " is not writeable or does not exists!");
1154
+ return;
1155
+ }
1156
+ if (!is_writeable($_CONFIG['backups_dir'])) {
1157
+ E_print("Required sql backup directory " . $_CONFIG['backups_dir'] . " is not writeable or does not exists!");
1158
+ return;
1159
+ }
1160
+
1161
+
1162
+ // generate the backup set filename
1163
+ //$urlinfo = parse_url($mosConfig_live_site);
1164
+ //$domainname = strtolower(str_replace('.','_',$urlinfo[host]));
1165
+ //$domainname= $_SERVER['HTTP_HOST'];
1166
+ $domainname = $_CONFIG['mosConfig_live_site'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1167
 
 
 
1168
 
1169
+ if (($_CONFIG['mem']) && ($_CONFIG['backup_refresh'])) {
1170
+ $f_ext = '.tar';
1171
+ $_CONFIG['tarcompress'] = '';
1172
+ } elseif ($_CONFIG['backup_compress']) {
1173
+ $f_ext = '.tgz';
1174
+ $_CONFIG['tarcompress'] = 'z';
1175
+ } else {
1176
 
 
1177
 
1178
+ $f_ext = '.tar';
1179
+ $_CONFIG['tarcompress'] = '';
1180
+ }
1181
+
1182
+ /*if($_CONFIG['backup_refresh']){
1183
+ $f_ext = ".tar";
1184
+ }
1185
+ elseif($_REQUEST[cron_dbonly]){
1186
+ $f_ext = ".tar";
1187
+ }
1188
+ else{
1189
+ $f_ext = ".tgz";
1190
+ }*/
1191
+
1192
+ if ($_REQUEST['bname'] == "") {
1193
+ if ($backupDatabase == 1) {
1194
+ if ($_REQUEST['dbbackup_drop']) {
1195
+ $filename1 = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-sql-drop' . $f_ext;
1196
+ } else {
1197
+
1198
+ $filename1 = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-sql-nodrop' . $f_ext;
1199
+ }
1200
+ } else
1201
+ $filename1 = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-nosql' . $f_ext;
1202
+ } else {
1203
+
1204
+ $filename1 = $_REQUEST['bname'] . $f_ext;
1205
+ }
1206
+
1207
+ $sql_file = array();
1208
+
1209
+ if ($backupDatabase == 1) {
1210
+ $tables = array();
1211
+ $tables[0] = 'all';
1212
+ $excltables = $_REQUEST['excltables'];
1213
+
1214
+ $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult, 'database', $excltables, $_CONFIG['mysql_database']);
1215
+
1216
+ $databaseResult = "<b>" . $_CONFIG['mysql_database'] . ":</b> " . $databaseResult;
1217
+ //############# ADD multiple databases #######################
1218
+ $databases_incl = $_REQUEST['databases_incl'];
1219
+
1220
+ if (is_array($databases_incl)) {
1221
+ foreach ($databases_incl as $database_name)
1222
+ if ($database_name != '') {
1223
+ $excltables = "";
1224
+ mysql_query("USE $database_name");
1225
+
1226
+ $sql_file[] = doBackup($tables, 'sql', 'local', 'both', $_SERVER['HTTP_USER_AGENT'], $_CONFIG['backups_dir'], $databaseResult_incl, $database_name, $excltables, $database_name);
1227
+
1228
+ $databaseResult .= "<br /> <b>$database_name:</b> " . $databaseResult_incl;
1229
+ }
1230
+
1231
+ mysql_query("USE " . $_CONFIG['mysql_database']);
1232
+ }
1233
+ } else {
1234
+ $databaseResult = LM_DATABASE_EXCLUDED;
1235
+ }
1236
+
1237
 
1238
+ $excluded = array();
1239
 
1240
+ $data = "";
1241
 
1242
+ $excluded[] = $_CONFIG['backups_dir'] . "/" . $filename1;
1243
 
1244
+ if ($_REQUEST['cron_access']) {
1245
+ $data = $_CONFIG['cron_exclude'];
1246
+ } elseif ($_CONFIG[select_folders] == 1) {
1247
+ $data = $_REQUEST['exluded'];
1248
+ }
1249
 
1250
+ //#### START THE EXCLUSION FILTER
1251
+ if (($fp = @fopen($_CONFIG['exfile'], "r")) && (!$_REQUEST['cron_access'])) {
1252
+ while (!feof($fp)) {
1253
+ $data .= fread($fp, 1024);
1254
+ }
1255
  fclose($fp);
1256
+ }
1257
+
1258
+ if (sizeof($_REQUEST[cid]) > 0)
1259
+ $data .= implode("\r\n", $_REQUEST[cid]);
1260
+
1261
+ $_COOKIES = explode("\r\n", $data);
1262
+
1263
+
1264
+ if (is_array($_COOKIES))
1265
+ foreach ($_COOKIES as $key => $value)
1266
+ if ($value != "") {
1267
+ $value = str_replace($_CONFIG['backup_path'], "", $value);
1268
+ if ($value[0] != '/')
1269
+ $value = '/' . $value;
1270
+
1271
+ if ((substr($value, strlen($value) - 1, 1) == '/') && (strlen($value) != 1))
1272
+ $value = substr($value, 0, strlen($value) - 1);
1273
+
1274
+ if (($value != "") && ($value != '/administrator/backups')) {
1275
+ if (trim($value) != '/administrator')
1276
+ $excluded[] = str_replace("//", "/", $_CONFIG['backup_path'] . "/" . $value);
1277
+ else {
1278
+
1279
+ if ($handle = opendir($_CONFIG['backup_path'] . '/administrator')) {
1280
+ while (false !== ($file = readdir($handle))) {
1281
+ if ($file != "." && $file != ".." && $file != "backups") {
1282
+ $excluded[] = str_replace("//", "/", $_CONFIG['backup_path'] . "/administrator/" . $file);
1283
+ }
1284
+ }
1285
+ closedir($handle);
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ //### END EXCLUSION FILTER
1291
+
1292
+ if (!$_CONFIG['add_backups_dir']) {
1293
+ // initialise list arrays, directories and files separately and array counters for them
1294
+ $d_arr = array();
1295
+ $d = 0;
1296
+ $f_arr = array();
1297
+ $f = 0;
1298
+ $s_arr = array();
1299
+ $s = 0;
1300
+
1301
+ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
1302
+ $i = 0;
1303
+ while ($i < sizeof($f_arr)) {
1304
+ $excluded[] = $_CONFIG['clonerPath'] . "/" . $f_arr[$i];
1305
+ $i++;
1306
  }
1307
+ }
1308
+ // obtain list of folders included in the backup
1309
+ $includeFolder = array();
1310
+
1311
+ //print_r($excluded);exit;
1312
+
1313
+ //$includeFolder = confirmBackup('nohtml');
1314
+
1315
+ //initialise list arrays, directories and files separately and array counters for them
1316
+ $d_arr = array();
1317
+ $d = 0;
1318
+ $ds_arr = array();
1319
+ $f_arr = array();
1320
+ $f = 0;
1321
+ $s_arr = array();
1322
+ $s = 0;
1323
+ $mdir = 0;
1324
+
1325
+ if(($_REQUEST['cron_access']) or (!$_CONFIG['refresh_mode'])){
1326
+
1327
+ $perm_file = $_CONFIG['backups_dir'] . "/perm.txt";
1328
+ @unlink($perm_file);
1329
+ $fperm = fopen($perm_file, "w");
1330
+
1331
+ for ($i = 0; $i < sizeof($excluded); $i++) {
1332
+ $excluded[$i] = str_replace("//", "/", $excluded[$i]);
1333
+ }
1334
+
1335
+ // obtain the list of files by recursing the mambo file store
1336
+ addXLog("Starting the file scanning process");
1337
+
1338
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includeFolder, '', $excluded, $fperm);
1339
+ @fclose($fperm);
1340
+ @chmod($perm_file, 0777);
1341
+
1342
+ }
1343
+
1344
+
1345
+ // format total archive size
1346
+ $originalSize = getFileSizeText($s);
1347
+
1348
+ // extend the file locations to include the full path
1349
+
1350
+ for ($i = 0; $i < count($f_arr); $i++) {
1351
+ if (!file_exists($f_arr[$i])) {
1352
+ unset($f_arr[$i]);
1353
  }
1354
+ }
1355
+
1356
+ //if((file_exists($perm_file))&&(!in_array($perm_file, $f_arr)))
1357
+ // $f_arr[] = $perm_file;
1358
+
1359
+
1360
+ // add sql file to the backup
1361
+
1362
+ if ($_REQUEST[cron_access]) {
1363
+ if (is_array($sql_file))
1364
+ foreach ($sql_file as $key => $sqlfile)
1365
+ if (($backupDatabase == 1) && (!in_array($_CONFIG['backups_dir'] . $sqlfile, $f_arr)))
1366
+ $f_arr[] = $sqlfile;
1367
+ }
1368
+
1369
+
1370
+
1371
+ $filename = $_CONFIG['clonerPath'] . '/' . $filename1;
1372
+
1373
+ $f_arr = array_unique($f_arr);
1374
+
1375
+ // create the Zip file from the fileset array
1376
+ @unlink($filename);
1377
+
1378
+ $perm_lines = 0;
1379
+
1380
+ $handle = @fopen($perm_file, "r");
1381
+
1382
+ if ($handle) {
1383
+ while (!feof($handle)) {
1384
+ fgets($handle, 4096);
1385
+ $perm_lines++;
1386
  }
1387
 
1388
+ fclose($handle);
1389
+ }
1390
+
1391
+ addXLog("Done recursion, found ". $perm_lines." files");
1392
+
1393
+ if (!$_CONFIG['mem']) {
1394
+ //### START TAR MANUAL MODE ############################################################
1395
+
1396
+ if ($_CONFIG['backup_refresh']) {
1397
+ $f_arr = array($_CONFIG['backups_dir'] . "/index.html");
1398
  }
1399
+
1400
+
1401
+ if ($_CONFIG['backup_refresh'])
1402
+ $tar_type = "tar";
1403
  else
1404
+ $tar_type = "tgz";
1405
+
1406
+
1407
+ $tar_object = new Archive_Tar($filename, compression($tar_type));
1408
+ //$tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
1409
+ $return = $tar_object->addModify($f_arr, '', $_CONFIG['backup_path']);
1410
+
1411
+
1412
+ if ($return != 1) {
1413
+ echo "Backup failed using tar mode, error code $return!";
1414
  }
1415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1417
 
1418
+ if ($_CONFIG['backup_refresh']) {
1419
+ // echo "Starting the manual backup process!<br />";
1420
+ echo "<h3>Database backup: </h3>" . $databaseResult . "<br /><br />";
1421
 
1422
+ HTML_cloner::goRefreshHtml($filename, $perm_lines, $excl_manual);
1423
+ return;
1424
+ }
 
 
 
 
 
1425
 
 
 
 
 
 
1426
 
1427
+ //### END TAR MODE ############################################################
1428
+ } else {
 
 
 
 
 
 
 
1429
 
1430
+ //### CREATE BACKUP USING SERVER UTILITIES
1431
+ $i = 0;
1432
+ chdir($_CONFIG['backup_path']);
1433
 
1434
+ $excl_files = "";
1435
+ while ($i < sizeof($excluded)) {
1436
+ $file = $excluded[$i];
1437
+ $file = str_replace($_CONFIG['backup_path'], "", $file);
1438
+ $file = "##" . $file;
1439
+ $file = str_replace("##//", "", $file);
1440
+ $file = str_replace("##/", "", $file);
1441
+ $file = str_replace("##", "", $file);
1442
 
1443
+ $excl_files .= "/" . $file . "* ";
 
1444
 
1445
+ $i++;
1446
+ }
 
1447
 
 
 
 
 
 
 
1448
 
1449
+ chdir($_CONFIG['backup_path']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
 
1451
+ $excl_cmd = "";
 
 
 
 
 
1452
 
1453
+ if ($fp = fopen($_CONFIG['exfile_tar'], "w")) {
1454
+ $i = 0;
1455
+ while ($i < sizeof($excluded)) {
1456
+ $file = $excluded[$i];
1457
+ $file = str_replace($_CONFIG['backup_path'], "", $file);
1458
+ $file = "##" . $file;
1459
+ $file = str_replace("##//", "", $file);
1460
+ $file = str_replace("##/", "", $file);
1461
+ $file = str_replace("##", "", $file);
1462
 
1463
+ $excl_cmd .= " --exclude=./" . $file . " ";
 
 
 
 
 
1464
 
1465
+ $excl_files = "./" . $file . "\r\n";
1466
+ fwrite($fp, $excl_files);
1467
+ $i++;
1468
+ }
1469
 
1470
+ fclose($fp);
1471
+ }
1472
 
 
1473
 
1474
 
1475
+ if ($_CONFIG['backup_refresh']) {
1476
+ //######### STARTING THE MANUAL BACKUP ######################################################
 
 
 
 
1477
 
 
 
 
 
1478
 
1479
+ $exclude = $excl_cmd . " -X " . $_CONFIG['exfile_tar'];
 
 
 
1480
 
1481
+ $excl_manual = $_CONFIG['exfile_tar'] . "_manual";
 
1482
 
1483
+ if ($fp = fopen($excl_manual, "w")) {
1484
+ fwrite($fp, $exclude);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1485
 
1486
+ fclose($fp);
1487
+ }
1488
 
 
 
 
1489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1490
 
1491
+ echo "Starting the manual backup process!<br />";
1492
+ echo "Database backup: " . $databaseResult . "<br /><br />";
1493
 
1494
+ chdir($_CONFIG['backup_path']);
1495
+
1496
+ //$filename = str_replace(".tgz",".tar",$filename);
1497
+
1498
+ exec($_CONFIG[tarpath] . " $exclude -c" . $_CONFIG['tarcompress'] . "vf $filename ./administrator/backups/index.html");
1499
+ exec($_CONFIG[tarpath] . " -" . $_CONFIG['tarcompress'] . "vf $filename --update ./administrator/backups/database-sql.sql");
1500
+ exec($_CONFIG[tarpath] . " -" . $_CONFIG['tarcompress'] . "vf $filename --update ./administrator/backups/htaccess.txt");
1501
+ exec($_CONFIG[tarpath] . " -" . $_CONFIG['tarcompress'] . "vf $filename --update ./administrator/backups/perm.txt");
1502
+
1503
+ /*if (file_exists($filename)) {
1504
+ echo "Backup $filename created, we may continue!<br />";
1505
+ //echo "Database backup: ".$databaseResult."<br />" ;
1506
+ echo "<a href='index2.php?option=com_cloner&lines=" . $perm_lines . "&task=refresh&backup=$filename&excl_manual=$excl_manual' id='cLink'>Please click here to continue!</a>";
1507
+
1508
+ return;
1509
+ } else {
1510
+
1511
+ E_print("Backup failed, please check your tar server utility support!");
1512
+ return;
1513
+ }*/
1514
+
1515
+ HTML_cloner::goRefreshHtml($filename, $perm_lines, $excl_manual);
1516
+
1517
+ return;
1518
+ }
1519
+
1520
+
1521
+ if ($_REQUEST[cron_dbonly] != 1) {
1522
+ exec($_CONFIG[tarpath] . " $excl_cmd " . " -X " . $_CONFIG['exfile_tar'] . " -chv" . $_CONFIG['tarcompress'] . "f $filename ./");
1523
+ } else {
1524
+
1525
+
1526
+ exec($_CONFIG[tarpath] . " -" . $_CONFIG['tarcompress'] . "cvf $filename ./administrator/backups/database-sql.sql");
1527
+
1528
+ if (is_array($databases_incl)) {
1529
+ foreach ($databases_incl as $database_name)
1530
+ if ($database_name != "") {
1531
+ exec($_CONFIG[tarpath] . " -" . $_CONFIG['tarcompress'] . "vf $filename --update ./administrator/backups/" . $database_name . "-sql.sql");
1532
+ }
1533
+ }
1534
+ }
1535
+
1536
+ //######END
1537
+
1538
+
1539
+ chdir($_CONFIG['script_path']);
1540
+ //### END
1541
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1542
 
1543
+ if (!file_exists($filename)) {
1544
+ if ($_CONFIG[archive_type] == 1)
1545
+ echo LM_MSG_BACK_12;
1546
+ else
1547
+ echo LM_MSG_BACK_13;
1548
+ return;
1549
+ }
1550
+ // format the compressed size of the fileset
1551
+ $archiveSize = getFileSizeText(get_filesize($filename));
1552
 
 
 
 
1553
 
1554
 
1555
+ // load presentation layer
1556
+ if ($option != 'nohtml') {
1557
+ HTML_cloner::generateBackup($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option);
1558
+ } else {
1559
 
 
1560
 
1561
+ logxx(HTML_cloner::generateBackup_text($filename1, $archiveSize, $originalSize, $mdir, $f, $databaseResult, $option));
1562
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1563
 
1564
+ if (is_array($databases_incl)) {
1565
+ foreach ($databases_incl as $database_name) {
1566
+ @unlink($_CONFIG['backups_dir'] . "/" . $database_name . "-sql.sql");
1567
+ }
1568
+ }
1569
+ @unlink($_CONFIG['backups_dir'] . "/database-sql.sql");
1570
+ @unlink($sql_file);
1571
+ @unlink($perm_file);
1572
+ @unlink($htaccess);
1573
+ @unlink($_CONFIG['exfile']);
1574
+ @unlink($_CONFIG['exfile_tar']);
1575
+ return $filename1;
1576
+ }
1577
 
1578
+ function showHelp($option)
1579
+ {
1580
+ // ----------------------------------------------------------
1581
+ // Display the Help Screen
1582
+ // ----------------------------------------------------------
1583
 
1584
+ // load presentation layer
1585
+ HTML_cloner::showHelp($option);
1586
+ }
1587
 
 
 
1588
 
1589
+ function multidimsort(&$a)
1590
+ {
1591
+ sort($a);
1592
+ $c = count($a);
1593
+ for ($i = 0; $i < $c; $i++)
1594
+ if (is_array($a[$i]))
1595
+ multidimsort($a[$i]);
1596
+ }
1597
 
1598
+ function compression($ext)
1599
+ {
1600
+ switch ($ext) {
1601
+ case 'tar':
1602
+ $compresion = 'false';
1603
+ break;
1604
 
1605
+ case 'tgz':
1606
+ $compresion = 'true';
1607
+ break;
1608
 
1609
+ default:
1610
+ $compresion = 'false';
1611
+ break;
1612
+ }
1613
 
1614
+ return $compression;
1615
+ }
1616
 
1617
+ function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $excluded = array(), $fperm = '')
1618
+ {
1619
+ // ----------------------------------------------------------
1620
+ // Routine to recurse a folder structure and record the files
1621
+ // their sizes and parent folders
1622
+ // ----------------------------------------------------------
1623
+ global $mdir, $_CONFIG;
1624
+
1625
+ $currentfullpath = $_CONFIG['backup_path'] . $path;
1626
+
1627
+ // Open possibly available directory
1628
+ if ((is_dir($currentfullpath)) && (!is_link($currentfullpath))) {
1629
+ if ($handle = @opendir($currentfullpath)) {
1630
+ while (false !== ($file = readdir($handle))) {
1631
+ // Make sure we don't push parental directories or dotfiles (unix) into the arrays
1632
+ if (($file != "." && $file != "..")) {
1633
+ $exc = 0;
1634
+ $cfile = $currentfullpath . "/" . $file;
1635
+ if (sizeof($excluded) != 0) {
1636
+ foreach ($excluded as $key => $value) {
1637
+ if (($value != '') && (!$exc)) {
1638
+ $cfile = str_replace("//", "/", $cfile);
1639
+ if ((strstr($cfile, $value) != '') || (strstr($cfile . "/", $value) != '')) {
1640
+ $exc = 1;
1641
+ break;
1642
+ }
1643
+ }
1644
+ }
1645
+ }
1646
+ if ((@is_dir($cfile)) && (!@is_link($currentfullpath))) {
1647
+ // Create array for directories
1648
+ if (($fperm) && (!$exc)) {
1649
+ $perm = substr(sprintf('%o', fileperms($cfile)), -4);
1650
+
1651
+ fwrite($fperm, str_replace($_CONFIG['backup_path'], "", $cfile) . "|" . $perm . "\n");
1652
+ }
1653
+
1654
+ //$d_arr[++$d] = $cfile;
1655
+
1656
+ if (!$exc)
1657
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $excluded, $fperm);
1658
+ } else {
1659
+ //if ( in_array($currentfullpath, $includedFolders) )
1660
+ {
1661
+ // Create array for files
1662
+
1663
+ if (($fperm) && (!$exc)) {
1664
+ $perm = substr(sprintf('%o', @fileperms($cfile)), -4);
1665
+
1666
+ //$sfile = sprintf("%.2f",get_filesize($cfile)/1024);
1667
+
1668
+ fwrite($fperm, str_replace($_CONFIG['backup_path'], "", $cfile) . "|" . $perm . "\n");
1669
+ }
1670
+ if (!$exc) {
1671
+ //$s_arr[$f] = @filesize($cfile);
1672
+
1673
+ if ((!$_CONFIG['mem']) && ($_CONFIG['backup_refresh'] != 1)) {
1674
+ $f_arr[$f++] = $cfile;
1675
+ } else {
1676
+
1677
+
1678
+ $f++;
1679
+ }
1680
+
1681
+
1682
+ $s += get_filesize($cfile);
1683
+ }
1684
+ }
1685
+ }
1686
+ }
1687
+ }
1688
+ }
1689
+ // Wrap things up if we're in a directory
1690
+ //if( is_dir( $currentfullpath ) )
1691
+ @closedir($handle);
1692
+ }
1693
+ }
1694
 
1695
+ //legacy function, use instead the fileRecursion::getFileSize()
1696
+ function get_filesize($path)
1697
+ {
1698
+ //$sizeInBytes = filesize($path);
1699
+ $sizeInBytes = sprintf("%u", filesize($path));
1700
+ if ((!$sizeInBytes) and (function_exists("exec"))){
1701
+ $command = "ls -l \"$path\" | cut -d \" \" -f 5";
1702
+ $sizeInBytes = @exec($command);
1703
+ }
1704
 
1705
+ return $sizeInBytes;
1706
 
1707
+ }
1708
 
1709
+ function getBackupFiles(&$d_arr, &$f_arr, &$s_arr, &$d, &$f)
1710
+ {
1711
+ // ----------------------------------------------------------
1712
+ // Routine to list the existing backup files in the Component
1713
+ // Backup folder
1714
+ // ----------------------------------------------------------
1715
+ global $_CONFIG;
1716
+
1717
+ $path = $_CONFIG['clonerPath'];
1718
+ // Open possibly available directory
1719
+ if (is_dir($path)) {
1720
+ if ($handle = opendir($path)) {
1721
+ while (false !== ($file = readdir($handle))) {
1722
+ // Make sure we don't push parental directories or dotfiles (unix) into the arrays
1723
+ if ($file != "." && $file != ".." && $file[0] != ".") {
1724
+ if (is_dir($path . "/" . $file))
1725
+ // Create array for directories
1726
+ $d_arr[$d++] = $file;
1727
+ elseif ((strstr($file, '.zip')) || (strstr($file, '.tgz')) || (strstr($file, '.tar'))) {
1728
+ // Create array for files
1729
+ $f_arr[$f++] = $file;
1730
+ }
1731
+ }
1732
+ }
1733
+ }
1734
+ }
1735
 
1736
+ // Wrap things up if we're in a directory
1737
+ if (is_dir($path))
1738
+ closedir($handle);
1739
+ sort($f_arr);
1740
+ // Print file list
1741
+ for ($i = 0; $i < count($f_arr); $i++) {
1742
+ $s_arr[$i] = getFileSizeText(get_filesize($path . "/" . $f_arr[$i]));
1743
+ }
1744
+ }
1745
 
1746
 
1747
+ function getFileSizeText($filesize)
1748
+ {
1749
+ // ----------------------------------------------------------
1750
+ // Routine to display a formatted version of a filesize
1751
+ // ----------------------------------------------------------
1752
+
1753
+ if ($filesize >= 1024 && $filesize < 1048576) {
1754
+ // Size in kilobytes
1755
+ return round($filesize / 1024, 2) . " KB";
1756
+ } elseif ($filesize >= 1048576) {
1757
+ // Size in megabytes
1758
+ return round($filesize / 1024 / 1024, 2) . " MB";
1759
+ } else {
1760
+ // Size in bytes
1761
+ return $filesize . " bytes";
1762
+ }
1763
+ }
1764
 
1765
+ function doBackup($tables, $OutType, $OutDest, $toBackUp, $UserAgent, $local_backup_path, &$databaseResult, $backupname, $excltables = array(), $dbname)
1766
+ {
1767
+ global $database, $mosConfig_db, $mosConfig_sitename, $version, $option, $task, $mosConfig_dbprefix, $_CONFIG, $mosConfig_user, $mosConfig_password, $mosConfig_host;
1768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1769
 
1770
+ if (!$tables[0]) {
1771
+ $databaseResult = LM_DATABASE_MISSING_TABLES;
1772
+ return;
 
1773
  }
1774
+ addXLog("Exporting database `$dbname`");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1775
 
1776
+ /* Determine the mime type and file extension for the output file */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1777
 
1778
+ if ($OutType == "zip") {
1779
+ $filename = $backupname . "-sql" . ".zip";
1780
+ } elseif ($OutType == "html") {
1781
+ $filename = $backupname . "-sql" . ".html";
1782
+ } else {
1783
+ $filename = $backupname . "-sql" . ".sql";
1784
+ }
1785
 
 
 
 
 
 
1786
 
1787
+ $sqlfile = "$local_backup_path/$filename";
1788
+ addXLog("SQL file setup to: ".$sqlfile);
1789
+
1790
+ @unlink($sqlfile);
1791
+ /* Store all the tables we want to back-up in variable $tables[] */
1792
+
1793
+ if ($tables[0] == "all") {
1794
+ array_pop($tables);
1795
+ $query = mysql_query("SHOW tables");
1796
+ while ($row = mysql_fetch_array($query)) {
1797
+ $tables_list[] = $row[0];
1798
+ }
1799
+
1800
+
1801
+ $tables = array_merge($tables, $tables_list);
1802
+ }
1803
+ $newtables = array();
1804
+
1805
+ //if(is_array($excltables))
1806
+ foreach ($tables as $key => $value) {
1807
+ if (is_array($excltables)) {
1808
+ if (!in_array($value, $excltables))
1809
+ $newtables[] = $value;
1810
+ } else
1811
+ $newtables[] = $value;
1812
+ }
1813
+
1814
+ addXLog("Exporting tables: ");
1815
+ addXLog(implode("\n", $newtables));
1816
+
1817
+ if (sizeof($tables) == sizeof($newtables))
1818
+ $ex_dump = "";
1819
  else
1820
+ $ex_dump = @implode(" ", $newtables);
1821
+ $tables = $newtables;
1822
+
1823
+ if ($_REQUEST['dbbackup_drop']) {
1824
+ $drop = " --add-drop-table";
1825
+ } else {
1826
+
1827
+ $drop = "";
1828
+ }
1829
+
1830
+ if ($_REQUEST['dbbackup_comp']) {
1831
+ $drop .= " --compatible=" . strtolower($_REQUEST['dbbackup_comp']) . " ";
1832
+ }
1833
+
1834
+ if ($_CONFIG['sql_mem']) {
1835
+ exec($_CONFIG[sqldump] . " -h " . $_CONFIG['mysql_host'] . " -u " . $_CONFIG['mysql_user'] . " -p" . $_CONFIG['mysql_pass'] . " " . $dbname . " > " . $sqlfile . " $drop --allow-keywords " . $ex_dump);
1836
+
1837
+ if (get_filesize($sqlfile) > 0)
1838
+ $databaseResult = LM_DATABASE_BACKUP_COMPLETED . ' ( ' . getFileSizeText(get_filesize($sqlfile)) . ' )';
1839
+ else
1840
+ $databaseResult = LM_MSG_BACK_14;
1841
+
1842
+ exec("chmod 777 $sqlfile");
1843
+
1844
+ return $sqlfile;
1845
+ }
1846
+
1847
+ /*Added some default values for quotes and auto_increment problems*/
1848
+ mysql_query("SET SQL_QUOTE_SHOW_CREATE=1;");
1849
+ mysql_query("SET sql_mode = 0;");
1850
+
1851
+ if ($_REQUEST['dbbackup_comp']) {
1852
+ mysql_query("SET sql_mode=" . $_REQUEST['dbbackup_comp'] . ";");
1853
+ }
1854
+
1855
+
1856
+ /* Store the "Create Tables" SQL in variable $CreateTable[$tblval] */
1857
+ if ($toBackUp != "data") {
1858
+ foreach ($tables as $tblval) {
1859
+ $query = mysql_query("SHOW CREATE table `$tblval`");
1860
+ $row = mysql_fetch_array($query);
1861
+ $CreateTable[$tblval] = $row[1];
1862
+ }
1863
+ }
1864
+
1865
+ /* Store all the FIELD TYPES being backed-up (text fields need to be delimited) in variable $FieldType*/
1866
+ if ($toBackUp != "structure") {
1867
+ foreach ($tables as $tblval) {
1868
+ $query = mysql_query("SHOW FIELDS FROM `$tblval`");
1869
+ while ($row = mysql_fetch_row($query)) {
1870
+ $fields[] = $row[0];
1871
+ }
1872
+ foreach ($fields as $field) {
1873
+ $FieldType[$tblval][$field->Field] = preg_replace("/[(0-9)]/", '', $field->Type);
1874
+ }
1875
+ }
1876
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1878
 
1879
  if ($OutDest == "local") {
1880
+ $fp = fopen($sqlfile, "w");
1881
+ if (!$fp) {
1882
+ $databaseResult = LM_DATABASE_BACKUP_FAILED;
1883
+ return;
1884
+ }
1885
+ }
1886
+
1887
+ /* Build the fancy header on the dump file */
1888
+ $OutBuffer = "";
1889
+ if ($OutType == 'html') {
1890
+ } else {
1891
+ $OutBuffer .= "#\n";
1892
+ $OutBuffer .= "# Powered by XCloner Site Backup\n";
1893
+ $OutBuffer .= "# http://www.xcloner.com\n";
1894
+ $OutBuffer .= "#\n";
1895
+ $OutBuffer .= "# Host: " . $_SERVER['HTTP_HOST'] . "\n";
1896
+ $OutBuffer .= "# Generation Time: " . date("M j, Y \a\\t H:i") . "\n";
1897
+ $OutBuffer .= "# Server version: " . getVersion() . "\n";
1898
+ $OutBuffer .= "# PHP Version: " . phpversion() . "\n";
1899
+ $OutBuffer .= "# Database : `" . $dbname . "`\n# --------------------------------------------------------\n";
1900
+ }
1901
+ fwrite($fp, $OutBuffer);
1902
+ unset($OutBuffer);
1903
+
1904
+ /* Okay, here's the meat & potatoes */
1905
+ foreach ($tables as $tblval) {
1906
+ if ($toBackUp != "data") {
1907
+ if ($OutType == 'html') {
1908
+ } else {
1909
+ $OutBuffer .= "#\n# Table structure for table `$tblval`\n#\n";
1910
+ if ($_REQUEST['dbbackup_drop'])
1911
+ $OutBuffer .= "#\nDROP table IF EXISTS `$tblval`;\n";
1912
+
1913
+ $OutBuffer .= $CreateTable[$tblval] . ";\r\n";
1914
+ }
1915
+ }
1916
+ fwrite($fp, $OutBuffer);
1917
+ unset($OutBuffer);
1918
+
1919
 
1920
+ if ($toBackUp != "structure") {
1921
+ $OutBuffer .= "#\n# Dumping data for table `$tblval`\n#\n";
1922
+ $query = @mysql_query("SELECT * FROM `$tblval`");
1923
+
1924
+ while ($row = @mysql_fetch_array($query, MYSQL_ASSOC)) {
1925
+ $InsertDump = "INSERT INTO `$tblval` VALUES (";
1926
+ $arr = $row;
1927
+ foreach ($arr as $key => $value) {
1928
+ $value = addslashes($value);
1929
+ $value = str_replace("\n", '\r\n', $value);
1930
+ $value = str_replace("\r", '', $value);
1931
+ //if (@preg_match ("/\b" . $FieldType[$tblval][$key] . "\b/i", "DATE TIME DATETIME CHAR VARCHAR TEXT TINYTEXT MEDIUMTEXT LONGTEXT BLOB TINYBLOB MEDIUMBLOB LONGBLOB ENUM SET"))
1932
+ {
1933
+ $InsertDump .= "'$value',";
1934
+ }
1935
+ /*else
1936
+ {
1937
+ $InsertDump .= "'$value',";
1938
+ } */
1939
+ }
1940
+ $OutBuffer .= rtrim($InsertDump, ',') . ");\n";
1941
+ fwrite($fp, $OutBuffer);
1942
+ unset($OutBuffer);
1943
+ $i++;
1944
+ }
1945
+ }
1946
+ }
1947
 
1948
+ if ($OutDest == "local") {
1949
+ //fwrite($fp, $OutBuffer);
1950
+ fclose($fp);
1951
 
1952
+ @chmod($sqlfile, 0777);
1953
 
1954
+ $databaseResult = LM_DATABASE_BACKUP_COMPLETED . ' ( ' . getFileSizeText(get_filesize($sqlfile)) . ' )';
1955
+ return $sqlfile;
1956
+ }
1957
+ }
1958
 
 
 
 
 
 
 
 
 
 
 
 
1959
 
1960
+ function getVersion()
1961
+ {
1962
+ $query = mysql_query("SELECT version()");
1963
+ $row = mysql_fetch_array($query);
1964
+ return $row[0];
1965
+ }
1966
  ?>
common.php CHANGED
@@ -58,9 +58,19 @@ if (file_exists( "language/".$mosConfig_lang.".php" )) {
58
  }
59
 
60
  else{
61
-
62
  include_once( "language/english.php" );
 
63
 
 
 
 
64
  }
 
 
 
 
 
 
 
65
 
66
  ?>
58
  }
59
 
60
  else{
 
61
  include_once( "language/english.php" );
62
+ }
63
 
64
+ $version = str_replace(".", "", phpversion());
65
+ if($version < 520){
66
+ $_CONFIG['refresh_mode']="0";
67
  }
68
+ if($_CONFIG['backup_refresh'] == "0"){
69
+ $_CONFIG['refresh_mode']="0";
70
+ }
71
+
72
+ $_CONFIG['backup_start_path'] = $_CONFIG['backup_path'];
73
+ $_CONFIG['backup_store_path'] = $_CONFIG['clonerPath'];
74
+ $_CONFIG['temp_dir'] = $_CONFIG['backups_dir'];
75
 
76
  ?>
css/jquery-ui.css ADDED
@@ -0,0 +1,570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.8
3
+ *
4
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ui-helper-clearfix { height:1%; }
20
+ .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+ /*
43
+ * jQuery UI Accordion 1.8.8
44
+ *
45
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
46
+ * Dual licensed under the MIT or GPL Version 2 licenses.
47
+ * http://jquery.org/license
48
+ *
49
+ * http://docs.jquery.com/UI/Accordion#theming
50
+ */
51
+ /* IE/Win - Fix animation bug - #4615 */
52
+ .ui-accordion { width: 100%; }
53
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
54
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
55
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
56
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
57
+ .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
58
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
59
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
60
+ .ui-accordion .ui-accordion-content-active { display: block; }/*
61
+ * jQuery UI Autocomplete 1.8.8
62
+ *
63
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
64
+ * Dual licensed under the MIT or GPL Version 2 licenses.
65
+ * http://jquery.org/license
66
+ *
67
+ * http://docs.jquery.com/UI/Autocomplete#theming
68
+ */
69
+ .ui-autocomplete { position: absolute; cursor: default; }
70
+
71
+ /* workarounds */
72
+ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
73
+
74
+ /*
75
+ * jQuery UI Menu 1.8.8
76
+ *
77
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
78
+ * Dual licensed under the MIT or GPL Version 2 licenses.
79
+ * http://jquery.org/license
80
+ *
81
+ * http://docs.jquery.com/UI/Menu#theming
82
+ */
83
+ .ui-menu {
84
+ list-style:none;
85
+ padding: 2px;
86
+ margin: 0;
87
+ display:block;
88
+ float: left;
89
+ }
90
+ .ui-menu .ui-menu {
91
+ margin-top: -3px;
92
+ }
93
+ .ui-menu .ui-menu-item {
94
+ margin:0;
95
+ padding: 0;
96
+ zoom: 1;
97
+ float: left;
98
+ clear: left;
99
+ width: 100%;
100
+ }
101
+ .ui-menu .ui-menu-item a {
102
+ text-decoration:none;
103
+ display:block;
104
+ padding:.2em .4em;
105
+ line-height:1.5;
106
+ zoom:1;
107
+ }
108
+ .ui-menu .ui-menu-item a.ui-state-hover,
109
+ .ui-menu .ui-menu-item a.ui-state-active {
110
+ font-weight: normal;
111
+ margin: -1px;
112
+ }
113
+ /*
114
+ * jQuery UI Button 1.8.8
115
+ *
116
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
117
+ * Dual licensed under the MIT or GPL Version 2 licenses.
118
+ * http://jquery.org/license
119
+ *
120
+ * http://docs.jquery.com/UI/Button#theming
121
+ */
122
+ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
123
+ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
124
+ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
125
+ .ui-button-icons-only { width: 3.4em; }
126
+ button.ui-button-icons-only { width: 3.7em; }
127
+
128
+ /*button text element */
129
+ .ui-button .ui-button-text { display: block; line-height: 1.4; }
130
+ .ui-button-text-only .ui-button-text { padding: .4em 1em; }
131
+ .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
132
+ .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
133
+ .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
134
+ .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
135
+ /* no icon support for input elements, provide padding by default */
136
+ input.ui-button { padding: .4em 1em; }
137
+
138
+ /*button icon element(s) */
139
+ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
140
+ .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
141
+ .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
142
+ .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
143
+ .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
144
+
145
+ /*button sets*/
146
+ .ui-buttonset { margin-right: 7px; }
147
+ .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
148
+
149
+ /* workarounds */
150
+ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
151
+ /*
152
+ * jQuery UI Datepicker 1.8.8
153
+ *
154
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
155
+ * Dual licensed under the MIT or GPL Version 2 licenses.
156
+ * http://jquery.org/license
157
+ *
158
+ * http://docs.jquery.com/UI/Datepicker#theming
159
+ */
160
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
161
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
162
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
163
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
164
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
165
+ .ui-datepicker .ui-datepicker-next { right:2px; }
166
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
167
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
168
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
169
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
170
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
171
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
172
+ .ui-datepicker select.ui-datepicker-month,
173
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
174
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
175
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
176
+ .ui-datepicker td { border: 0; padding: 1px; }
177
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
178
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
179
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
180
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
181
+
182
+ /* with multiple calendars */
183
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
184
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
185
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
186
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
187
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
188
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
189
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
190
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
191
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
192
+ .ui-datepicker-row-break { clear:both; width:100%; }
193
+
194
+ /* RTL support */
195
+ .ui-datepicker-rtl { direction: rtl; }
196
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
197
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
198
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
199
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
200
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
201
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
202
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
203
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
204
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
205
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
206
+
207
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
208
+ .ui-datepicker-cover {
209
+ display: none; /*sorry for IE5*/
210
+ display/**/: block; /*sorry for IE5*/
211
+ position: absolute; /*must have*/
212
+ z-index: -1; /*must have*/
213
+ filter: mask(); /*must have*/
214
+ top: -4px; /*must have*/
215
+ left: -4px; /*must have*/
216
+ width: 200px; /*must have*/
217
+ height: 200px; /*must have*/
218
+ }/*
219
+ * jQuery UI Dialog 1.8.8
220
+ *
221
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
222
+ * Dual licensed under the MIT or GPL Version 2 licenses.
223
+ * http://jquery.org/license
224
+ *
225
+ * http://docs.jquery.com/UI/Dialog#theming
226
+ */
227
+ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
228
+ .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
229
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
230
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
231
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
232
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
233
+ .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
234
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
235
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
236
+ .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
237
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
238
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
239
+ /*
240
+ * jQuery UI Progressbar 1.8.8
241
+ *
242
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
243
+ * Dual licensed under the MIT or GPL Version 2 licenses.
244
+ * http://jquery.org/license
245
+ *
246
+ * http://docs.jquery.com/UI/Progressbar#theming
247
+ */
248
+ .ui-progressbar { height:2em; text-align: left; }
249
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
250
+ * jQuery UI Resizable 1.8.8
251
+ *
252
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
253
+ * Dual licensed under the MIT or GPL Version 2 licenses.
254
+ * http://jquery.org/license
255
+ *
256
+ * http://docs.jquery.com/UI/Resizable#theming
257
+ */
258
+ .ui-resizable { position: relative;}
259
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
260
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
261
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
262
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
263
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
264
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
265
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
266
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
267
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
268
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
269
+ * jQuery UI Selectable 1.8.8
270
+ *
271
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
272
+ * Dual licensed under the MIT or GPL Version 2 licenses.
273
+ * http://jquery.org/license
274
+ *
275
+ * http://docs.jquery.com/UI/Selectable#theming
276
+ */
277
+ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
278
+ /*
279
+ * jQuery UI Slider 1.8.8
280
+ *
281
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
282
+ * Dual licensed under the MIT or GPL Version 2 licenses.
283
+ * http://jquery.org/license
284
+ *
285
+ * http://docs.jquery.com/UI/Slider#theming
286
+ */
287
+ .ui-slider { position: relative; text-align: left; }
288
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
289
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
290
+
291
+ .ui-slider-horizontal { height: .8em; }
292
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
293
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
294
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
295
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
296
+
297
+ .ui-slider-vertical { width: .8em; height: 100px; }
298
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
299
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
300
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
301
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
302
+ * jQuery UI Tabs 1.8.8
303
+ *
304
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
305
+ * Dual licensed under the MIT or GPL Version 2 licenses.
306
+ * http://jquery.org/license
307
+ *
308
+ * http://docs.jquery.com/UI/Tabs#theming
309
+ */
310
+ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
311
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
312
+ .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
313
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
314
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
315
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
316
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
317
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
318
+ .ui-tabs .ui-tabs-hide { display: none !important; }
319
+ /*
320
+ * jQuery UI CSS Framework 1.8.8
321
+ *
322
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
323
+ * Dual licensed under the MIT or GPL Version 2 licenses.
324
+ * http://jquery.org/license
325
+ *
326
+ * http://docs.jquery.com/UI/Theming/API
327
+ *
328
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
329
+ */
330
+
331
+
332
+ /* Component containers
333
+ ----------------------------------*/
334
+ .ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
335
+ .ui-widget .ui-widget { font-size: 1em; }
336
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
337
+ .ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ /*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
338
+ .ui-widget-content a { color: #222222/*{fcContent}*/; }
339
+ .ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ /*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
340
+ .ui-widget-header a { color: #222222/*{fcHeader}*/; }
341
+
342
+ /* Interaction states
343
+ ----------------------------------*/
344
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
345
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
346
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
347
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
348
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
349
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
350
+ .ui-widget :active { outline: none; }
351
+
352
+ /* Interaction Cues
353
+ ----------------------------------*/
354
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
355
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
356
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
357
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
358
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
359
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
360
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
361
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
362
+
363
+ /* Icons
364
+ ----------------------------------*/
365
+
366
+ /* states and images */
367
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
368
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
369
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
370
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
371
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
372
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
373
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
374
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
375
+
376
+ /* positioning */
377
+ .ui-icon-carat-1-n { background-position: 0 0; }
378
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
379
+ .ui-icon-carat-1-e { background-position: -32px 0; }
380
+ .ui-icon-carat-1-se { background-position: -48px 0; }
381
+ .ui-icon-carat-1-s { background-position: -64px 0; }
382
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
383
+ .ui-icon-carat-1-w { background-position: -96px 0; }
384
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
385
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
386
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
387
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
388
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
389
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
390
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
391
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
392
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
393
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
394
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
395
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
396
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
397
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
398
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
399
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
400
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
401
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
402
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
403
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
404
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
405
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
406
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
407
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
408
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
409
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
410
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
411
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
412
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
413
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
414
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
415
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
416
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
417
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
418
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
419
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
420
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
421
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
422
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
423
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
424
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
425
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
426
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
427
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
428
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
429
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
430
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
431
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
432
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
433
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
434
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
435
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
436
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
437
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
438
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
439
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
440
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
441
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
442
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
443
+ .ui-icon-extlink { background-position: -32px -80px; }
444
+ .ui-icon-newwin { background-position: -48px -80px; }
445
+ .ui-icon-refresh { background-position: -64px -80px; }
446
+ .ui-icon-shuffle { background-position: -80px -80px; }
447
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
448
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
449
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
450
+ .ui-icon-folder-open { background-position: -16px -96px; }
451
+ .ui-icon-document { background-position: -32px -96px; }
452
+ .ui-icon-document-b { background-position: -48px -96px; }
453
+ .ui-icon-note { background-position: -64px -96px; }
454
+ .ui-icon-mail-closed { background-position: -80px -96px; }
455
+ .ui-icon-mail-open { background-position: -96px -96px; }
456
+ .ui-icon-suitcase { background-position: -112px -96px; }
457
+ .ui-icon-comment { background-position: -128px -96px; }
458
+ .ui-icon-person { background-position: -144px -96px; }
459
+ .ui-icon-print { background-position: -160px -96px; }
460
+ .ui-icon-trash { background-position: -176px -96px; }
461
+ .ui-icon-locked { background-position: -192px -96px; }
462
+ .ui-icon-unlocked { background-position: -208px -96px; }
463
+ .ui-icon-bookmark { background-position: -224px -96px; }
464
+ .ui-icon-tag { background-position: -240px -96px; }
465
+ .ui-icon-home { background-position: 0 -112px; }
466
+ .ui-icon-flag { background-position: -16px -112px; }
467
+ .ui-icon-calendar { background-position: -32px -112px; }
468
+ .ui-icon-cart { background-position: -48px -112px; }
469
+ .ui-icon-pencil { background-position: -64px -112px; }
470
+ .ui-icon-clock { background-position: -80px -112px; }
471
+ .ui-icon-disk { background-position: -96px -112px; }
472
+ .ui-icon-calculator { background-position: -112px -112px; }
473
+ .ui-icon-zoomin { background-position: -128px -112px; }
474
+ .ui-icon-zoomout { background-position: -144px -112px; }
475
+ .ui-icon-search { background-position: -160px -112px; }
476
+ .ui-icon-wrench { background-position: -176px -112px; }
477
+ .ui-icon-gear { background-position: -192px -112px; }
478
+ .ui-icon-heart { background-position: -208px -112px; }
479
+ .ui-icon-star { background-position: -224px -112px; }
480
+ .ui-icon-link { background-position: -240px -112px; }
481
+ .ui-icon-cancel { background-position: 0 -128px; }
482
+ .ui-icon-plus { background-position: -16px -128px; }
483
+ .ui-icon-plusthick { background-position: -32px -128px; }
484
+ .ui-icon-minus { background-position: -48px -128px; }
485
+ .ui-icon-minusthick { background-position: -64px -128px; }
486
+ .ui-icon-close { background-position: -80px -128px; }
487
+ .ui-icon-closethick { background-position: -96px -128px; }
488
+ .ui-icon-key { background-position: -112px -128px; }
489
+ .ui-icon-lightbulb { background-position: -128px -128px; }
490
+ .ui-icon-scissors { background-position: -144px -128px; }
491
+ .ui-icon-clipboard { background-position: -160px -128px; }
492
+ .ui-icon-copy { background-position: -176px -128px; }
493
+ .ui-icon-contact { background-position: -192px -128px; }
494
+ .ui-icon-image { background-position: -208px -128px; }
495
+ .ui-icon-video { background-position: -224px -128px; }
496
+ .ui-icon-script { background-position: -240px -128px; }
497
+ .ui-icon-alert { background-position: 0 -144px; }
498
+ .ui-icon-info { background-position: -16px -144px; }
499
+ .ui-icon-notice { background-position: -32px -144px; }
500
+ .ui-icon-help { background-position: -48px -144px; }
501
+ .ui-icon-check { background-position: -64px -144px; }
502
+ .ui-icon-bullet { background-position: -80px -144px; }
503
+ .ui-icon-radio-off { background-position: -96px -144px; }
504
+ .ui-icon-radio-on { background-position: -112px -144px; }
505
+ .ui-icon-pin-w { background-position: -128px -144px; }
506
+ .ui-icon-pin-s { background-position: -144px -144px; }
507
+ .ui-icon-play { background-position: 0 -160px; }
508
+ .ui-icon-pause { background-position: -16px -160px; }
509
+ .ui-icon-seek-next { background-position: -32px -160px; }
510
+ .ui-icon-seek-prev { background-position: -48px -160px; }
511
+ .ui-icon-seek-end { background-position: -64px -160px; }
512
+ .ui-icon-seek-start { background-position: -80px -160px; }
513
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
514
+ .ui-icon-seek-first { background-position: -80px -160px; }
515
+ .ui-icon-stop { background-position: -96px -160px; }
516
+ .ui-icon-eject { background-position: -112px -160px; }
517
+ .ui-icon-volume-off { background-position: -128px -160px; }
518
+ .ui-icon-volume-on { background-position: -144px -160px; }
519
+ .ui-icon-power { background-position: 0 -176px; }
520
+ .ui-icon-signal-diag { background-position: -16px -176px; }
521
+ .ui-icon-signal { background-position: -32px -176px; }
522
+ .ui-icon-battery-0 { background-position: -48px -176px; }
523
+ .ui-icon-battery-1 { background-position: -64px -176px; }
524
+ .ui-icon-battery-2 { background-position: -80px -176px; }
525
+ .ui-icon-battery-3 { background-position: -96px -176px; }
526
+ .ui-icon-circle-plus { background-position: 0 -192px; }
527
+ .ui-icon-circle-minus { background-position: -16px -192px; }
528
+ .ui-icon-circle-close { background-position: -32px -192px; }
529
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
530
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
531
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
532
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
533
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
534
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
535
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
536
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
537
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
538
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
539
+ .ui-icon-circle-check { background-position: -208px -192px; }
540
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
541
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
542
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
543
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
544
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
545
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
546
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
547
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
548
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
549
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
550
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
551
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
552
+
553
+
554
+ /* Misc visuals
555
+ ----------------------------------*/
556
+
557
+ /* Corner radius */
558
+ .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
559
+ .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
560
+ .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
561
+ .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
562
+ .ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
563
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
564
+ .ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
565
+ .ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
566
+ .ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; }
567
+
568
+ /* Overlays */
569
+ .ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
570
+ .ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
css/main.css CHANGED
@@ -5,7 +5,7 @@ td.test a{
5
  }
6
 
7
  td.test a.hover{
8
-
9
  color: orange;
10
 
11
  }
@@ -18,7 +18,7 @@ td.test {
18
  background: #a0a0a0;
19
 
20
  padding: 20px 30px 20px 20px;
21
-
22
  text-align:center;
23
 
24
  color: red;
@@ -32,10 +32,10 @@ td.test2 {
32
  background: #dcdcdc;
33
 
34
  padding: 20px 30px 20px 20px;
35
-
36
  text-align:center;
37
 
38
- }
39
 
40
 
41
 
@@ -87,7 +87,7 @@ body {
87
  color : #333;
88
  background-color: #FFF;
89
  font-family: Arial, Helvetica, sans-serif;
90
- font-size: 12px;
91
  }
92
  a {
93
  color: #C64934;
@@ -187,7 +187,7 @@ input, textarea, select {
187
  }
188
  table.menubar {
189
  width: 100%;
190
-
191
  }
192
  td {
193
  font-size: 11px;
@@ -308,7 +308,6 @@ 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;
@@ -373,13 +372,13 @@ table.adminform th {
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 {
@@ -477,24 +476,24 @@ div.main {
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; }
@@ -510,8 +509,8 @@ a.tooltip, a.tooltip:hover {
510
  }
511
 
512
  a.tooltiplink {
513
- display: block;
514
- width: 100%;
515
  }
516
  a.tooltiplink:hover {
517
  text-decoration: none;
@@ -525,51 +524,51 @@ fieldset {
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 {
@@ -631,7 +630,7 @@ display:block;
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
@@ -684,3 +683,41 @@ display:block;
684
  /* Hides from IE-mac \*/
685
  * html .clearfix {height: 1%;}
686
  /* End hide from IE-mac */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  }
6
 
7
  td.test a.hover{
8
+
9
  color: orange;
10
 
11
  }
18
  background: #a0a0a0;
19
 
20
  padding: 20px 30px 20px 20px;
21
+
22
  text-align:center;
23
 
24
  color: red;
32
  background: #dcdcdc;
33
 
34
  padding: 20px 30px 20px 20px;
35
+
36
  text-align:center;
37
 
38
+ }
39
 
40
 
41
 
87
  color : #333;
88
  background-color: #FFF;
89
  font-family: Arial, Helvetica, sans-serif;
90
+ font-size: 14px;
91
  }
92
  a {
93
  color: #C64934;
187
  }
188
  table.menubar {
189
  width: 100%;
190
+
191
  }
192
  td {
193
  font-size: 11px;
308
  margin: 0px;
309
  padding: 6px 4px 2px 4px;
310
  height: 25px;
 
311
  background-repeat: repeat;
312
  font-size: 11px;
313
  color: #000;
372
  padding-right: 4px;
373
  text-align: left;
374
  height: 25px;
 
375
  color: #000;
376
  background-repeat: repeat;
377
  }
378
  table.adminform td {
379
  padding: 3px;
380
+ border: solid 1px #d5d5d5;
381
+
382
  text-align: left;
383
  }
384
  table.adminform td.editor {
476
  #cpanel { text-align: center; vertical-align: middle; }
477
 
478
  #cpanel div.icon { margin: 3px; }
479
+ #cpanel div.icon a {
480
  display: block; float: left;
481
  height: 97px !important;
482
+ height: 100px;
483
  width: 108px !important;
484
+ width: 110px;
485
+ vertical-align: middle;
486
  text-decoration : none;
487
  border: 1px solid #DDD;
488
  padding: 2px 5px 1px 5px;
489
  }
490
 
491
  #cpanel div.icon a:link { color : #808080; }
492
+ #cpanel div.icon a:hover {
493
+ color : #333;
494
+ background-color: #f1e8e6;
495
  border: 1px solid #c24733;
496
+ padding: 3px 4px 0px 6px;
497
  }
498
  #cpanel div.icon a:active { color : #808080; }
499
  #cpanel div.icon a:visited { color : #808080; }
509
  }
510
 
511
  a.tooltiplink {
512
+ display: block;
513
+ width: 100%;
514
  }
515
  a.tooltiplink:hover {
516
  text-decoration: none;
524
  text-align: left;
525
  }
526
 
527
+ fieldset p {
528
+ margin: 10px 0px;
529
  }
530
 
531
+ legend {
532
+ color: #c24733;
533
+ font-size: 1.1em;
534
+ font-weight: bold;
535
  }
536
 
537
  /* Two Pane Formatting */
538
  #treecell {
539
+ width: 20%;
540
+ display: block;
541
+ position: relative;
542
  float: left;
543
+ margin: 0;
544
  padding: 2px;
545
  overflow: hidden;
546
  }
547
 
548
+ .expander {
549
+ float: right;
550
  }
551
 
552
  #datacell {
553
+ width: 78%;
554
+ display: block;
555
  float: left;
556
+ margin: 0;
557
+ padding: 2px 0px 0px 0px;
558
  }
559
 
560
  #datacellfull {
561
+ width: 98%;
562
+ display: block;
563
  float: left;
564
+ margin: 0;
565
  padding: 2px;
566
  }
567
 
568
+ #treecell fieldset {
569
  }
570
+ #datacell fieldset {
571
+ border: 1px #ccc solid;
572
  }
573
 
574
  span.editlinktip {
630
  /* Hides from IE-mac \*/
631
  * html .clearfix {height: 1%;}
632
  /* End hide from IE-mac */
633
+ /*
634
  Theme Name: Flavor
635
  Theme URI: http://www.cssflavour.com
636
  Description: CSS Flavour Themes from DIT India
683
  /* Hides from IE-mac \*/
684
  * html .clearfix {height: 1%;}
685
  /* End hide from IE-mac */
686
+
687
+ /*Progress bar*/
688
+ #progressbar {
689
+ /*background-image: url(../images/progress.gif);
690
+ line-height:20px;*/
691
+ width: 400px;
692
+ }
693
+
694
+ #complete {
695
+ display: none;
696
+ }
697
+
698
+ .status {
699
+ display:block;
700
+ padding: 5px 0 5px 10px;
701
+ font-size: 15px;
702
+ border-style:dotted;
703
+ border-width:1px;
704
+ margin-top: 10px;
705
+ }
706
+ .statusCheck {
707
+ padding-left: 10px;
708
+ padding-bottom: 10px;
709
+ width: auto;
710
+ display: inline;
711
+ }
712
+ .error {
713
+ color: red;
714
+ font-size: 14px;
715
+ }
716
+ .success {
717
+ color: green;
718
+ font-size: 14px;
719
+ }
720
+ .mtext {
721
+ font-weight: bold;
722
+ font-size: 16px;
723
+ }
javascript/jquery-1.4.4.min.js ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.4.4
3
+ * http://jquery.com/
4
+ *
5
+ * Copyright 2010, John Resig
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ *
9
+ * Includes Sizzle.js
10
+ * http://sizzlejs.com/
11
+ * Copyright 2010, The Dojo Foundation
12
+ * Released under the MIT, BSD, and GPL Licenses.
13
+ *
14
+ * Date: Thu Nov 11 19:04:53 2010 -0500
15
+ */
16
+ (function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
17
+ h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
18
+ h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
19
+ "`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
20
+ e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
21
+ "margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
22
+ a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
23
+ C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
24
+ s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
25
+ j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
26
+ toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
27
+ -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
28
+ if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
29
+ if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
30
+ b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
31
+ !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
32
+ l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
33
+ z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
34
+ s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
35
+ s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
36
+ [];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
37
+ false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
38
+ k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
39
+ scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
40
+ false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
41
+ 1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
42
+ "none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
43
+ c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
44
+ else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
45
+ a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
46
+ c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
47
+ a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
48
+ colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
49
+ 1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
50
+ l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
51
+ "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
52
+ if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
53
+ a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
54
+ attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
55
+ b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
56
+ c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
57
+ arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
58
+ d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
59
+ c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
60
+ w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
61
+ 8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
62
+ "click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
63
+ d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
64
+ fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
65
+ d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
66
+ Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
67
+ c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
68
+ var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
69
+ "form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
70
+ xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
71
+ B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
72
+ "file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
73
+ 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
74
+ a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
75
+ 1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
76
+ "object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
77
+ c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
78
+ (function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
79
+ [y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
80
+ break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
81
+ q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
82
+ l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
83
+ return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
84
+ B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
85
+ POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
86
+ i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
87
+ i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
88
+ "")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
89
+ m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
90
+ true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
91
+ g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
92
+ 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
93
+ "first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
94
+ i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
95
+ if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
96
+ g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
97
+ for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
98
+ i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
99
+ n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
100
+ function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
101
+ p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
102
+ t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
103
+ function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
104
+ c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
105
+ not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
106
+ h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
107
+ c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
108
+ 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
109
+ b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
110
+ e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
111
+ "<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
112
+ c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
113
+ wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
114
+ prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
115
+ this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
116
+ return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
117
+ else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
118
+ c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
119
+ b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
120
+ this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
121
+ prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
122
+ b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
123
+ 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
124
+ d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
125
+ jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
126
+ zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
127
+ h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
128
+ if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
129
+ d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
130
+ e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
131
+ ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
132
+ "object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
133
+ !this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
134
+ getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
135
+ script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
136
+ !T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
137
+ false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
138
+ A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
139
+ b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
140
+ c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
141
+ c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
142
+ encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
143
+ [b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
144
+ e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
145
+ if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
146
+ 3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
147
+ d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
148
+ d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
149
+ "inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
150
+ 1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
151
+ d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
152
+ Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
153
+ var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
154
+ this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
155
+ this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
156
+ c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
157
+ b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
158
+ h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
159
+ for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
160
+ parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
161
+ height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
162
+ f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
163
+ "marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
164
+ e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
165
+ c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
166
+ c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
167
+ b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
javascript/jquery-ui.min.js ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery UI 1.8.8
3
+ *
4
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ (function(b,c){function f(g){return!b(g).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.8",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
11
+ NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});b.fn.extend({_focus:b.fn.focus,focus:function(g,e){return typeof g==="number"?this.each(function(){var a=this;setTimeout(function(){b(a).focus();e&&e.call(a)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,
12
+ "position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!g.length?b(document):g},zIndex:function(g){if(g!==c)return this.css("zIndex",g);if(this.length){g=b(this[0]);for(var e;g.length&&g[0]!==document;){e=g.css("position");
13
+ if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(g.css("zIndex"),10);if(!isNaN(e)&&e!==0)return e}g=g.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(g,e){function a(j,n,q,l){b.each(d,function(){n-=parseFloat(b.curCSS(j,"padding"+this,true))||0;if(q)n-=parseFloat(b.curCSS(j,
14
+ "border"+this+"Width",true))||0;if(l)n-=parseFloat(b.curCSS(j,"margin"+this,true))||0});return n}var d=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),i={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+e]=function(j){if(j===c)return i["inner"+e].call(this);return this.each(function(){b(this).css(h,a(this,j)+"px")})};b.fn["outer"+e]=function(j,n){if(typeof j!=="number")return i["outer"+e].call(this,j);return this.each(function(){b(this).css(h,
15
+ a(this,j,true,n)+"px")})}});b.extend(b.expr[":"],{data:function(g,e,a){return!!b.data(g,a[3])},focusable:function(g){var e=g.nodeName.toLowerCase(),a=b.attr(g,"tabindex");if("area"===e){e=g.parentNode;a=e.name;if(!g.href||!a||e.nodeName.toLowerCase()!=="map")return false;g=b("img[usemap=#"+a+"]")[0];return!!g&&f(g)}return(/input|select|textarea|button|object/.test(e)?!g.disabled:"a"==e?g.href||!isNaN(a):!isNaN(a))&&f(g)},tabbable:function(g){var e=b.attr(g,"tabindex");return(isNaN(e)||e>=0)&&b(g).is(":focusable")}});
16
+ b(function(){var g=document.body,e=g.appendChild(e=document.createElement("div"));b.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=e.offsetHeight===100;b.support.selectstart="onselectstart"in e;g.removeChild(e).style.display="none"});b.extend(b.ui,{plugin:{add:function(g,e,a){g=b.ui[g].prototype;for(var d in a){g.plugins[d]=g.plugins[d]||[];g.plugins[d].push([e,a[d]])}},call:function(g,e,a){if((e=g.plugins[e])&&g.element[0].parentNode)for(var d=0;d<e.length;d++)g.options[e[d][0]]&&
17
+ e[d][1].apply(g.element,a)}},contains:function(g,e){return document.compareDocumentPosition?g.compareDocumentPosition(e)&16:g!==e&&g.contains(e)},hasScroll:function(g,e){if(b(g).css("overflow")==="hidden")return false;e=e&&e==="left"?"scrollLeft":"scrollTop";var a=false;if(g[e]>0)return true;g[e]=1;a=g[e]>0;g[e]=0;return a},isOverAxis:function(g,e,a){return g>e&&g<e+a},isOver:function(g,e,a,d,h,i){return b.ui.isOverAxis(g,a,h)&&b.ui.isOverAxis(e,d,i)}})}})(jQuery);
18
+ (function(b,c){if(b.cleanData){var f=b.cleanData;b.cleanData=function(e){for(var a=0,d;(d=e[a])!=null;a++)b(d).triggerHandler("remove");f(e)}}else{var g=b.fn.remove;b.fn.remove=function(e,a){return this.each(function(){if(!a)if(!e||b.filter(e,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return g.call(b(this),e,a)})}}b.widget=function(e,a,d){var h=e.split(".")[0],i;e=e.split(".")[1];i=h+"-"+e;if(!d){d=a;a=b.Widget}b.expr[":"][i]=function(j){return!!b.data(j,
19
+ e)};b[h]=b[h]||{};b[h][e]=function(j,n){arguments.length&&this._createWidget(j,n)};a=new a;a.options=b.extend(true,{},a.options);b[h][e].prototype=b.extend(true,a,{namespace:h,widgetName:e,widgetEventPrefix:b[h][e].prototype.widgetEventPrefix||e,widgetBaseClass:i},d);b.widget.bridge(e,b[h][e])};b.widget.bridge=function(e,a){b.fn[e]=function(d){var h=typeof d==="string",i=Array.prototype.slice.call(arguments,1),j=this;d=!h&&i.length?b.extend.apply(null,[true,d].concat(i)):d;if(h&&d.charAt(0)==="_")return j;
20
+ h?this.each(function(){var n=b.data(this,e),q=n&&b.isFunction(n[d])?n[d].apply(n,i):n;if(q!==n&&q!==c){j=q;return false}}):this.each(function(){var n=b.data(this,e);n?n.option(d||{})._init():b.data(this,e,new a(d,this))});return j}};b.Widget=function(e,a){arguments.length&&this._createWidget(e,a)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(e,a){b.data(a,this.widgetName,this);this.element=b(a);this.options=b.extend(true,{},this.options,
21
+ this._getCreateOptions(),e);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
22
+ widget:function(){return this.element},option:function(e,a){var d=e;if(arguments.length===0)return b.extend({},this.options);if(typeof e==="string"){if(a===c)return this.options[e];d={};d[e]=a}this._setOptions(d);return this},_setOptions:function(e){var a=this;b.each(e,function(d,h){a._setOption(d,h)});return this},_setOption:function(e,a){this.options[e]=a;if(e==="disabled")this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",a);return this},
23
+ enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,a,d){var h=this.options[e];a=b.Event(a);a.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();d=d||{};if(a.originalEvent){e=b.event.props.length;for(var i;e;){i=b.event.props[--e];a[i]=a.originalEvent[i]}}this.element.trigger(a,d);return!(b.isFunction(h)&&h.call(this.element[0],a,d)===false||a.isDefaultPrevented())}}})(jQuery);
24
+ (function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(f){return c._mouseDown(f)}).bind("click."+this.widgetName,function(f){if(true===b.data(f.target,c.widgetName+".preventClickEvent")){b.removeData(f.target,c.widgetName+".preventClickEvent");f.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(c){c.originalEvent=
25
+ c.originalEvent||{};if(!c.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var f=this,g=c.which==1,e=typeof this.options.cancel=="string"?b(c.target).parents().add(c.target).filter(this.options.cancel).length:false;if(!g||e||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=
26
+ this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();return true}}this._mouseMoveDelegate=function(a){return f._mouseMove(a)};this._mouseUpDelegate=function(a){return f._mouseUp(a)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();return c.originalEvent.mouseHandled=true}},_mouseMove:function(c){if(b.browser.msie&&!(document.documentMode>=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);
27
+ return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;c.target==this._mouseDownEvent.target&&b.data(c.target,this.widgetName+".preventClickEvent",
28
+ true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
29
+ (function(b){b.widget("ui.draggable",b.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
30
+ "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var f=
31
+ this.options;if(this.helper||f.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var f=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
32
+ this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);f.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();
33
+ b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,f){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!f){f=this._uiHash();if(this._trigger("drag",c,f)===false){this._mouseUp({});return false}this.position=f.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
34
+ this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var f=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)f=b.ui.ddmanager.drop(this,c);if(this.dropped){f=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!f||this.options.revert=="valid"&&f||this.options.revert===true||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,
35
+ f)){var g=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){g._trigger("stop",c)!==false&&g._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var f=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
36
+ c.target)f=true});return f},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c])):f.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(f.appendTo=="parent"?this.element[0].parentNode:f.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||
37
+ 0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
38
+ this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-
39
+ (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment==
40
+ "parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[(c.containment=="document"?0:b(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(c.containment=="document"?0:b(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(c.containment=="document"?0:b(window).scrollLeft())+b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c.containment=="document"?
41
+ 0:b(window).scrollTop())+(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){var f=b(c.containment)[0];if(f){c=b(c.containment).offset();var g=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"),
42
+ 10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor==
43
+ Array)this.containment=c.containment},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
44
+ e?0:g.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*c)}},_generatePosition:function(c){var f=this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName),a=c.pageX,d=c.pageY;
45
+ if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])a=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])d=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/
46
+ f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?d:!(d-this.offset.click.top<this.containment[1])?d-f.grid[1]:d+f.grid[1]:d;a=this.originalPageX+Math.round((a-this.originalPageX)/f.grid[0])*f.grid[0];a=this.containment?!(a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2])?a:!(a-this.offset.click.left<this.containment[0])?a-f.grid[0]:a+f.grid[0]:a}}return{top:d-this.offset.click.top-
47
+ this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:g.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
48
+ this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,f,g){g=g||this._uiHash();b.ui.plugin.call(this,c,[f,g]);if(c=="drag")this.positionAbs=this._convertPositionTo("absolute");return b.Widget.prototype._trigger.call(this,c,f,g)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.extend(b.ui.draggable,{version:"1.8.8"});
49
+ b.ui.plugin.add("draggable","connectToSortable",{start:function(c,f){var g=b(this).data("draggable"),e=g.options,a=b.extend({},f,{item:g.element});g.sortables=[];b(e.connectToSortable).each(function(){var d=b.data(this,"sortable");if(d&&!d.options.disabled){g.sortables.push({instance:d,shouldRevert:d.options.revert});d._refreshItems();d._trigger("activate",c,a)}})},stop:function(c,f){var g=b(this).data("draggable"),e=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=
50
+ 0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;g.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,e)}})},drag:function(c,f){var g=b(this).data("draggable"),e=this;b.each(g.sortables,function(){this.instance.positionAbs=
51
+ g.positionAbs;this.instance.helperProportions=g.helperProportions;this.instance.offset.click=g.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,
52
+ true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=g.offset.click.top;this.instance.offset.click.left=g.offset.click.left;this.instance.offset.parent.left-=g.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=g.offset.parent.top-this.instance.offset.parent.top;g._trigger("toSortable",c);g.dropped=this.instance.element;g.currentItem=g.element;this.instance.fromOutside=g}this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=
53
+ 0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();g._trigger("fromSortable",c);g.dropped=false}})}});b.ui.plugin.add("draggable","cursor",{start:function(){var c=b("body"),f=b(this).data("draggable").options;if(c.css("cursor"))f._cursor=
54
+ c.css("cursor");c.css("cursor",f.cursor)},stop:function(){var c=b(this).data("draggable").options;c._cursor&&b("body").css("cursor",c._cursor)}});b.ui.plugin.add("draggable","iframeFix",{start:function(){var c=b(this).data("draggable").options;b(c.iframeFix===true?"iframe":c.iframeFix).each(function(){b('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(b(this).offset()).appendTo("body")})},
55
+ stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("opacity"))f._opacity=c.css("opacity");c.css("opacity",f.opacity)},stop:function(c,f){c=b(this).data("draggable").options;c._opacity&&b(f.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!=
56
+ document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var f=b(this).data("draggable"),g=f.options,e=false;if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x")if(f.overflowOffset.top+f.scrollParent[0].offsetHeight-c.pageY<g.scrollSensitivity)f.scrollParent[0].scrollTop=e=f.scrollParent[0].scrollTop+g.scrollSpeed;else if(c.pageY-f.overflowOffset.top<g.scrollSensitivity)f.scrollParent[0].scrollTop=e=f.scrollParent[0].scrollTop-
57
+ g.scrollSpeed;if(!g.axis||g.axis!="y")if(f.overflowOffset.left+f.scrollParent[0].offsetWidth-c.pageX<g.scrollSensitivity)f.scrollParent[0].scrollLeft=e=f.scrollParent[0].scrollLeft+g.scrollSpeed;else if(c.pageX-f.overflowOffset.left<g.scrollSensitivity)f.scrollParent[0].scrollLeft=e=f.scrollParent[0].scrollLeft-g.scrollSpeed}else{if(!g.axis||g.axis!="x")if(c.pageY-b(document).scrollTop()<g.scrollSensitivity)e=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed);else if(b(window).height()-
58
+ (c.pageY-b(document).scrollTop())<g.scrollSensitivity)e=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed);if(!g.axis||g.axis!="y")if(c.pageX-b(document).scrollLeft()<g.scrollSensitivity)e=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<g.scrollSensitivity)e=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}e!==false&&b.ui.ddmanager&&!g.dropBehaviour&&b.ui.ddmanager.prepareOffsets(f,c)}});b.ui.plugin.add("draggable",
59
+ "snap",{start:function(){var c=b(this).data("draggable"),f=c.options;c.snapElements=[];b(f.snap.constructor!=String?f.snap.items||":data(draggable)":f.snap).each(function(){var g=b(this),e=g.offset();this!=c.element[0]&&c.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:e.top,left:e.left})})},drag:function(c,f){for(var g=b(this).data("draggable"),e=g.options,a=e.snapTolerance,d=f.offset.left,h=d+g.helperProportions.width,i=f.offset.top,j=i+g.helperProportions.height,n=
60
+ g.snapElements.length-1;n>=0;n--){var q=g.snapElements[n].left,l=q+g.snapElements[n].width,k=g.snapElements[n].top,m=k+g.snapElements[n].height;if(q-a<d&&d<l+a&&k-a<i&&i<m+a||q-a<d&&d<l+a&&k-a<j&&j<m+a||q-a<h&&h<l+a&&k-a<i&&i<m+a||q-a<h&&h<l+a&&k-a<j&&j<m+a){if(e.snapMode!="inner"){var o=Math.abs(k-j)<=a,p=Math.abs(m-i)<=a,s=Math.abs(q-h)<=a,r=Math.abs(l-d)<=a;if(o)f.position.top=g._convertPositionTo("relative",{top:k-g.helperProportions.height,left:0}).top-g.margins.top;if(p)f.position.top=g._convertPositionTo("relative",
61
+ {top:m,left:0}).top-g.margins.top;if(s)f.position.left=g._convertPositionTo("relative",{top:0,left:q-g.helperProportions.width}).left-g.margins.left;if(r)f.position.left=g._convertPositionTo("relative",{top:0,left:l}).left-g.margins.left}var u=o||p||s||r;if(e.snapMode!="outer"){o=Math.abs(k-i)<=a;p=Math.abs(m-j)<=a;s=Math.abs(q-d)<=a;r=Math.abs(l-h)<=a;if(o)f.position.top=g._convertPositionTo("relative",{top:k,left:0}).top-g.margins.top;if(p)f.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,
62
+ left:0}).top-g.margins.top;if(s)f.position.left=g._convertPositionTo("relative",{top:0,left:q}).left-g.margins.left;if(r)f.position.left=g._convertPositionTo("relative",{top:0,left:l-g.helperProportions.width}).left-g.margins.left}if(!g.snapElements[n].snapping&&(o||p||s||r||u))g.options.snap.snap&&g.options.snap.snap.call(g.element,c,b.extend(g._uiHash(),{snapItem:g.snapElements[n].item}));g.snapElements[n].snapping=o||p||s||r||u}else{g.snapElements[n].snapping&&g.options.snap.release&&g.options.snap.release.call(g.element,
63
+ c,b.extend(g._uiHash(),{snapItem:g.snapElements[n].item}));g.snapElements[n].snapping=false}}}});b.ui.plugin.add("draggable","stack",{start:function(){var c=b(this).data("draggable").options;c=b.makeArray(b(c.stack)).sort(function(g,e){return(parseInt(b(g).css("zIndex"),10)||0)-(parseInt(b(e).css("zIndex"),10)||0)});if(c.length){var f=parseInt(c[0].style.zIndex)||0;b(c).each(function(g){this.style.zIndex=f+g});this[0].style.zIndex=f+c.length}}});b.ui.plugin.add("draggable","zIndex",{start:function(c,
64
+ f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("zIndex"))f._zIndex=c.css("zIndex");c.css("zIndex",f.zIndex)},stop:function(c,f){c=b(this).data("draggable").options;c._zIndex&&b(f.helper).css("zIndex",c._zIndex)}})})(jQuery);
65
+ (function(b){b.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,f=c.accept;this.isover=0;this.isout=1;this.accept=b.isFunction(f)?f:function(g){return g.is(f)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[c.scope]=b.ui.ddmanager.droppables[c.scope]||[];b.ui.ddmanager.droppables[c.scope].push(this);
66
+ c.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var c=b.ui.ddmanager.droppables[this.options.scope],f=0;f<c.length;f++)c[f]==this&&c.splice(f,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,f){if(c=="accept")this.accept=b.isFunction(f)?f:function(g){return g.is(f)};b.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var f=b.ui.ddmanager.current;this.options.activeClass&&
67
+ this.element.addClass(this.options.activeClass);f&&this._trigger("activate",c,this.ui(f))},_deactivate:function(c){var f=b.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);f&&this._trigger("deactivate",c,this.ui(f))},_over:function(c){var f=b.ui.ddmanager.current;if(!(!f||(f.currentItem||f.element)[0]==this.element[0]))if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
68
+ this._trigger("over",c,this.ui(f))}},_out:function(c){var f=b.ui.ddmanager.current;if(!(!f||(f.currentItem||f.element)[0]==this.element[0]))if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",c,this.ui(f))}},_drop:function(c,f){var g=f||b.ui.ddmanager.current;if(!g||(g.currentItem||g.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var a=
69
+ b.data(this,"droppable");if(a.options.greedy&&!a.options.disabled&&a.options.scope==g.options.scope&&a.accept.call(a.element[0],g.currentItem||g.element)&&b.ui.intersect(g,b.extend(a,{offset:a.element.offset()}),a.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],g.currentItem||g.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
70
+ c,this.ui(g));return this.element}return false},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});b.extend(b.ui.droppable,{version:"1.8.8"});b.ui.intersect=function(c,f,g){if(!f.offset)return false;var e=(c.positionAbs||c.position.absolute).left,a=e+c.helperProportions.width,d=(c.positionAbs||c.position.absolute).top,h=d+c.helperProportions.height,i=f.offset.left,j=i+f.proportions.width,n=f.offset.top,q=n+f.proportions.height;
71
+ switch(g){case "fit":return i<=e&&a<=j&&n<=d&&h<=q;case "intersect":return i<e+c.helperProportions.width/2&&a-c.helperProportions.width/2<j&&n<d+c.helperProportions.height/2&&h-c.helperProportions.height/2<q;case "pointer":return b.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,n,i,f.proportions.height,f.proportions.width);case "touch":return(d>=n&&d<=q||h>=n&&h<=q||d<n&&h>q)&&(e>=
72
+ i&&e<=j||a>=i&&a<=j||e<i&&a>j);default:return false}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,f){var g=b.ui.ddmanager.droppables[c.options.scope]||[],e=f?f.type:null,a=(c.currentItem||c.element).find(":data(droppable)").andSelf(),d=0;a:for(;d<g.length;d++)if(!(g[d].options.disabled||c&&!g[d].accept.call(g[d].element[0],c.currentItem||c.element))){for(var h=0;h<a.length;h++)if(a[h]==g[d].element[0]){g[d].proportions.height=0;continue a}g[d].visible=g[d].element.css("display")!=
73
+ "none";if(g[d].visible){g[d].offset=g[d].element.offset();g[d].proportions={width:g[d].element[0].offsetWidth,height:g[d].element[0].offsetHeight};e=="mousedown"&&g[d]._activate.call(g[d],f)}}},drop:function(c,f){var g=false;b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&b.ui.intersect(c,this,this.options.tolerance))g=g||this._drop.call(this,f);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||
74
+ c.element)){this.isout=1;this.isover=0;this._deactivate.call(this,f)}}});return g},drag:function(c,f){c.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(c,f);b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var g=b.ui.intersect(c,this,this.options.tolerance);if(g=!g&&this.isover==1?"isout":g&&this.isover==0?"isover":null){var e;if(this.options.greedy){var a=this.element.parents(":data(droppable):eq(0)");if(a.length){e=
75
+ b.data(a[0],"droppable");e.greedyChild=g=="isover"?1:0}}if(e&&g=="isover"){e.isover=0;e.isout=1;e._out.call(e,f)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,f);if(e&&g=="isout"){e.isout=0;e.isover=1;e._over.call(e,f)}}}})}}})(jQuery);
76
+ (function(b){b.widget("ui.resizable",b.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var g=this,e=this.options;this.element.addClass("ui-resizable");b.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,
77
+ _proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&b.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(b('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
78
+ top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
79
+ this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=e.handles||(!b(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
80
+ nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var a=this.handles.split(",");this.handles={};for(var d=0;d<a.length;d++){var h=b.trim(a[d]),i=b('<div class="ui-resizable-handle '+("ui-resizable-"+h)+'"></div>');/sw|se|ne|nw/.test(h)&&i.css({zIndex:++e.zIndex});"se"==h&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(i)}}this._renderAxis=function(j){j=j||this.element;for(var n in this.handles){if(this.handles[n].constructor==
81
+ String)this.handles[n]=b(this.handles[n],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=b(this.handles[n],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(n)?q.outerHeight():q.outerWidth();q=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");j.css(q,l);this._proportionallyResize()}b(this.handles[n])}};this._renderAxis(this.element);this._handles=b(".ui-resizable-handle",this.element).disableSelection();
82
+ this._handles.mouseover(function(){if(!g.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);g.axis=j&&j[1]?j[1]:"se"}});if(e.autoHide){this._handles.hide();b(this.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");g._handles.show()},function(){if(!g.resizing){b(this).addClass("ui-resizable-autohide");g._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var g=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
83
+ if(this.elementIsWrapper){g(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);g(this.originalElement);return this},_mouseCapture:function(g){var e=false;for(var a in this.handles)if(b(this.handles[a])[0]==g.target)e=true;return!this.options.disabled&&e},_mouseStart:function(g){var e=this.options,a=this.element.position(),
84
+ d=this.element;this.resizing=true;this.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:a.top,left:a.left});b.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();a=c(this.helper.css("left"));var h=c(this.helper.css("top"));if(e.containment){a+=b(e.containment).scrollLeft()||0;h+=b(e.containment).scrollTop()||0}this.offset=
85
+ this.helper.offset();this.position={left:a,top:h};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:a,top:h};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=typeof e.aspectRatio=="number"?e.aspectRatio:
86
+ this.originalSize.width/this.originalSize.height||1;e=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor",e=="auto"?this.axis+"-resize":e);d.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(g){var e=this.helper,a=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;a=d.apply(this,[g,g.pageX-a.left||0,g.pageY-a.top||0]);if(this._aspectRatio||g.shiftKey)a=this._updateRatio(a,g);a=this._respectSize(a,g);this._propagate("resize",
87
+ g);e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(a);this._trigger("resize",g,this.ui());return false},_mouseStop:function(g){this.resizing=false;var e=this.options,a=this;if(this._helper){var d=this._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName);d=h&&b.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;
88
+ h={width:a.size.width-(h?0:a.sizeDiff.width),height:a.size.height-d};d=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var i=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;e.animate||this.element.css(b.extend(h,{top:i,left:d}));a.helper.height(a.size.height);a.helper.width(a.size.width);this._helper&&!e.animate&&this._proportionallyResize()}b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
89
+ g);this._helper&&this.helper.remove();return false},_updateCache:function(g){this.offset=this.helper.offset();if(f(g.left))this.position.left=g.left;if(f(g.top))this.position.top=g.top;if(f(g.height))this.size.height=g.height;if(f(g.width))this.size.width=g.width},_updateRatio:function(g){var e=this.position,a=this.size,d=this.axis;if(g.height)g.width=a.height*this.aspectRatio;else if(g.width)g.height=a.width/this.aspectRatio;if(d=="sw"){g.left=e.left+(a.width-g.width);g.top=null}if(d=="nw"){g.top=
90
+ e.top+(a.height-g.height);g.left=e.left+(a.width-g.width)}return g},_respectSize:function(g){var e=this.options,a=this.axis,d=f(g.width)&&e.maxWidth&&e.maxWidth<g.width,h=f(g.height)&&e.maxHeight&&e.maxHeight<g.height,i=f(g.width)&&e.minWidth&&e.minWidth>g.width,j=f(g.height)&&e.minHeight&&e.minHeight>g.height;if(i)g.width=e.minWidth;if(j)g.height=e.minHeight;if(d)g.width=e.maxWidth;if(h)g.height=e.maxHeight;var n=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height,
91
+ l=/sw|nw|w/.test(a);a=/nw|ne|n/.test(a);if(i&&l)g.left=n-e.minWidth;if(d&&l)g.left=n-e.maxWidth;if(j&&a)g.top=q-e.minHeight;if(h&&a)g.top=q-e.maxHeight;if((e=!g.width&&!g.height)&&!g.left&&g.top)g.top=null;else if(e&&!g.top&&g.left)g.left=null;return g},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var g=this.helper||this.element,e=0;e<this._proportionallyResizeElements.length;e++){var a=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[a.css("borderTopWidth"),
92
+ a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],h=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];this.borderDif=b.map(d,function(i,j){i=parseInt(i,10)||0;j=parseInt(h[j],10)||0;return i+j})}b.browser.msie&&(b(g).is(":hidden")||b(g).parents(":hidden").length)||a.css({height:g.height()-this.borderDif[0]-this.borderDif[2]||0,width:g.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var g=this.options;this.elementOffset=
93
+ this.element.offset();if(this._helper){this.helper=this.helper||b('<div style="overflow:hidden;"></div>');var e=b.browser.msie&&b.browser.version<7,a=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-a+"px",top:this.elementOffset.top-a+"px",zIndex:++g.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(g,e){return{width:this.originalSize.width+
94
+ e}},w:function(g,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(g,e,a){return{top:this.originalPosition.top+a,height:this.originalSize.height-a}},s:function(g,e,a){return{height:this.originalSize.height+a}},se:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,e,a]))},sw:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,e,a]))},ne:function(g,e,a){return b.extend(this._change.n.apply(this,
95
+ arguments),this._change.e.apply(this,[g,e,a]))},nw:function(g,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,e,a]))}},_propagate:function(g,e){b.ui.plugin.call(this,g,[e,this.ui()]);g!="resize"&&this._trigger(g,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.extend(b.ui.resizable,
96
+ {version:"1.8.8"});b.ui.plugin.add("resizable","alsoResize",{start:function(){var g=b(this).data("resizable").options,e=function(a){b(a).each(function(){var d=b(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof g.alsoResize=="object"&&!g.alsoResize.parentNode)if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];e(g.alsoResize)}else b.each(g.alsoResize,
97
+ function(a){e(a)});else e(g.alsoResize)},resize:function(g,e){var a=b(this).data("resizable");g=a.options;var d=a.originalSize,h=a.originalPosition,i={height:a.size.height-d.height||0,width:a.size.width-d.width||0,top:a.position.top-h.top||0,left:a.position.left-h.left||0},j=function(n,q){b(n).each(function(){var l=b(this),k=b(this).data("resizable-alsoresize"),m={},o=q&&q.length?q:l.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(o,function(p,s){if((p=
98
+ (k[s]||0)+(i[s]||0))&&p>=0)m[s]=p||null});if(b.browser.opera&&/relative/.test(l.css("position"))){a._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(m)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?b.each(g.alsoResize,function(n,q){j(n,q)}):j(g.alsoResize)},stop:function(){var g=b(this).data("resizable"),e=g.options,a=function(d){b(d).each(function(){var h=b(this);h.css({position:h.data("resizable-alsoresize").position})})};if(g._revertToRelativePosition){g._revertToRelativePosition=
99
+ false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?b.each(e.alsoResize,function(d){a(d)}):a(e.alsoResize)}b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","animate",{stop:function(g){var e=b(this).data("resizable"),a=e.options,d=e._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName),i=h&&b.ui.hasScroll(d[0],"left")?0:e.sizeDiff.height;h={width:e.size.width-(h?0:e.sizeDiff.width),height:e.size.height-i};i=parseInt(e.element.css("left"),10)+(e.position.left-
100
+ e.originalPosition.left)||null;var j=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(b.extend(h,j&&i?{top:j,left:i}:{}),{duration:a.animateDuration,easing:a.animateEasing,step:function(){var n={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};d&&d.length&&b(d[0]).css({width:n.width,height:n.height});e._updateCache(n);e._propagate("resize",
101
+ g)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var g=b(this).data("resizable"),e=g.element,a=g.options.containment;if(e=a instanceof b?a.get(0):/parent/.test(a)?e.parent().get(0):a){g.containerElement=b(e);if(/document/.test(a)||a==document){g.containerOffset={left:0,top:0};g.containerPosition={left:0,top:0};g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{var d=b(e),h=[];b(["Top",
102
+ "Right","Left","Bottom"]).each(function(n,q){h[n]=c(d.css("padding"+q))});g.containerOffset=d.offset();g.containerPosition=d.position();g.containerSize={height:d.innerHeight()-h[3],width:d.innerWidth()-h[1]};a=g.containerOffset;var i=g.containerSize.height,j=g.containerSize.width;j=b.ui.hasScroll(e,"left")?e.scrollWidth:j;i=b.ui.hasScroll(e)?e.scrollHeight:i;g.parentData={element:e,left:a.left,top:a.top,width:j,height:i}}}},resize:function(g){var e=b(this).data("resizable"),a=e.options,d=e.containerOffset,
103
+ h=e.position;g=e._aspectRatio||g.shiftKey;var i={top:0,left:0},j=e.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))i=d;if(h.left<(e._helper?d.left:0)){e.size.width+=e._helper?e.position.left-d.left:e.position.left-i.left;if(g)e.size.height=e.size.width/a.aspectRatio;e.position.left=a.helper?d.left:0}if(h.top<(e._helper?d.top:0)){e.size.height+=e._helper?e.position.top-d.top:e.position.top;if(g)e.size.width=e.size.height*a.aspectRatio;e.position.top=e._helper?d.top:0}e.offset.left=
104
+ e.parentData.left+e.position.left;e.offset.top=e.parentData.top+e.position.top;a=Math.abs((e._helper?e.offset.left-i.left:e.offset.left-i.left)+e.sizeDiff.width);d=Math.abs((e._helper?e.offset.top-i.top:e.offset.top-d.top)+e.sizeDiff.height);h=e.containerElement.get(0)==e.element.parent().get(0);i=/relative|absolute/.test(e.containerElement.css("position"));if(h&&i)a-=e.parentData.left;if(a+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-a;if(g)e.size.height=e.size.width/e.aspectRatio}if(d+
105
+ e.size.height>=e.parentData.height){e.size.height=e.parentData.height-d;if(g)e.size.width=e.size.height*e.aspectRatio}},stop:function(){var g=b(this).data("resizable"),e=g.options,a=g.containerOffset,d=g.containerPosition,h=g.containerElement,i=b(g.helper),j=i.offset(),n=i.outerWidth()-g.sizeDiff.width;i=i.outerHeight()-g.sizeDiff.height;g._helper&&!e.animate&&/relative/.test(h.css("position"))&&b(this).css({left:j.left-d.left-a.left,width:n,height:i});g._helper&&!e.animate&&/static/.test(h.css("position"))&&
106
+ b(this).css({left:j.left-d.left-a.left,width:n,height:i})}});b.ui.plugin.add("resizable","ghost",{start:function(){var g=b(this).data("resizable"),e=g.options,a=g.size;g.ghost=g.originalElement.clone();g.ghost.css({opacity:0.25,display:"block",position:"relative",height:a.height,width:a.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");g.ghost.appendTo(g.helper)},resize:function(){var g=b(this).data("resizable");g.ghost&&g.ghost.css({position:"relative",
107
+ height:g.size.height,width:g.size.width})},stop:function(){var g=b(this).data("resizable");g.ghost&&g.helper&&g.helper.get(0).removeChild(g.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var g=b(this).data("resizable"),e=g.options,a=g.size,d=g.originalSize,h=g.originalPosition,i=g.axis;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var j=Math.round((a.width-d.width)/(e.grid[0]||1))*(e.grid[0]||1);e=Math.round((a.height-d.height)/(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(i)){g.size.width=
108
+ d.width+j;g.size.height=d.height+e}else if(/^(ne)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}else{if(/^(sw)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e}else{g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}g.position.left=h.left-j}}});var c=function(g){return parseInt(g,10)||0},f=function(g){return!isNaN(parseInt(g,10))}})(jQuery);
109
+ (function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=b(c.options.filter,c.element[0]);f.each(function(){var g=b(this),e=g.offset();b.data(this,"selectable-item",{element:this,$element:g,left:e.left,top:e.top,right:e.left+g.outerWidth(),bottom:e.top+g.outerHeight(),startselected:false,selected:g.hasClass("ui-selected"),
110
+ selecting:g.hasClass("ui-selecting"),unselecting:g.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=b("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
111
+ c.pageY];if(!this.options.disabled){var g=this.options;this.selectees=b(g.filter,this.element[0]);this._trigger("start",c);b(g.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});g.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=b.data(this,"selectable-item");e.startselected=true;if(!c.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;f._trigger("unselecting",
112
+ c,{unselecting:e.element})}});b(c.target).parents().andSelf().each(function(){var e=b.data(this,"selectable-item");if(e){var a=!c.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(a?"ui-unselecting":"ui-selected").addClass(a?"ui-selecting":"ui-unselecting");e.unselecting=!a;e.selecting=a;(e.selected=a)?f._trigger("selecting",c,{selecting:e.element}):f._trigger("unselecting",c,{unselecting:e.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var g=
113
+ this.options,e=this.opos[0],a=this.opos[1],d=c.pageX,h=c.pageY;if(e>d){var i=d;d=e;e=i}if(a>h){i=h;h=a;a=i}this.helper.css({left:e,top:a,width:d-e,height:h-a});this.selectees.each(function(){var j=b.data(this,"selectable-item");if(!(!j||j.element==f.element[0])){var n=false;if(g.tolerance=="touch")n=!(j.left>d||j.right<e||j.top>h||j.bottom<a);else if(g.tolerance=="fit")n=j.left>e&&j.right<d&&j.top>a&&j.bottom<h;if(n){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");
114
+ j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;f._trigger("selecting",c,{selecting:j.element})}}else{if(j.selecting)if(c.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}f._trigger("unselecting",c,{unselecting:j.element})}if(j.selected)if(!c.metaKey&&
115
+ !j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;f._trigger("unselecting",c,{unselecting:j.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;b(".ui-unselecting",this.element[0]).each(function(){var g=b.data(this,"selectable-item");g.$element.removeClass("ui-unselecting");g.unselecting=false;g.startselected=false;f._trigger("unselected",c,{unselected:g.element})});b(".ui-selecting",this.element[0]).each(function(){var g=
116
+ b.data(this,"selectable-item");g.$element.removeClass("ui-selecting").addClass("ui-selected");g.selecting=false;g.selected=true;g.startselected=true;f._trigger("selected",c,{selected:g.element})});this._trigger("stop",c);this.helper.remove();return false}});b.extend(b.ui.selectable,{version:"1.8.8"})})(jQuery);
117
+ (function(b){b.widget("ui.sortable",b.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
118
+ this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(c,f){if(c==="disabled"){this.options[c]=f;this.widget()[f?"addClass":"removeClass"]("ui-sortable-disabled")}else b.Widget.prototype._setOption.apply(this,
119
+ arguments)},_mouseCapture:function(c,f){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(c);var g=null,e=this;b(c.target).parents().each(function(){if(b.data(this,"sortable-item")==e){g=b(this);return false}});if(b.data(c.target,"sortable-item")==e)g=b(c.target);if(!g)return false;if(this.options.handle&&!f){var a=false;b(this.options.handle,g).find("*").andSelf().each(function(){if(this==c.target)a=true});if(!a)return false}this.currentItem=
120
+ g;this._removeCurrentsFromItems();return true},_mouseStart:function(c,f,g){f=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");b.extend(this.offset,
121
+ {click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();f.containment&&this._setContainment();
122
+ if(f.cursor){if(b("body").css("cursor"))this._storedCursor=b("body").css("cursor");b("body").css("cursor",f.cursor)}if(f.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",f.opacity)}if(f.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",f.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
123
+ c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!g)for(g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",c,e._uiHash(this));if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");
124
+ if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var f=this.options,g=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop+f.scrollSpeed;else if(c.pageY-this.overflowOffset.top<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop-f.scrollSpeed;if(this.overflowOffset.left+
125
+ this.scrollParent[0].offsetWidth-c.pageX<f.scrollSensitivity)this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft+f.scrollSpeed;else if(c.pageX-this.overflowOffset.left<f.scrollSensitivity)this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft-f.scrollSpeed}else{if(c.pageY-b(document).scrollTop()<f.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()-f.scrollSpeed);else if(b(window).height()-(c.pageY-b(document).scrollTop())<f.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()+
126
+ f.scrollSpeed);if(c.pageX-b(document).scrollLeft()<f.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()-f.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<f.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()+f.scrollSpeed)}g!==false&&b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
127
+ "px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(f=this.items.length-1;f>=0;f--){g=this.items[f];var e=g.item[0],a=this._intersectsWithPointer(g);if(a)if(e!=this.currentItem[0]&&this.placeholder[a==1?"next":"prev"]()[0]!=e&&!b.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],e):true)){this.direction=a==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(g))this._rearrange(c,
128
+ g);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);this._trigger("sort",c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,f){if(c){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,c);if(this.options.revert){var g=this;f=g.placeholder.offset();g.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-g.margins.left+(this.offsetParent[0]==
129
+ document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-g.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){g._clear(c)})}else this._clear(c,f);return false}},cancel:function(){var c=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var f=this.containers.length-1;f>=0;f--){this.containers[f]._trigger("deactivate",
130
+ null,c._uiHash(this));if(this.containers[f].containerCache.over){this.containers[f]._trigger("out",null,c._uiHash(this));this.containers[f].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem):
131
+ b(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};b(f).each(function(){var e=(b(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(e)g.push((c.key||e[1]+"[]")+"="+(c.key&&c.expression?e[1]:e[2]))});!g.length&&c.key&&g.push(c.key+"=");return g.join("&")},toArray:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};f.each(function(){g.push(b(c.item||this).attr(c.attribute||
132
+ "id")||"")});return g},_intersectsWith:function(c){var f=this.positionAbs.left,g=f+this.helperProportions.width,e=this.positionAbs.top,a=e+this.helperProportions.height,d=c.left,h=d+c.width,i=c.top,j=i+c.height,n=this.offset.click.top,q=this.offset.click.left;n=e+n>i&&e+n<j&&f+q>d&&f+q<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?n:d<f+
133
+ this.helperProportions.width/2&&g-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&a-this.helperProportions.height/2<j},_intersectsWithPointer:function(c){var f=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left,c.width);f=f&&c;c=this._getDragVerticalDirection();var g=this._getDragHorizontalDirection();if(!f)return false;return this.floating?g&&g=="right"||c=="down"?2:1:c&&(c=="down"?
134
+ 2:1)},_intersectsWithSides:function(c){var f=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top+c.height/2,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left+c.width/2,c.width);var g=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&c||e=="left"&&!c:g&&(g=="down"&&f||g=="up"&&!f)},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},
135
+ _getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var f=[],g=[],e=this._connectWith();if(e&&c)for(c=e.length-1;c>=0;c--)for(var a=b(e[c]),d=a.length-1;d>=0;d--){var h=b.data(a[d],"sortable");if(h&&h!=
136
+ this&&!h.options.disabled)g.push([b.isFunction(h.options.items)?h.options.items.call(h.element):b(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}g.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=g.length-1;c>=0;c--)g[c][0].each(function(){f.push(this)});return b(f)},_removeCurrentsFromItems:function(){for(var c=
137
+ this.currentItem.find(":data(sortable-item)"),f=0;f<this.items.length;f++)for(var g=0;g<c.length;g++)c[g]==this.items[f].item[0]&&this.items.splice(f,1)},_refreshItems:function(c){this.items=[];this.containers=[this];var f=this.items,g=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):b(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var a=e.length-1;a>=0;a--)for(var d=b(e[a]),h=d.length-1;h>=0;h--){var i=b.data(d[h],"sortable");
138
+ if(i&&i!=this&&!i.options.disabled){g.push([b.isFunction(i.options.items)?i.options.items.call(i.element[0],c,{item:this.currentItem}):b(i.options.items,i.element),i]);this.containers.push(i)}}for(a=g.length-1;a>=0;a--){c=g[a][1];e=g[a][0];h=0;for(d=e.length;h<d;h++){i=b(e[h]);i.data("sortable-item",c);f.push({item:i,instance:c,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var f=this.items.length-1;f>=
139
+ 0;f--){var g=this.items[f],e=this.options.toleranceElement?b(this.options.toleranceElement,g.item):g.item;if(!c){g.width=e.outerWidth();g.height=e.outerHeight()}e=e.offset();g.left=e.left;g.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(f=this.containers.length-1;f>=0;f--){e=this.containers[f].element.offset();this.containers[f].containerCache.left=e.left;this.containers[f].containerCache.top=e.top;this.containers[f].containerCache.width=
140
+ this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}return this},_createPlaceholder:function(c){var f=c||this,g=f.options;if(!g.placeholder||g.placeholder.constructor==String){var e=g.placeholder;g.placeholder={element:function(){var a=b(document.createElement(f.currentItem[0].nodeName)).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)a.style.visibility="hidden";return a},
141
+ update:function(a,d){if(!(e&&!g.forcePlaceholderSize)){d.height()||d.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10));d.width()||d.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}}f.placeholder=b(g.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);g.placeholder.update(f,f.placeholder)},_contactContainers:function(c){for(var f=
142
+ null,g=null,e=this.containers.length-1;e>=0;e--)if(!b.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(f&&b.ui.contains(this.containers[e].element[0],f.element[0]))){f=this.containers[e];g=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",c,this._uiHash(this));this.containers[e].containerCache.over=0}if(f)if(this.containers.length===1){this.containers[g]._trigger("over",c,this._uiHash(this));
143
+ this.containers[g].containerCache.over=1}else if(this.currentContainer!=this.containers[g]){f=1E4;e=null;for(var a=this.positionAbs[this.containers[g].floating?"left":"top"],d=this.items.length-1;d>=0;d--)if(b.ui.contains(this.containers[g].element[0],this.items[d].item[0])){var h=this.items[d][this.containers[g].floating?"left":"top"];if(Math.abs(h-a)<f){f=Math.abs(h-a);e=this.items[d]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[g];e?this._rearrange(c,e,null,true):this._rearrange(c,
144
+ null,this.containers[g].element,true);this._trigger("change",c,this._uiHash());this.containers[g]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[g]._trigger("over",c,this._uiHash(this));this.containers[g].containerCache.over=1}}},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c,this.currentItem])):f.helper=="clone"?this.currentItem.clone():this.currentItem;c.parents("body").length||
145
+ b(f.appendTo!="parent"?f.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]);if(c[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(c[0].style.width==""||f.forceHelperSize)c.width(this.currentItem.width());if(c[0].style.height==""||f.forceHelperSize)c.height(this.currentItem.height());return c},_adjustOffsetFromHelper:function(c){if(typeof c==
146
+ "string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition==
147
+ "absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
148
+ "relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
149
+ _setContainment:function(){var c=this.options;if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
150
+ this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)){var f=b(c.containment)[0];c=b(c.containment).offset();var g=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"),10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),
151
+ 10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
152
+ this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:g.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*c)}},_generatePosition:function(c){var f=
153
+ this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var a=c.pageX,d=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])a=this.containment[0]+
154
+ this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])d=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?
155
+ d:!(d-this.offset.click.top<this.containment[1])?d-f.grid[1]:d+f.grid[1]:d;a=this.originalPageX+Math.round((a-this.originalPageX)/f.grid[0])*f.grid[0];a=this.containment?!(a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2])?a:!(a-this.offset.click.left<this.containment[0])?a-f.grid[0]:a+f.grid[0]:a}}return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
156
+ e?0:g.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())}},_rearrange:function(c,f,g,e){g?g[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?f.item[0]:f.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var a=this,d=this.counter;window.setTimeout(function(){d==
157
+ a.counter&&a.refreshPositions(!e)},0)},_clear:function(c,f){this.reverting=false;var g=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!f&&g.push(function(a){this._trigger("receive",
158
+ a,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!f)g.push(function(a){this._trigger("update",a,this._uiHash())});if(!b.ui.contains(this.element[0],this.currentItem[0])){f||g.push(function(a){this._trigger("remove",a,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(b.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!f){g.push(function(a){return function(d){a._trigger("receive",
159
+ d,this._uiHash(this))}}.call(this,this.containers[e]));g.push(function(a){return function(d){a._trigger("update",d,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){f||g.push(function(a){return function(d){a._trigger("deactivate",d,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){g.push(function(a){return function(d){a._trigger("out",d,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=
160
+ 0}}this._storedCursor&&b("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",c,this._uiHash());for(e=0;e<g.length;e++)g[e].call(this,c);this._trigger("stop",c,this._uiHash())}return false}f||this._trigger("beforeStop",c,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
161
+ this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!f){for(e=0;e<g.length;e++)g[e].call(this,c);this._trigger("stop",c,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){b.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(c){var f=c||this;return{helper:f.helper,placeholder:f.placeholder||b([]),position:f.position,originalPosition:f.originalPosition,offset:f.positionAbs,item:f.currentItem,sender:c?c.element:null}}});
162
+ b.extend(b.ui.sortable,{version:"1.8.8"})})(jQuery);
163
+ jQuery.effects||function(b,c){function f(l){var k;if(l&&l.constructor==Array&&l.length==3)return l;if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(l))return[parseInt(k[1],10),parseInt(k[2],10),parseInt(k[3],10)];if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(l))return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55];if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(l))return[parseInt(k[1],16),
164
+ parseInt(k[2],16),parseInt(k[3],16)];if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(l))return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(l))return j.transparent;return j[b.trim(l).toLowerCase()]}function g(l,k){var m;do{m=b.curCSS(l,k);if(m!=""&&m!="transparent"||b.nodeName(l,"body"))break;k="backgroundColor"}while(l=l.parentNode);return f(m)}function e(){var l=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
165
+ k={},m,o;if(l&&l.length&&l[0]&&l[l[0]])for(var p=l.length;p--;){m=l[p];if(typeof l[m]=="string"){o=m.replace(/\-(\w)/g,function(s,r){return r.toUpperCase()});k[o]=l[m]}}else for(m in l)if(typeof l[m]==="string")k[m]=l[m];return k}function a(l){var k,m;for(k in l){m=l[k];if(m==null||b.isFunction(m)||k in q||/scrollbar/.test(k)||!/color/i.test(k)&&isNaN(parseFloat(m)))delete l[k]}return l}function d(l,k){var m={_:0},o;for(o in k)if(l[o]!=k[o])m[o]=k[o];return m}function h(l,k,m,o){if(typeof l=="object"){o=
166
+ k;m=null;k=l;l=k.effect}if(b.isFunction(k)){o=k;m=null;k={}}if(typeof k=="number"||b.fx.speeds[k]){o=m;m=k;k={}}if(b.isFunction(m)){o=m;m=null}k=k||{};m=m||k.duration;m=b.fx.off?0:typeof m=="number"?m:m in b.fx.speeds?b.fx.speeds[m]:b.fx.speeds._default;o=o||k.complete;return[l,k,m,o]}function i(l){if(!l||typeof l==="number"||b.fx.speeds[l])return true;if(typeof l==="string"&&!b.effects[l])return true;return false}b.effects={};b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
167
+ "borderTopColor","borderColor","color","outlineColor"],function(l,k){b.fx.step[k]=function(m){if(!m.colorInit){m.start=g(m.elem,k);m.end=f(m.end);m.colorInit=true}m.elem.style[k]="rgb("+Math.max(Math.min(parseInt(m.pos*(m.end[0]-m.start[0])+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[1]-m.start[1])+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[2]-m.start[2])+m.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
168
+ 0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
169
+ 211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},n=["add","remove","toggle"],q={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.effects.animateClass=function(l,k,m,
170
+ o){if(b.isFunction(m)){o=m;m=null}return this.queue("fx",function(){var p=b(this),s=p.attr("style")||" ",r=a(e.call(this)),u,v=p.attr("className");b.each(n,function(w,y){l[y]&&p[y+"Class"](l[y])});u=a(e.call(this));p.attr("className",v);p.animate(d(r,u),k,m,function(){b.each(n,function(w,y){l[y]&&p[y+"Class"](l[y])});if(typeof p.attr("style")=="object"){p.attr("style").cssText="";p.attr("style").cssText=s}else p.attr("style",s);o&&o.apply(this,arguments)});r=b.queue(this);u=r.splice(r.length-1,1)[0];
171
+ r.splice(1,0,u);b.dequeue(this)})};b.fn.extend({_addClass:b.fn.addClass,addClass:function(l,k,m,o){return k?b.effects.animateClass.apply(this,[{add:l},k,m,o]):this._addClass(l)},_removeClass:b.fn.removeClass,removeClass:function(l,k,m,o){return k?b.effects.animateClass.apply(this,[{remove:l},k,m,o]):this._removeClass(l)},_toggleClass:b.fn.toggleClass,toggleClass:function(l,k,m,o,p){return typeof k=="boolean"||k===c?m?b.effects.animateClass.apply(this,[k?{add:l}:{remove:l},m,o,p]):this._toggleClass(l,
172
+ k):b.effects.animateClass.apply(this,[{toggle:l},k,m,o])},switchClass:function(l,k,m,o,p){return b.effects.animateClass.apply(this,[{add:k,remove:l},m,o,p])}});b.extend(b.effects,{version:"1.8.8",save:function(l,k){for(var m=0;m<k.length;m++)k[m]!==null&&l.data("ec.storage."+k[m],l[0].style[k[m]])},restore:function(l,k){for(var m=0;m<k.length;m++)k[m]!==null&&l.css(k[m],l.data("ec.storage."+k[m]))},setMode:function(l,k){if(k=="toggle")k=l.is(":hidden")?"show":"hide";return k},getBaseline:function(l,
173
+ k){var m;switch(l[0]){case "top":m=0;break;case "middle":m=0.5;break;case "bottom":m=1;break;default:m=l[0]/k.height}switch(l[1]){case "left":l=0;break;case "center":l=0.5;break;case "right":l=1;break;default:l=l[1]/k.width}return{x:l,y:m}},createWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent();var k={width:l.outerWidth(true),height:l.outerHeight(true),"float":l.css("float")},m=b("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
174
+ border:"none",margin:0,padding:0});l.wrap(m);m=l.parent();if(l.css("position")=="static"){m.css({position:"relative"});l.css({position:"relative"})}else{b.extend(k,{position:l.css("position"),zIndex:l.css("z-index")});b.each(["top","left","bottom","right"],function(o,p){k[p]=l.css(p);if(isNaN(parseInt(k[p],10)))k[p]="auto"});l.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return m.css(k).show()},removeWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent().replaceWith(l);
175
+ return l},setTransition:function(l,k,m,o){o=o||{};b.each(k,function(p,s){unit=l.cssUnit(s);if(unit[0]>0)o[s]=unit[0]*m+unit[1]});return o}});b.fn.extend({effect:function(l){var k=h.apply(this,arguments),m={options:k[1],duration:k[2],callback:k[3]};k=m.options.mode;var o=b.effects[l];if(b.fx.off||!o)return k?this[k](m.duration,m.callback):this.each(function(){m.callback&&m.callback.call(this)});return o.call(this,m)},_show:b.fn.show,show:function(l){if(i(l))return this._show.apply(this,arguments);
176
+ else{var k=h.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:b.fn.hide,hide:function(l){if(i(l))return this._hide.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:b.fn.toggle,toggle:function(l){if(i(l)||typeof l==="boolean"||b.isFunction(l))return this.__toggle.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(l){var k=this.css(l),
177
+ m=[];b.each(["em","px","%","pt"],function(o,p){if(k.indexOf(p)>0)m=[parseFloat(k),p]});return m}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(l,k,m,o,p){return b.easing[b.easing.def](l,k,m,o,p)},easeInQuad:function(l,k,m,o,p){return o*(k/=p)*k+m},easeOutQuad:function(l,k,m,o,p){return-o*(k/=p)*(k-2)+m},easeInOutQuad:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k+m;return-o/2*(--k*(k-2)-1)+m},easeInCubic:function(l,k,m,o,p){return o*(k/=p)*k*k+m},easeOutCubic:function(l,
178
+ k,m,o,p){return o*((k=k/p-1)*k*k+1)+m},easeInOutCubic:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k+m;return o/2*((k-=2)*k*k+2)+m},easeInQuart:function(l,k,m,o,p){return o*(k/=p)*k*k*k+m},easeOutQuart:function(l,k,m,o,p){return-o*((k=k/p-1)*k*k*k-1)+m},easeInOutQuart:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k+m;return-o/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(l,k,m,o,p){return o*(k/=p)*k*k*k*k+m},easeOutQuint:function(l,k,m,o,p){return o*((k=k/p-1)*k*k*k*k+1)+m},easeInOutQuint:function(l,
179
+ k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k*k+m;return o/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(l,k,m,o,p){return-o*Math.cos(k/p*(Math.PI/2))+o+m},easeOutSine:function(l,k,m,o,p){return o*Math.sin(k/p*(Math.PI/2))+m},easeInOutSine:function(l,k,m,o,p){return-o/2*(Math.cos(Math.PI*k/p)-1)+m},easeInExpo:function(l,k,m,o,p){return k==0?m:o*Math.pow(2,10*(k/p-1))+m},easeOutExpo:function(l,k,m,o,p){return k==p?m+o:o*(-Math.pow(2,-10*k/p)+1)+m},easeInOutExpo:function(l,k,m,o,p){if(k==0)return m;if(k==
180
+ p)return m+o;if((k/=p/2)<1)return o/2*Math.pow(2,10*(k-1))+m;return o/2*(-Math.pow(2,-10*--k)+2)+m},easeInCirc:function(l,k,m,o,p){return-o*(Math.sqrt(1-(k/=p)*k)-1)+m},easeOutCirc:function(l,k,m,o,p){return o*Math.sqrt(1-(k=k/p-1)*k)+m},easeInOutCirc:function(l,k,m,o,p){if((k/=p/2)<1)return-o/2*(Math.sqrt(1-k*k)-1)+m;return o/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p)==1)return m+o;s||(s=p*0.3);if(r<Math.abs(o)){r=o;l=s/4}else l=
181
+ s/(2*Math.PI)*Math.asin(o/r);return-(r*Math.pow(2,10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s))+m},easeOutElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p)==1)return m+o;s||(s=p*0.3);if(r<Math.abs(o)){r=o;l=s/4}else l=s/(2*Math.PI)*Math.asin(o/r);return r*Math.pow(2,-10*k)*Math.sin((k*p-l)*2*Math.PI/s)+o+m},easeInOutElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p/2)==2)return m+o;s||(s=p*0.3*1.5);if(r<Math.abs(o)){r=o;l=s/4}else l=s/(2*Math.PI)*Math.asin(o/
182
+ r);if(k<1)return-0.5*r*Math.pow(2,10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s)+m;return r*Math.pow(2,-10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s)*0.5+o+m},easeInBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;return o*(k/=p)*k*((s+1)*k-s)+m},easeOutBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;return o*((k=k/p-1)*k*((s+1)*k+s)+1)+m},easeInOutBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;if((k/=p/2)<1)return o/2*k*k*(((s*=1.525)+1)*k-s)+m;return o/2*((k-=2)*k*(((s*=1.525)+1)*k+s)+2)+m},easeInBounce:function(l,
183
+ k,m,o,p){return o-b.easing.easeOutBounce(l,p-k,0,o,p)+m},easeOutBounce:function(l,k,m,o,p){return(k/=p)<1/2.75?o*7.5625*k*k+m:k<2/2.75?o*(7.5625*(k-=1.5/2.75)*k+0.75)+m:k<2.5/2.75?o*(7.5625*(k-=2.25/2.75)*k+0.9375)+m:o*(7.5625*(k-=2.625/2.75)*k+0.984375)+m},easeInOutBounce:function(l,k,m,o,p){if(k<p/2)return b.easing.easeInBounce(l,k*2,0,o,p)*0.5+m;return b.easing.easeOutBounce(l,k*2-p,0,o,p)*0.5+o*0.5+m}})}(jQuery);
184
+ (function(b){b.effects.blind=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"vertical";b.effects.save(f,g);f.show();var d=b.effects.createWrapper(f).css({overflow:"hidden"}),h=a=="vertical"?"height":"width";a=a=="vertical"?d.height():d.width();e=="show"&&d.css(h,0);var i={};i[h]=e=="show"?a:0;d.animate(i,c.duration,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,
185
+ g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
186
+ (function(b){b.effects.bounce=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"effect"),a=c.options.direction||"up",d=c.options.distance||20,h=c.options.times||5,i=c.duration||250;/show|hide/.test(e)&&g.push("opacity");b.effects.save(f,g);f.show();b.effects.createWrapper(f);var j=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";d=c.options.distance||(j=="top"?f.outerHeight({margin:true})/3:f.outerWidth({margin:true})/
187
+ 3);if(e=="show")f.css("opacity",0).css(j,a=="pos"?-d:d);if(e=="hide")d/=h*2;e!="hide"&&h--;if(e=="show"){var n={opacity:1};n[j]=(a=="pos"?"+=":"-=")+d;f.animate(n,i/2,c.options.easing);d/=2;h--}for(n=0;n<h;n++){var q={},l={};q[j]=(a=="pos"?"-=":"+=")+d;l[j]=(a=="pos"?"+=":"-=")+d;f.animate(q,i/2,c.options.easing).animate(l,i/2,c.options.easing);d=e=="hide"?d*2:d/2}if(e=="hide"){n={opacity:0};n[j]=(a=="pos"?"-=":"+=")+d;f.animate(n,i/2,c.options.easing,function(){f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);
188
+ c.callback&&c.callback.apply(this,arguments)})}else{q={};l={};q[j]=(a=="pos"?"-=":"+=")+d;l[j]=(a=="pos"?"+=":"-=")+d;f.animate(q,i/2,c.options.easing).animate(l,i/2,c.options.easing,function(){b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments)})}f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
189
+ (function(b){b.effects.clip=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","height","width"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"vertical";b.effects.save(f,g);f.show();var d=b.effects.createWrapper(f).css({overflow:"hidden"});d=f[0].tagName=="IMG"?d:f;var h={size:a=="vertical"?"height":"width",position:a=="vertical"?"top":"left"};a=a=="vertical"?d.height():d.width();if(e=="show"){d.css(h.size,0);d.css(h.position,
190
+ a/2)}var i={};i[h.size]=e=="show"?a:0;i[h.position]=e=="show"?0:a/2;d.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()}})})}})(jQuery);
191
+ (function(b){b.effects.drop=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","opacity"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"left";b.effects.save(f,g);f.show();b.effects.createWrapper(f);var d=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";var h=c.options.distance||(d=="top"?f.outerHeight({margin:true})/2:f.outerWidth({margin:true})/2);if(e=="show")f.css("opacity",0).css(d,a=="pos"?-h:h);var i={opacity:e==
192
+ "show"?1:0};i[d]=(e=="show"?a=="pos"?"+=":"-=":a=="pos"?"-=":"+=")+h;f.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
193
+ (function(b){b.effects.explode=function(c){return this.queue(function(){var f=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3,g=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?b(this).is(":visible")?"hide":"show":c.options.mode;var e=b(this).show().css("visibility","hidden"),a=e.offset();a.top-=parseInt(e.css("marginTop"),10)||0;a.left-=parseInt(e.css("marginLeft"),10)||0;for(var d=e.outerWidth(true),h=e.outerHeight(true),i=0;i<f;i++)for(var j=
194
+ 0;j<g;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(d/g),top:-i*(h/f)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:d/g,height:h/f,left:a.left+j*(d/g)+(c.options.mode=="show"?(j-Math.floor(g/2))*(d/g):0),top:a.top+i*(h/f)+(c.options.mode=="show"?(i-Math.floor(f/2))*(h/f):0),opacity:c.options.mode=="show"?0:1}).animate({left:a.left+j*(d/g)+(c.options.mode=="show"?0:(j-Math.floor(g/2))*(d/g)),top:a.top+
195
+ i*(h/f)+(c.options.mode=="show"?0:(i-Math.floor(f/2))*(h/f)),opacity:c.options.mode=="show"?1:0},c.duration||500);setTimeout(function(){c.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();c.callback&&c.callback.apply(e[0]);e.dequeue();b("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);
196
+ (function(b){b.effects.fade=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"hide");f.animate({opacity:g},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
197
+ (function(b){b.effects.fold=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.size||15,d=!!c.options.horizFirst,h=c.duration?c.duration/2:b.fx.speeds._default/2;b.effects.save(f,g);f.show();var i=b.effects.createWrapper(f).css({overflow:"hidden"}),j=e=="show"!=d,n=j?["width","height"]:["height","width"];j=j?[i.width(),i.height()]:[i.height(),i.width()];var q=/([0-9]+)%/.exec(a);if(q)a=parseInt(q[1],
198
+ 10)/100*j[e=="hide"?0:1];if(e=="show")i.css(d?{height:0,width:a}:{height:a,width:0});d={};q={};d[n[0]]=e=="show"?j[0]:a;q[n[1]]=e=="show"?j[1]:0;i.animate(d,h,c.options.easing).animate(q,h,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
199
+ (function(b){b.effects.highlight=function(c){return this.queue(function(){var f=b(this),g=["backgroundImage","backgroundColor","opacity"],e=b.effects.setMode(f,c.options.mode||"show"),a={backgroundColor:f.css("backgroundColor")};if(e=="hide")a.opacity=0;b.effects.save(f,g);f.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(a,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);e=="show"&&!b.support.opacity&&
200
+ this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
201
+ (function(b){b.effects.pulsate=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"show");times=(c.options.times||5)*2-1;duration=c.duration?c.duration/2:b.fx.speeds._default/2;isVisible=f.is(":visible");animateTo=0;if(!isVisible){f.css("opacity",0).show();animateTo=1}if(g=="hide"&&isVisible||g=="show"&&!isVisible)times--;for(g=0;g<times;g++){f.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}f.animate({opacity:animateTo},duration,
202
+ c.options.easing,function(){animateTo==0&&f.hide();c.callback&&c.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()}).dequeue()})}})(jQuery);
203
+ (function(b){b.effects.puff=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"hide"),e=parseInt(c.options.percent,10)||150,a=e/100,d={height:f.height(),width:f.width()};b.extend(c.options,{fade:true,mode:g,percent:g=="hide"?e:100,from:g=="hide"?d:{height:d.height*a,width:d.width*a}});f.effect("scale",c.options,c.duration,c.callback);f.dequeue()})};b.effects.scale=function(c){return this.queue(function(){var f=b(this),g=b.extend(true,{},c.options),e=b.effects.setMode(f,
204
+ c.options.mode||"effect"),a=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:e=="hide"?0:100),d=c.options.direction||"both",h=c.options.origin;if(e!="effect"){g.origin=h||["middle","center"];g.restore=true}h={height:f.height(),width:f.width()};f.from=c.options.from||(e=="show"?{height:0,width:0}:h);a={y:d!="horizontal"?a/100:1,x:d!="vertical"?a/100:1};f.to={height:h.height*a.y,width:h.width*a.x};if(c.options.fade){if(e=="show"){f.from.opacity=0;f.to.opacity=1}if(e=="hide"){f.from.opacity=
205
+ 1;f.to.opacity=0}}g.from=f.from;g.to=f.to;g.mode=e;f.effect("size",g,c.duration,c.callback);f.dequeue()})};b.effects.size=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],a=["width","height","overflow"],d=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
206
+ j=b.effects.setMode(f,c.options.mode||"effect"),n=c.options.restore||false,q=c.options.scale||"both",l=c.options.origin,k={height:f.height(),width:f.width()};f.from=c.options.from||k;f.to=c.options.to||k;if(l){l=b.effects.getBaseline(l,k);f.from.top=(k.height-f.from.height)*l.y;f.from.left=(k.width-f.from.width)*l.x;f.to.top=(k.height-f.to.height)*l.y;f.to.left=(k.width-f.to.width)*l.x}var m={from:{y:f.from.height/k.height,x:f.from.width/k.width},to:{y:f.to.height/k.height,x:f.to.width/k.width}};
207
+ if(q=="box"||q=="both"){if(m.from.y!=m.to.y){g=g.concat(h);f.from=b.effects.setTransition(f,h,m.from.y,f.from);f.to=b.effects.setTransition(f,h,m.to.y,f.to)}if(m.from.x!=m.to.x){g=g.concat(i);f.from=b.effects.setTransition(f,i,m.from.x,f.from);f.to=b.effects.setTransition(f,i,m.to.x,f.to)}}if(q=="content"||q=="both")if(m.from.y!=m.to.y){g=g.concat(d);f.from=b.effects.setTransition(f,d,m.from.y,f.from);f.to=b.effects.setTransition(f,d,m.to.y,f.to)}b.effects.save(f,n?g:e);f.show();b.effects.createWrapper(f);
208
+ f.css("overflow","hidden").css(f.from);if(q=="content"||q=="both"){h=h.concat(["marginTop","marginBottom"]).concat(d);i=i.concat(["marginLeft","marginRight"]);a=g.concat(h).concat(i);f.find("*[width]").each(function(){child=b(this);n&&b.effects.save(child,a);var o={height:child.height(),width:child.width()};child.from={height:o.height*m.from.y,width:o.width*m.from.x};child.to={height:o.height*m.to.y,width:o.width*m.to.x};if(m.from.y!=m.to.y){child.from=b.effects.setTransition(child,h,m.from.y,child.from);
209
+ child.to=b.effects.setTransition(child,h,m.to.y,child.to)}if(m.from.x!=m.to.x){child.from=b.effects.setTransition(child,i,m.from.x,child.from);child.to=b.effects.setTransition(child,i,m.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){n&&b.effects.restore(child,a)})})}f.animate(f.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){f.to.opacity===0&&f.css("opacity",f.from.opacity);j=="hide"&&f.hide();b.effects.restore(f,
210
+ n?g:e);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
211
+ (function(b){b.effects.shake=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"];b.effects.setMode(f,c.options.mode||"effect");var e=c.options.direction||"left",a=c.options.distance||20,d=c.options.times||3,h=c.duration||c.options.duration||140;b.effects.save(f,g);f.show();b.effects.createWrapper(f);var i=e=="up"||e=="down"?"top":"left",j=e=="up"||e=="left"?"pos":"neg";e={};var n={},q={};e[i]=(j=="pos"?"-=":"+=")+a;n[i]=(j=="pos"?"+=":"-=")+a*2;q[i]=
212
+ (j=="pos"?"-=":"+=")+a*2;f.animate(e,h,c.options.easing);for(a=1;a<d;a++)f.animate(n,h,c.options.easing).animate(q,h,c.options.easing);f.animate(n,h,c.options.easing).animate(e,h/2,c.options.easing,function(){b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
213
+ (function(b){b.effects.slide=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"show"),a=c.options.direction||"left";b.effects.save(f,g);f.show();b.effects.createWrapper(f).css({overflow:"hidden"});var d=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";var h=c.options.distance||(d=="top"?f.outerHeight({margin:true}):f.outerWidth({margin:true}));if(e=="show")f.css(d,a=="pos"?isNaN(h)?"-"+h:-h:h);
214
+ var i={};i[d]=(e=="show"?a=="pos"?"+=":"-=":a=="pos"?"-=":"+=")+h;f.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
215
+ (function(b){b.effects.transfer=function(c){return this.queue(function(){var f=b(this),g=b(c.options.to),e=g.offset();g={top:e.top,left:e.left,height:g.innerHeight(),width:g.innerWidth()};e=f.offset();var a=b('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,c.duration,c.options.easing,function(){a.remove();c.callback&&c.callback.apply(f[0],arguments);
216
+ f.dequeue()})})}})(jQuery);
217
+ (function(b){b.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var c=this,f=c.options;c.running=0;c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");c.headers=
218
+ c.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){f.disabled||b(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){f.disabled||b(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){f.disabled||b(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){f.disabled||b(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
219
+ if(f.navigation){var g=c.element.find("a").filter(f.navigationFilter).eq(0);if(g.length){var e=g.closest(".ui-accordion-header");c.active=e.length?e:g.closest(".ui-accordion-content").prev()}}c.active=c._findActive(c.active||f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");c.active.next().addClass("ui-accordion-content-active");c._createIcons();c.resize();c.element.attr("role","tablist");c.headers.attr("role","tab").bind("keydown.accordion",
220
+ function(a){return c._keydown(a)}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();c.active.length?c.active.attr({"aria-expanded":"true",tabIndex:0}):c.headers.eq(0).attr("tabIndex",0);b.browser.safari||c.headers.find("a").attr("tabIndex",-1);f.event&&c.headers.bind(f.event.split(" ").join(".accordion ")+".accordion",function(a){c._clickHandler.call(c,a,this);a.preventDefault()})},_createIcons:function(){var c=this.options;if(c.icons){b("<span></span>").addClass("ui-icon "+
221
+ c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
222
+ this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var f=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(c.autoHeight||c.fillHeight)f.css("height","");return b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c=="active"&&this.activate(f);if(c=="icons"){this._destroyIcons();
223
+ f&&this._createIcons()}if(c=="disabled")this.headers.add(this.headers.next())[f?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(c){if(!(this.options.disabled||c.altKey||c.ctrlKey)){var f=b.ui.keyCode,g=this.headers.length,e=this.headers.index(c.target),a=false;switch(c.keyCode){case f.RIGHT:case f.DOWN:a=this.headers[(e+1)%g];break;case f.LEFT:case f.UP:a=this.headers[(e-1+g)%g];break;case f.SPACE:case f.ENTER:this._clickHandler({target:c.target},c.target);
224
+ c.preventDefault()}if(a){b(c.target).attr("tabIndex",-1);b(a).attr("tabIndex",0);a.focus();return false}return true}},resize:function(){var c=this.options,f;if(c.fillSpace){if(b.browser.msie){var g=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();b.browser.msie&&this.element.parent().css("overflow",g);this.headers.each(function(){f-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+
225
+ b(this).height()))}).css("overflow","auto")}else if(c.autoHeight){f=0;this.headers.next().each(function(){f=Math.max(f,b(this).height("").height())}).height(f)}return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,f){var g=this.options;
226
+ if(!g.disabled)if(c.target){c=b(c.currentTarget||f);f=c[0]===this.active[0];g.active=g.collapsible&&f?false:this.headers.index(c);if(!(this.running||!g.collapsible&&f)){var e=this.active;i=c.next();d=this.active.next();h={options:g,newHeader:f&&g.collapsible?b([]):c,oldHeader:this.active,newContent:f&&g.collapsible?b([]):i,oldContent:d};var a=this.headers.index(this.active[0])>this.headers.index(c[0]);this.active=f?b([]):c;this._toggle(i,d,h,f,a);e.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
227
+ if(!f){c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected);c.next().addClass("ui-accordion-content-active")}}}else if(g.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);this.active.next().addClass("ui-accordion-content-active");var d=this.active.next(),
228
+ h={options:g,newHeader:b([]),oldHeader:g.active,newContent:b([]),oldContent:d},i=this.active=b([]);this._toggle(i,d,h)}},_toggle:function(c,f,g,e,a){var d=this,h=d.options;d.toShow=c;d.toHide=f;d.data=g;var i=function(){if(d)return d._completed.apply(d,arguments)};d._trigger("changestart",null,d.data);d.running=f.size()===0?c.size():f.size();if(h.animated){g={};g=h.collapsible&&e?{toShow:b([]),toHide:f,complete:i,down:a,autoHeight:h.autoHeight||h.fillSpace}:{toShow:c,toHide:f,complete:i,down:a,autoHeight:h.autoHeight||
229
+ h.fillSpace};if(!h.proxied)h.proxied=h.animated;if(!h.proxiedDuration)h.proxiedDuration=h.duration;h.animated=b.isFunction(h.proxied)?h.proxied(g):h.proxied;h.duration=b.isFunction(h.proxiedDuration)?h.proxiedDuration(g):h.proxiedDuration;e=b.ui.accordion.animations;var j=h.duration,n=h.animated;if(n&&!e[n]&&!b.easing[n])n="slide";e[n]||(e[n]=function(q){this.slide(q,{easing:n,duration:j||700})});e[n](g)}else{if(h.collapsible&&e)c.toggle();else{f.hide();c.show()}i(true)}f.prev().attr({"aria-expanded":"false",
230
+ tabIndex:-1}).blur();c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});b.extend(b.ui.accordion,{version:"1.8.8",animations:{slide:function(c,f){c=b.extend({easing:"swing",
231
+ duration:300},c,f);if(c.toHide.size())if(c.toShow.size()){var g=c.toShow.css("overflow"),e=0,a={},d={},h;f=c.toShow;h=f[0].style.width;f.width(parseInt(f.parent().width(),10)-parseInt(f.css("paddingLeft"),10)-parseInt(f.css("paddingRight"),10)-(parseInt(f.css("borderLeftWidth"),10)||0)-(parseInt(f.css("borderRightWidth"),10)||0));b.each(["height","paddingTop","paddingBottom"],function(i,j){d[j]="hide";i=(""+b.css(c.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);a[j]={value:i[1],unit:i[2]||"px"}});c.toShow.css({height:0,
232
+ overflow:"hidden"}).show();c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(d,{step:function(i,j){if(j.prop=="height")e=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);c.toShow[0].style[j.prop]=e*a[j.prop].value+a[j.prop].unit},duration:c.duration,easing:c.easing,complete:function(){c.autoHeight||c.toShow.css("height","");c.toShow.css({width:h,overflow:g});c.complete()}})}else c.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},c);else c.toShow.animate({height:"show",
233
+ paddingTop:"show",paddingBottom:"show"},c)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery);
234
+ (function(b){b.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,f=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!(c.options.disabled||c.element.attr("readonly"))){g=false;var a=b.ui.keyCode;
235
+ switch(e.keyCode){case a.PAGE_UP:c._move("previousPage",e);break;case a.PAGE_DOWN:c._move("nextPage",e);break;case a.UP:c._move("previous",e);e.preventDefault();break;case a.DOWN:c._move("next",e);e.preventDefault();break;case a.ENTER:case a.NUMPAD_ENTER:if(c.menu.active){g=true;e.preventDefault()}case a.TAB:if(!c.menu.active)return;c.menu.select(e);break;case a.ESCAPE:c.element.val(c.term);c.close(e);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=
236
+ null;c.search(null,e)}},c.options.delay);break}}}).bind("keypress.autocomplete",function(e){if(g){g=false;e.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(e){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(e);c._change(e)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=b("<ul></ul>").addClass("ui-autocomplete").appendTo(b(this.options.appendTo||
237
+ "body",f)[0]).mousedown(function(e){var a=c.menu.element[0];b(e.target).closest(".ui-menu-item").length||setTimeout(function(){b(document).one("mousedown",function(d){d.target!==c.element[0]&&d.target!==a&&!b.ui.contains(a,d.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(e,a){a=a.item.data("item.autocomplete");false!==c._trigger("focus",e,{item:a})&&/^key/.test(e.originalEvent.type)&&c.element.val(a.value)},selected:function(e,a){var d=a.item.data("item.autocomplete"),
238
+ h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h;c.selectedItem=d},1)}false!==c._trigger("select",e,{item:d})&&c.element.val(d.value);c.term=c.element.val();c.close(e);c.selectedItem=d},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");b.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
239
+ this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(b(f||"body",this.element[0].ownerDocument)[0]);c==="disabled"&&f&&this.xhr&&this.xhr.abort()},_initSource:function(){var c=this,f,g;if(b.isArray(this.options.source)){f=this.options.source;this.source=function(e,a){a(b.ui.autocomplete.filter(f,e.term))}}else if(typeof this.options.source===
240
+ "string"){g=this.options.source;this.source=function(e,a){c.xhr&&c.xhr.abort();c.xhr=b.ajax({url:g,data:e,dataType:"json",success:function(d,h,i){i===c.xhr&&a(d);c.xhr=null},error:function(d){d===c.xhr&&a([]);c.xhr=null}})}}else this.source=this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length<this.options.minLength)return this.close(f);clearTimeout(this.closing);if(this._trigger("search",f)!==false)return this._search(c)},_search:function(c){this.pending++;
241
+ this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)},_response:function(c){if(!this.options.disabled&&c&&c.length){c=this._normalize(c);this._suggest(c);this._trigger("open")}else this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",c)}},_change:function(c){this.previous!==
242
+ this.element.val()&&this._trigger("change",c,{item:this.selectedItem})},_normalize:function(c){if(c.length&&c[0].label&&c[0].value)return c;return b.map(c,function(f){if(typeof f==="string")return{label:f,value:f};return b.extend({label:f.label||f.value,value:f.value||f.label},f)})},_suggest:function(c){var f=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(f,c);this.menu.deactivate();this.menu.refresh();f.show();this._resizeMenu();f.position(b.extend({of:this.element},this.options.position))},
243
+ _resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(c,f){var g=this;b.each(f,function(e,a){g._renderItem(c,a)})},_renderItem:function(c,f){return b("<li></li>").data("item.autocomplete",f).append(b("<a></a>").text(f.label)).appendTo(c)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](f);
244
+ else this.search(null,f)},widget:function(){return this.menu.element}});b.extend(b.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(c,f){var g=new RegExp(b.ui.autocomplete.escapeRegex(f),"i");return b.grep(c,function(e){return g.test(e.label||e.value||e)})}})})(jQuery);
245
+ (function(b){b.widget("ui.menu",{_create:function(){var c=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(f){if(b(f.target).closest(".ui-menu-item a").length){f.preventDefault();c.select(f)}});this.refresh()},refresh:function(){var c=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
246
+ -1).mouseenter(function(f){c.activate(f,b(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var g=f.offset().top-this.element.offset().top,e=this.element.attr("scrollTop"),a=this.element.height();if(g<0)this.element.attr("scrollTop",e+g);else g>=a&&this.element.attr("scrollTop",e+g-a+f.height())}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})},
247
+ deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,f,g){if(this.active){c=this.active[c+"All"](".ui-menu-item").eq(0);
248
+ c.length?this.activate(g,c):this.activate(g,this.element.children(f))}else this.activate(g,this.element.children(f))},nextPage:function(c){if(this.hasScroll())if(!this.active||this.last())this.activate(c,this.element.children(".ui-menu-item:first"));else{var f=this.active.offset().top,g=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var a=b(this).offset().top-f-g+b(this).height();return a<10&&a>-10});e.length||(e=this.element.children(".ui-menu-item:last"));this.activate(c,
249
+ e)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(c){if(this.hasScroll())if(!this.active||this.first())this.activate(c,this.element.children(".ui-menu-item:last"));else{var f=this.active.offset().top,g=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=b(this).offset().top-f+g-b(this).height();return e<10&&e>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
250
+ this.activate(c,result)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(c){this._trigger("selected",c,{item:this.active})}})})(jQuery);
251
+ (function(b){var c,f=function(e){b(":ui-button",e.target.form).each(function(){var a=b(this).data("button");setTimeout(function(){a.refresh()},1)})},g=function(e){var a=e.name,d=e.form,h=b([]);if(a)h=d?b(d).find("[name='"+a+"']"):b("[name='"+a+"']",e.ownerDocument).filter(function(){return!this.form});return h};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
252
+ f);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,a=this.options,d=this.type==="checkbox"||this.type==="radio",h="ui-state-hover"+(!d?" ui-state-active":"");if(a.label===null)a.label=this.buttonElement.html();if(this.element.is(":disabled"))a.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
253
+ function(){if(!a.disabled){b(this).addClass("ui-state-hover");this===c&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){a.disabled||b(this).removeClass(h)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){e.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(a.disabled)return false;b(this).toggleClass("ui-state-active");
254
+ e.buttonElement.attr("aria-pressed",e.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(a.disabled)return false;b(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed",true);var i=e.element[0];g(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(a.disabled)return false;b(this).addClass("ui-state-active");
255
+ c=this;b(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(a.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(a.disabled)return false;if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",
256
+ a.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var e=this.element.is(":checked");e&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",e)}else this.buttonElement=
257
+ this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||
258
+ this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(e,a){b.Widget.prototype._setOption.apply(this,arguments);if(e==="disabled")a?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var e=this.element.is(":disabled");e!==this.options.disabled&&this._setOption("disabled",e);if(this.type==="radio")g(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
259
+ true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var e=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
260
+ a=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),d=this.options.icons,h=d.primary&&d.secondary;if(d.primary||d.secondary){e.addClass("ui-button-text-icon"+(h?"s":d.primary?"-primary":"-secondary"));d.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.addClass(h?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
261
+ this.hasTitle||e.attr("title",a)}}else e.addClass("ui-button-text-only")}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,a){e==="disabled"&&this.buttons.button("option",e,a);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
262
+ destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);
263
+ (function(b,c){function f(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
264
+ "ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
265
+ "Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
266
+ minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function g(a,d){b.extend(a,d);for(var h in d)if(d[h]==
267
+ null||d[h]==c)a[h]=d[h];return a}b.extend(b.ui,{datepicker:{version:"1.8.8"}});var e=(new Date).getTime();b.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){g(this._defaults,a||{});return this},_attachDatepicker:function(a,d){var h=null;for(var i in this._defaults){var j=a.getAttribute("date:"+i);if(j){h=h||{};try{h[i]=eval(j)}catch(n){h[i]=j}}}i=a.nodeName.toLowerCase();
268
+ j=i=="div"||i=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var q=this._newInst(b(a),j);q.settings=b.extend({},d||{},h||{});if(i=="input")this._connectDatepicker(a,q);else j&&this._inlineDatepicker(a,q)},_newInst:function(a,d){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:d,dpDiv:!d?this.dpDiv:b('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
269
+ _connectDatepicker:function(a,d){var h=b(a);d.append=b([]);d.trigger=b([]);if(!h.hasClass(this.markerClassName)){this._attachments(h,d);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});this._autoSize(d);b.data(a,"datepicker",d)}},_attachments:function(a,d){var h=this._get(d,"appendText"),i=this._get(d,"isRTL");d.append&&
270
+ d.append.remove();if(h){d.append=b('<span class="'+this._appendClass+'">'+h+"</span>");a[i?"before":"after"](d.append)}a.unbind("focus",this._showDatepicker);d.trigger&&d.trigger.remove();h=this._get(d,"showOn");if(h=="focus"||h=="both")a.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(d,"buttonText");var j=this._get(d,"buttonImage");d.trigger=b(this._get(d,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:j,alt:h,title:h}):b('<button type="button"></button>').addClass(this._triggerClass).html(j==
271
+ ""?h:b("<img/>").attr({src:j,alt:h,title:h})));a[i?"before":"after"](d.trigger);d.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var d=new Date(2009,11,20),h=this._get(a,"dateFormat");if(h.match(/[DM]/)){var i=function(j){for(var n=0,q=0,l=0;l<j.length;l++)if(j[l].length>n){n=j[l].length;q=l}return q};d.setMonth(i(this._get(a,
272
+ h.match(/MM/)?"monthNames":"monthNamesShort")));d.setDate(i(this._get(a,h.match(/DD/)?"dayNames":"dayNamesShort"))+20-d.getDay())}a.input.attr("size",this._formatDate(a,d).length)}},_inlineDatepicker:function(a,d){var h=b(a);if(!h.hasClass(this.markerClassName)){h.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});b.data(a,"datepicker",d);this._setDate(d,this._getDefaultDate(d),
273
+ true);this._updateDatepicker(d);this._updateAlternate(d);d.dpDiv.show()}},_dialogDatepicker:function(a,d,h,i,j){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}g(a.settings,i||{});
274
+ d=d&&d.constructor==Date?this._formatDate(a,d):d;this._dialogInput.val(d);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=h;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
275
+ this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(i=="input"){h.append.remove();h.trigger.remove();d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
276
+ this._doKeyUp)}else if(i=="div"||i=="span")d.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=false;h.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,
277
+ function(j){return j==a?null:j})}},_disableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=true;h.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null:
278
+ j});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var d=0;d<this._disabledInputs.length;d++)if(this._disabledInputs[d]==a)return true;return false},_getInst:function(a){try{return b.data(a,"datepicker")}catch(d){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,d,h){var i=this._getInst(a);if(arguments.length==2&&typeof d=="string")return d=="defaults"?b.extend({},b.datepicker._defaults):i?d=="all"?b.extend({},
279
+ i.settings):this._get(i,d):null;var j=d||{};if(typeof d=="string"){j={};j[d]=h}if(i){this._curInst==i&&this._hideDatepicker();var n=this._getDateDatepicker(a,true);g(i.settings,j);this._attachments(b(a),i);this._autoSize(i);this._setDateDatepicker(a,n);this._updateDatepicker(i)}},_changeDatepicker:function(a,d,h){this._optionDatepicker(a,d,h)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,d){if(a=this._getInst(a)){this._setDate(a,d);
280
+ this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,d){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,d);return a?this._getDate(a):null},_doKeyDown:function(a){var d=b.datepicker._getInst(a.target),h=true,i=d.dpDiv.is(".ui-datepicker-rtl");d._keyEvent=true;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker();h=false;break;case 13:h=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",d.dpDiv);h[0]?
281
+ b.datepicker._selectDay(a.target,d.selectedMonth,d.selectedYear,h[0]):b.datepicker._hideDatepicker();return false;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(d,"stepBigMonths"):-b.datepicker._get(d,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(d,"stepBigMonths"):+b.datepicker._get(d,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)b.datepicker._clearDate(a.target);h=a.ctrlKey||
282
+ a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)b.datepicker._gotoToday(a.target);h=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,i?+1:-1,"D");h=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(d,"stepBigMonths"):-b.datepicker._get(d,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,-7,"D");h=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,
283
+ i?-1:+1,"D");h=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(d,"stepBigMonths"):+b.datepicker._get(d,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,+7,"D");h=a.ctrlKey||a.metaKey;break;default:h=false}else if(a.keyCode==36&&a.ctrlKey)b.datepicker._showDatepicker(this);else h=false;if(h){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var d=b.datepicker._getInst(a.target);if(b.datepicker._get(d,
284
+ "constrainInput")){d=b.datepicker._possibleChars(b.datepicker._get(d,"dateFormat"));var h=String.fromCharCode(a.charCode==c?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||h<" "||!d||d.indexOf(h)>-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(d){b.datepicker.log(d)}return true},
285
+ _showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var d=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!=d&&b.datepicker._curInst.dpDiv.stop(true,true);var h=b.datepicker._get(d,"beforeShow");g(d.settings,h?h.apply(a,[a,d]):{});d.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(d);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos=
286
+ b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var i=false;b(a).parents().each(function(){i|=b(this).css("position")=="fixed";return!i});if(i&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}h={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;d.dpDiv.empty();d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(d);h=b.datepicker._checkOffset(d,
287
+ h,i);d.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":i?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"});if(!d.inline){h=b.datepicker._get(d,"showAnim");var j=b.datepicker._get(d,"duration"),n=function(){b.datepicker._datepickerShowing=true;var q=d.dpDiv.find("iframe.ui-datepicker-cover");if(q.length){var l=b.datepicker._getBorders(d.dpDiv);q.css({left:-l[0],top:-l[1],width:d.dpDiv.outerWidth(),height:d.dpDiv.outerHeight()})}};d.dpDiv.zIndex(b(a).zIndex()+1);b.effects&&
288
+ b.effects[h]?d.dpDiv.show(h,b.datepicker._get(d,"showOptions"),j,n):d.dpDiv[h||"show"](h?j:null,n);if(!h||!j)n();d.input.is(":visible")&&!d.input.is(":disabled")&&d.input.focus();b.datepicker._curInst=d}}},_updateDatepicker:function(a){var d=this,h=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var i=a.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-h[0],top:-h[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",
289
+ function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!d._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=
290
+ -1&&b(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();h=this._getNumberOfMonths(a);i=h[1];i>1?a.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,
291
+ "isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus();if(a.yearshtml){var j=a.yearshtml;setTimeout(function(){j===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);j=a.yearshtml=null},0)}},_getBorders:function(a){var d=function(h){return{thin:1,medium:2,thick:3}[h]||h};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]},
292
+ _checkOffset:function(a,d,h){var i=a.dpDiv.outerWidth(),j=a.dpDiv.outerHeight(),n=a.input?a.input.outerWidth():0,q=a.input?a.input.outerHeight():0,l=document.documentElement.clientWidth+b(document).scrollLeft(),k=document.documentElement.clientHeight+b(document).scrollTop();d.left-=this._get(a,"isRTL")?i-n:0;d.left-=h&&d.left==a.input.offset().left?b(document).scrollLeft():0;d.top-=h&&d.top==a.input.offset().top+q?b(document).scrollTop():0;d.left-=Math.min(d.left,d.left+i>l&&l>i?Math.abs(d.left+i-
293
+ l):0);d.top-=Math.min(d.top,d.top+j>k&&k>j?Math.abs(j+q):0);return d},_findPos:function(a){for(var d=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[d?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var d=this._curInst;if(!(!d||a&&d!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(d,"showAnim");var h=this._get(d,"duration"),i=function(){b.datepicker._tidyDialog(d);this._curInst=null};b.effects&&b.effects[a]?
294
+ d.dpDiv.hide(a,b.datepicker._get(d,"showOptions"),h,i):d.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?h:null,i);a||i();if(a=this._get(d,"onClose"))a.apply(d.input?d.input[0]:null,[d.input?d.input.val():"",d]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
295
+ _checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,d,h){a=b(a);var i=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(i,d+(h=="M"?this._get(i,"showCurrentAtPos"):
296
+ 0),h);this._updateDatepicker(i)}},_gotoToday:function(a){a=b(a);var d=this._getInst(a[0]);if(this._get(d,"gotoCurrent")&&d.currentDay){d.selectedDay=d.currentDay;d.drawMonth=d.selectedMonth=d.currentMonth;d.drawYear=d.selectedYear=d.currentYear}else{var h=new Date;d.selectedDay=h.getDate();d.drawMonth=d.selectedMonth=h.getMonth();d.drawYear=d.selectedYear=h.getFullYear()}this._notifyChange(d);this._adjustDate(a)},_selectMonthYear:function(a,d,h){a=b(a);var i=this._getInst(a[0]);i._selectingMonthYear=
297
+ false;i["selected"+(h=="M"?"Month":"Year")]=i["draw"+(h=="M"?"Month":"Year")]=parseInt(d.options[d.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(a)},_clickMonthYear:function(a){var d=this._getInst(b(a)[0]);d.input&&d._selectingMonthYear&&setTimeout(function(){d.input.focus()},0);d._selectingMonthYear=!d._selectingMonthYear},_selectDay:function(a,d,h,i){var j=b(a);if(!(b(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay=
298
+ b("a",i).html();j.selectedMonth=j.currentMonth=d;j.selectedYear=j.currentYear=h;this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,d){a=this._getInst(b(a)[0]);d=d!=null?d:this._formatDate(a);a.input&&a.input.val(d);this._updateAlternate(a);var h=this._get(a,"onSelect");if(h)h.apply(a.input?a.input[0]:null,[d,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);
299
+ else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var d=this._get(a,"altField");if(d){var h=this._get(a,"altFormat")||this._get(a,"dateFormat"),i=this._getDate(a),j=this.formatDate(h,i,this._getFormatConfig(a));b(d).each(function(){b(this).val(j)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d=
300
+ a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,d,h){if(a==null||d==null)throw"Invalid arguments";d=typeof d=="object"?d.toString():d+"";if(d=="")return null;for(var i=(h?h.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,n=(h?h.dayNames:null)||this._defaults.dayNames,q=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort,l=(h?h.monthNames:null)||this._defaults.monthNames,
301
+ k=h=-1,m=-1,o=-1,p=false,s=function(x){(x=y+1<a.length&&a.charAt(y+1)==x)&&y++;return x},r=function(x){var C=s(x);x=new RegExp("^\\d{1,"+(x=="@"?14:x=="!"?20:x=="y"&&C?4:x=="o"?3:2)+"}");x=d.substring(w).match(x);if(!x)throw"Missing number at position "+w;w+=x[0].length;return parseInt(x[0],10)},u=function(x,C,J){x=s(x)?J:C;for(C=0;C<x.length;C++)if(d.substr(w,x[C].length).toLowerCase()==x[C].toLowerCase()){w+=x[C].length;return C+1}throw"Unknown name at position "+w;},v=function(){if(d.charAt(w)!=
302
+ a.charAt(y))throw"Unexpected literal at position "+w;w++},w=0,y=0;y<a.length;y++)if(p)if(a.charAt(y)=="'"&&!s("'"))p=false;else v();else switch(a.charAt(y)){case "d":m=r("d");break;case "D":u("D",j,n);break;case "o":o=r("o");break;case "m":k=r("m");break;case "M":k=u("M",q,l);break;case "y":h=r("y");break;case "@":var B=new Date(r("@"));h=B.getFullYear();k=B.getMonth()+1;m=B.getDate();break;case "!":B=new Date((r("!")-this._ticksTo1970)/1E4);h=B.getFullYear();k=B.getMonth()+1;m=B.getDate();break;
303
+ case "'":if(s("'"))v();else p=true;break;default:v()}if(h==-1)h=(new Date).getFullYear();else if(h<100)h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=i?0:-100);if(o>-1){k=1;m=o;do{i=this._getDaysInMonth(h,k-1);if(m<=i)break;k++;m-=i}while(1)}B=this._daylightSavingAdjust(new Date(h,k-1,m));if(B.getFullYear()!=h||B.getMonth()+1!=k||B.getDate()!=m)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",
304
+ RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,d,h){if(!d)return"";var i=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,j=(h?h.dayNames:null)||this._defaults.dayNames,n=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort;h=(h?h.monthNames:null)||this._defaults.monthNames;var q=function(s){(s=p+1<a.length&&a.charAt(p+1)==s)&&p++;
305
+ return s},l=function(s,r,u){r=""+r;if(q(s))for(;r.length<u;)r="0"+r;return r},k=function(s,r,u,v){return q(s)?v[r]:u[r]},m="",o=false;if(d)for(var p=0;p<a.length;p++)if(o)if(a.charAt(p)=="'"&&!q("'"))o=false;else m+=a.charAt(p);else switch(a.charAt(p)){case "d":m+=l("d",d.getDate(),2);break;case "D":m+=k("D",d.getDay(),i,j);break;case "o":m+=l("o",(d.getTime()-(new Date(d.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":m+=l("m",d.getMonth()+1,2);break;case "M":m+=k("M",d.getMonth(),n,h);break;
306
+ case "y":m+=q("y")?d.getFullYear():(d.getYear()%100<10?"0":"")+d.getYear()%100;break;case "@":m+=d.getTime();break;case "!":m+=d.getTime()*1E4+this._ticksTo1970;break;case "'":if(q("'"))m+="'";else o=true;break;default:m+=a.charAt(p)}return m},_possibleChars:function(a){for(var d="",h=false,i=function(n){(n=j+1<a.length&&a.charAt(j+1)==n)&&j++;return n},j=0;j<a.length;j++)if(h)if(a.charAt(j)=="'"&&!i("'"))h=false;else d+=a.charAt(j);else switch(a.charAt(j)){case "d":case "m":case "y":case "@":d+=
307
+ "0123456789";break;case "D":case "M":return null;case "'":if(i("'"))d+="'";else h=true;break;default:d+=a.charAt(j)}return d},_get:function(a,d){return a.settings[d]!==c?a.settings[d]:this._defaults[d]},_setDateFromField:function(a,d){if(a.input.val()!=a.lastVal){var h=this._get(a,"dateFormat"),i=a.lastVal=a.input?a.input.val():null,j,n;j=n=this._getDefaultDate(a);var q=this._getFormatConfig(a);try{j=this.parseDate(h,i,q)||n}catch(l){this.log(l);i=d?"":i}a.selectedDay=j.getDate();a.drawMonth=a.selectedMonth=
308
+ j.getMonth();a.drawYear=a.selectedYear=j.getFullYear();a.currentDay=i?j.getDate():0;a.currentMonth=i?j.getMonth():0;a.currentYear=i?j.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,d,h){var i=function(n){var q=new Date;q.setDate(q.getDate()+n);return q},j=function(n){try{return b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),n,b.datepicker._getFormatConfig(a))}catch(q){}var l=
309
+ (n.toLowerCase().match(/^c/)?b.datepicker._getDate(a):null)||new Date,k=l.getFullYear(),m=l.getMonth();l=l.getDate();for(var o=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,p=o.exec(n);p;){switch(p[2]||"d"){case "d":case "D":l+=parseInt(p[1],10);break;case "w":case "W":l+=parseInt(p[1],10)*7;break;case "m":case "M":m+=parseInt(p[1],10);l=Math.min(l,b.datepicker._getDaysInMonth(k,m));break;case "y":case "Y":k+=parseInt(p[1],10);l=Math.min(l,b.datepicker._getDaysInMonth(k,m));break}p=o.exec(n)}return new Date(k,
310
+ m,l)};if(d=(d=d==null||d===""?h:typeof d=="string"?j(d):typeof d=="number"?isNaN(d)?h:i(d):new Date(d.getTime()))&&d.toString()=="Invalid Date"?h:d){d.setHours(0);d.setMinutes(0);d.setSeconds(0);d.setMilliseconds(0)}return this._daylightSavingAdjust(d)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,d,h){var i=!d,j=a.selectedMonth,n=a.selectedYear;d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay=
311
+ a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();if((j!=a.selectedMonth||n!=a.selectedYear)&&!h)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(i?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var d=new Date;d=this._daylightSavingAdjust(new Date(d.getFullYear(),
312
+ d.getMonth(),d.getDate()));var h=this._get(a,"isRTL"),i=this._get(a,"showButtonPanel"),j=this._get(a,"hideIfNoPrevNext"),n=this._get(a,"navigationAsDateFormat"),q=this._getNumberOfMonths(a),l=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),m=q[0]!=1||q[1]!=1,o=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),p=this._getMinMaxDate(a,"min"),s=this._getMinMaxDate(a,"max");l=a.drawMonth-l;var r=a.drawYear;if(l<0){l+=12;r--}if(s){var u=
313
+ this._daylightSavingAdjust(new Date(s.getFullYear(),s.getMonth()-q[0]*q[1]+1,s.getDate()));for(u=p&&u<p?p:u;this._daylightSavingAdjust(new Date(r,l,1))>u;){l--;if(l<0){l=11;r--}}}a.drawMonth=l;a.drawYear=r;u=this._get(a,"prevText");u=!n?u:this.formatDate(u,this._daylightSavingAdjust(new Date(r,l-k,1)),this._getFormatConfig(a));u=this._canAdjustMonth(a,-1,r,l)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+u+'"><span class="ui-icon ui-icon-circle-triangle-'+
314
+ (h?"e":"w")+'">'+u+"</span></a>":j?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+u+'"><span class="ui-icon ui-icon-circle-triangle-'+(h?"e":"w")+'">'+u+"</span></a>";var v=this._get(a,"nextText");v=!n?v:this.formatDate(v,this._daylightSavingAdjust(new Date(r,l+k,1)),this._getFormatConfig(a));j=this._canAdjustMonth(a,+1,r,l)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+
315
+ (h?"w":"e")+'">'+v+"</span></a>":j?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(h?"w":"e")+'">'+v+"</span></a>";k=this._get(a,"currentText");v=this._get(a,"gotoCurrent")&&a.currentDay?o:d;k=!n?k:this.formatDate(k,v,this._getFormatConfig(a));n=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+e+'.datepicker._hideDatepicker();">'+this._get(a,
316
+ "closeText")+"</button>":"";i=i?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(h?n:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(h?"":n)+"</div>":"";n=parseInt(this._get(a,"firstDay"),10);n=isNaN(n)?0:n;k=this._get(a,"showWeek");v=this._get(a,"dayNames");this._get(a,"dayNamesShort");var w=this._get(a,"dayNamesMin"),y=
317
+ this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),x=this._get(a,"beforeShowDay"),C=this._get(a,"showOtherMonths"),J=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),K="",G=0;G<q[0];G++){for(var N="",H=0;H<q[1];H++){var O=this._daylightSavingAdjust(new Date(r,l,a.selectedDay)),A=" ui-corner-all",D="";if(m){D+='<div class="ui-datepicker-group';if(q[1]>1)switch(H){case 0:D+=" ui-datepicker-group-first";A=" ui-corner-"+(h?"right":"left");break;case q[1]-
318
+ 1:D+=" ui-datepicker-group-last";A=" ui-corner-"+(h?"left":"right");break;default:D+=" ui-datepicker-group-middle";A="";break}D+='">'}D+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+A+'">'+(/all|left/.test(A)&&G==0?h?j:u:"")+(/all|right/.test(A)&&G==0?h?u:j:"")+this._generateMonthYearHeader(a,l,r,p,s,G>0||H>0,y,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var E=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(A=0;A<7;A++){var z=
319
+ (A+n)%7;E+="<th"+((A+n+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+v[z]+'">'+w[z]+"</span></th>"}D+=E+"</tr></thead><tbody>";E=this._getDaysInMonth(r,l);if(r==a.selectedYear&&l==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,E);A=(this._getFirstDayOfMonth(r,l)-n+7)%7;E=m?6:Math.ceil((A+E)/7);z=this._daylightSavingAdjust(new Date(r,l,1-A));for(var P=0;P<E;P++){D+="<tr>";var Q=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(z)+"</td>";for(A=0;A<7;A++){var I=
320
+ x?x.apply(a.input?a.input[0]:null,[z]):[true,""],F=z.getMonth()!=l,L=F&&!J||!I[0]||p&&z<p||s&&z>s;Q+='<td class="'+((A+n+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(z.getTime()==O.getTime()&&l==a.selectedMonth&&a._keyEvent||M.getTime()==z.getTime()&&M.getTime()==O.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!C?"":" "+I[1]+(z.getTime()==o.getTime()?" "+this._currentClass:"")+(z.getTime()==d.getTime()?" ui-datepicker-today":
321
+ ""))+'"'+((!F||C)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+e+".datepicker._selectDay('#"+a.id+"',"+z.getMonth()+","+z.getFullYear()+', this);return false;"')+">"+(F&&!C?"&#xa0;":L?'<span class="ui-state-default">'+z.getDate()+"</span>":'<a class="ui-state-default'+(z.getTime()==d.getTime()?" ui-state-highlight":"")+(z.getTime()==o.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+z.getDate()+"</a>")+"</td>";z.setDate(z.getDate()+1);z=this._daylightSavingAdjust(z)}D+=
322
+ Q+"</tr>"}l++;if(l>11){l=0;r++}D+="</tbody></table>"+(m?"</div>"+(q[0]>0&&H==q[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=D}K+=N}K+=i+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return K},_generateMonthYearHeader:function(a,d,h,i,j,n,q,l){var k=this._get(a,"changeMonth"),m=this._get(a,"changeYear"),o=this._get(a,"showMonthAfterYear"),p='<div class="ui-datepicker-title">',
323
+ s="";if(n||!k)s+='<span class="ui-datepicker-month">'+q[d]+"</span>";else{q=i&&i.getFullYear()==h;var r=j&&j.getFullYear()==h;s+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var u=0;u<12;u++)if((!q||u>=i.getMonth())&&(!r||u<=j.getMonth()))s+='<option value="'+u+'"'+(u==d?' selected="selected"':"")+">"+l[u]+"</option>";s+="</select>"}o||(p+=s+(n||!(k&&
324
+ m)?"&#xa0;":""));a.yearshtml="";if(n||!m)p+='<span class="ui-datepicker-year">'+h+"</span>";else{l=this._get(a,"yearRange").split(":");var v=(new Date).getFullYear();q=function(w){w=w.match(/c[+-].*/)?h+parseInt(w.substring(1),10):w.match(/[+-].*/)?v+parseInt(w,10):parseInt(w,10);return isNaN(w)?v:w};d=q(l[0]);l=Math.max(d,q(l[1]||""));d=i?Math.max(d,i.getFullYear()):d;l=j?Math.min(l,j.getFullYear()):l;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+
325
+ a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+a.id+"');\">";d<=l;d++)a.yearshtml+='<option value="'+d+'"'+(d==h?' selected="selected"':"")+">"+d+"</option>";a.yearshtml+="</select>";if(b.browser.mozilla)p+='<select class="ui-datepicker-year"><option value="'+h+'" selected="selected">'+h+"</option></select>";else{p+=a.yearshtml;a.yearshtml=null}}p+=this._get(a,"yearSuffix");if(o)p+=(n||!(k&&m)?"&#xa0;":"")+s;p+="</div>";return p},_adjustInstDate:function(a,d,h){var i=
326
+ a.drawYear+(h=="Y"?d:0),j=a.drawMonth+(h=="M"?d:0);d=Math.min(a.selectedDay,this._getDaysInMonth(i,j))+(h=="D"?d:0);i=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(i,j,d)));a.selectedDay=i.getDate();a.drawMonth=a.selectedMonth=i.getMonth();a.drawYear=a.selectedYear=i.getFullYear();if(h=="M"||h=="Y")this._notifyChange(a)},_restrictMinMax:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");d=h&&d<h?h:d;return d=a&&d>a?a:d},_notifyChange:function(a){var d=this._get(a,
327
+ "onChangeMonthYear");if(d)d.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,h,i){var j=this._getNumberOfMonths(a);
328
+ h=this._daylightSavingAdjust(new Date(h,i+(d<0?d:j[0]*j[1]),1));d<0&&h.setDate(this._getDaysInMonth(h.getFullYear(),h.getMonth()));return this._isInRange(a,h)},_isInRange:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!h||d.getTime()>=h.getTime())&&(!a||d.getTime()<=a.getTime())},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff");d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a,
329
+ "dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,h,i){if(!d){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}d=d?typeof d=="object"?d:this._daylightSavingAdjust(new Date(i,h,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});b.fn.datepicker=
330
+ function(a){if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var d=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));
331
+ return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(d)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new f;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.8";window["DP_jQuery_"+e]=b})(jQuery);
332
+ (function(b,c){var f={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},g={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(e){var a=b(this).css(e).offset().top;a<0&&
333
+ b(this).css("top",e.top-a)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,a=e.options,d=a.title||"&#160;",h=b.ui.dialog.getTitleId(e.element),i=(e.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex",
334
+ -1).css("outline",0).keydown(function(q){if(a.closeOnEscape&&q.keyCode&&q.keyCode===b.ui.keyCode.ESCAPE){e.close(q);q.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(q){e.moveToTop(false,q)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(i);var j=(e.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(i),n=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
335
+ "button").hover(function(){n.addClass("ui-state-hover")},function(){n.removeClass("ui-state-hover")}).focus(function(){n.addClass("ui-state-focus")}).blur(function(){n.removeClass("ui-state-focus")}).click(function(q){e.close(q);return false}).appendTo(j);(e.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(n);b("<span></span>").addClass("ui-dialog-title").attr("id",h).html(d).prependTo(j);if(b.isFunction(a.beforeclose)&&!b.isFunction(a.beforeClose))a.beforeClose=
336
+ a.beforeclose;j.find("*").add(j).disableSelection();a.draggable&&b.fn.draggable&&e._makeDraggable();a.resizable&&b.fn.resizable&&e._makeResizable();e._createButtons(a.buttons);e._isOpen=false;b.fn.bgiframe&&i.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;e.overlay&&e.overlay.destroy();e.uiDialog.hide();e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");e.uiDialog.remove();e.originalTitle&&
337
+ e.element.attr("title",e.originalTitle);return e},widget:function(){return this.uiDialog},close:function(e){var a=this,d,h;if(false!==a._trigger("beforeClose",e)){a.overlay&&a.overlay.destroy();a.uiDialog.unbind("keypress.ui-dialog");a._isOpen=false;if(a.options.hide)a.uiDialog.hide(a.options.hide,function(){a._trigger("close",e)});else{a.uiDialog.hide();a._trigger("close",e)}b.ui.dialog.overlay.resize();if(a.options.modal){d=0;b(".ui-dialog").each(function(){if(this!==a.uiDialog[0]){h=b(this).css("z-index");
338
+ isNaN(h)||(d=Math.max(d,h))}});b.ui.dialog.maxZ=d}return a}},isOpen:function(){return this._isOpen},moveToTop:function(e,a){var d=this,h=d.options;if(h.modal&&!e||!h.stack&&!h.modal)return d._trigger("focus",a);if(h.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=h.zIndex;if(d.overlay){b.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",b.ui.dialog.maxZ);
339
+ d.element.attr(e);d._trigger("focus",a);return d},open:function(){if(!this._isOpen){var e=this,a=e.options,d=e.uiDialog;e.overlay=a.modal?new b.ui.dialog.overlay(e):null;e._size();e._position(a.position);d.show(a.show);e.moveToTop(true);a.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var i=b(":tabbable",this),j=i.filter(":first");i=i.filter(":last");if(h.target===i[0]&&!h.shiftKey){j.focus(1);return false}else if(h.target===j[0]&&h.shiftKey){i.focus(1);return false}}});
340
+ b(e.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();e._isOpen=true;e._trigger("open");return e}},_createButtons:function(e){var a=this,d=false,h=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),i=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(h);a.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return!(d=true)});if(d){b.each(e,function(j,
341
+ n){n=b.isFunction(n)?{click:n,text:j}:n;j=b('<button type="button"></button>').attr(n,true).unbind("click").click(function(){n.click.apply(a.element[0],arguments)}).appendTo(i);b.fn.button&&j.button()});h.appendTo(a.uiDialog)}},_makeDraggable:function(){function e(j){return{position:j.position,offset:j.offset}}var a=this,d=a.options,h=b(document),i;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(j,n){i=
342
+ d.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",j,e(n))},drag:function(j,n){a._trigger("drag",j,e(n))},stop:function(j,n){d.position=[n.position.left-h.scrollLeft(),n.position.top-h.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(i);a._trigger("dragStop",j,e(n));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function a(j){return{originalPosition:j.originalPosition,originalSize:j.originalSize,
343
+ position:j.position,size:j.size}}e=e===c?this.options.resizable:e;var d=this,h=d.options,i=d.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:d._minHeight(),handles:e,start:function(j,n){b(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",j,a(n))},resize:function(j,n){d._trigger("resize",j,a(n))},stop:function(j,
344
+ n){b(this).removeClass("ui-dialog-resizing");h.height=b(this).height();h.width=b(this).width();d._trigger("resizeStop",j,a(n));b.ui.dialog.overlay.resize()}}).css("position",i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var a=[],d=[0,0],h;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){a=e.split?e.split(" "):[e[0],e[1]];if(a.length===
345
+ 1)a[1]=a[0];b.each(["left","top"],function(i,j){if(+a[i]===a[i]){d[i]=a[i];a[i]=j}});e={my:a.join(" "),at:a.join(" "),offset:d.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else e=b.ui.dialog.prototype.options.position;(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(b.extend({of:window},e));h||this.uiDialog.hide()},_setOptions:function(e){var a=this,d={},h=false;b.each(e,function(i,j){a._setOption(i,j);if(i in f)h=true;if(i in
346
+ g)d[i]=j});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(e,a){var d=this,h=d.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":d._createButtons(a);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":h.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?h.addClass("ui-dialog-disabled"):h.removeClass("ui-dialog-disabled");
347
+ break;case "draggable":var i=h.is(":data(draggable)");i&&!a&&h.draggable("destroy");!i&&a&&d._makeDraggable();break;case "position":d._position(a);break;case "resizable":(i=h.is(":data(resizable)"))&&!a&&h.resizable("destroy");i&&typeof a==="string"&&h.resizable("option","handles",a);!i&&a!==false&&d._makeResizable(a);break;case "title":b(".ui-dialog-title",d.uiDialogTitlebar).html(""+(a||"&#160;"));break}b.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var e=this.options,a,d,h=
348
+ this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;a=this.uiDialog.css({height:"auto",width:e.width}).height();d=Math.max(0,e.minHeight-a);if(e.height==="auto")if(b.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();h||this.uiDialog.hide();this.element.height(Math.max(e,d))}else this.element.height(Math.max(e.height-a,0));this.uiDialog.is(":data(resizable)")&&
349
+ this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.8",uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===
350
+ 0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(d){if(b(d.target).zIndex()<b.ui.dialog.overlay.maxZ)return false})},1);b(document).bind("keydown.dialog-overlay",function(d){if(e.options.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){e.close(d);d.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var a=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
351
+ height:this.height()});b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(e){var a=b.inArray(e,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");e.remove();var d=0;b.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
352
+ a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e<a?b(window).height()+"px":e+"px"}else return b(document).height()+"px"},width:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return e<a?b(window).width()+"px":e+"px"}else return b(document).width()+"px"},resize:function(){var e=b([]);b.each(b.ui.dialog.overlay.instances,
353
+ function(){e=e.add(this)});e.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
354
+ (function(b){b.ui=b.ui||{};var c=/left|center|right/,f=/top|center|bottom/,g=b.fn.position,e=b.fn.offset;b.fn.position=function(a){if(!a||!a.of)return g.apply(this,arguments);a=b.extend({},a);var d=b(a.of),h=d[0],i=(a.collision||"flip").split(" "),j=a.offset?a.offset.split(" "):[0,0],n,q,l;if(h.nodeType===9){n=d.width();q=d.height();l={top:0,left:0}}else if(h.setTimeout){n=d.width();q=d.height();l={top:d.scrollTop(),left:d.scrollLeft()}}else if(h.preventDefault){a.at="left top";n=q=0;l={top:a.of.pageY,
355
+ left:a.of.pageX}}else{n=d.outerWidth();q=d.outerHeight();l=d.offset()}b.each(["my","at"],function(){var k=(a[this]||"").split(" ");if(k.length===1)k=c.test(k[0])?k.concat(["center"]):f.test(k[0])?["center"].concat(k):["center","center"];k[0]=c.test(k[0])?k[0]:"center";k[1]=f.test(k[1])?k[1]:"center";a[this]=k});if(i.length===1)i[1]=i[0];j[0]=parseInt(j[0],10)||0;if(j.length===1)j[1]=j[0];j[1]=parseInt(j[1],10)||0;if(a.at[0]==="right")l.left+=n;else if(a.at[0]==="center")l.left+=n/2;if(a.at[1]==="bottom")l.top+=
356
+ q;else if(a.at[1]==="center")l.top+=q/2;l.left+=j[0];l.top+=j[1];return this.each(function(){var k=b(this),m=k.outerWidth(),o=k.outerHeight(),p=parseInt(b.curCSS(this,"marginLeft",true))||0,s=parseInt(b.curCSS(this,"marginTop",true))||0,r=m+p+(parseInt(b.curCSS(this,"marginRight",true))||0),u=o+s+(parseInt(b.curCSS(this,"marginBottom",true))||0),v=b.extend({},l),w;if(a.my[0]==="right")v.left-=m;else if(a.my[0]==="center")v.left-=m/2;if(a.my[1]==="bottom")v.top-=o;else if(a.my[1]==="center")v.top-=
357
+ o/2;v.left=Math.round(v.left);v.top=Math.round(v.top);w={left:v.left-p,top:v.top-s};b.each(["left","top"],function(y,B){b.ui.position[i[y]]&&b.ui.position[i[y]][B](v,{targetWidth:n,targetHeight:q,elemWidth:m,elemHeight:o,collisionPosition:w,collisionWidth:r,collisionHeight:u,offset:j,my:a.my,at:a.at})});b.fn.bgiframe&&k.bgiframe();k.offset(b.extend(v,{using:a.using}))})};b.ui.position={fit:{left:function(a,d){var h=b(window);h=d.collisionPosition.left+d.collisionWidth-h.width()-h.scrollLeft();a.left=
358
+ h>0?a.left-h:Math.max(a.left-d.collisionPosition.left,a.left)},top:function(a,d){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();a.top=h>0?a.top-h:Math.max(a.top-d.collisionPosition.top,a.top)}},flip:{left:function(a,d){if(d.at[0]!=="center"){var h=b(window);h=d.collisionPosition.left+d.collisionWidth-h.width()-h.scrollLeft();var i=d.my[0]==="left"?-d.elemWidth:d.my[0]==="right"?d.elemWidth:0,j=d.at[0]==="left"?d.targetWidth:-d.targetWidth,n=-2*d.offset[0];a.left+=
359
+ d.collisionPosition.left<0?i+j+n:h>0?i+j+n:0}},top:function(a,d){if(d.at[1]!=="center"){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();var i=d.my[1]==="top"?-d.elemHeight:d.my[1]==="bottom"?d.elemHeight:0,j=d.at[1]==="top"?d.targetHeight:-d.targetHeight,n=-2*d.offset[1];a.top+=d.collisionPosition.top<0?i+j+n:h>0?i+j+n:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(a,d){if(/static/.test(b.curCSS(a,"position")))a.style.position="relative";var h=b(a),
360
+ i=h.offset(),j=parseInt(b.curCSS(a,"top",true),10)||0,n=parseInt(b.curCSS(a,"left",true),10)||0;i={top:d.top-i.top+j,left:d.left-i.left+n};"using"in d?d.using.call(a,i):h.css(i)};b.fn.offset=function(a){var d=this[0];if(!d||!d.ownerDocument)return null;if(a)return this.each(function(){b.offset.setOffset(this,a)});return e.call(this)}}})(jQuery);
361
+ (function(b,c){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
362
+ this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(f){if(f===c)return this._value();this._setOption("value",f);return this},_setOption:function(f,g){if(f==="value"){this.options.value=g;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var f=this.options.value;if(typeof f!=="number")f=0;return Math.min(this.options.max,Math.max(this.min,f))},_percentage:function(){return 100*
363
+ this._value()/this.options.max},_refreshValue:function(){var f=this.value(),g=this._percentage();if(this.oldValue!==f){this.oldValue=f;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",f===this.options.max).width(g.toFixed(0)+"%");this.element.attr("aria-valuenow",f)}});b.extend(b.ui.progressbar,{version:"1.8.8"})})(jQuery);
364
+ (function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,f=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");f.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
365
+ this.range=b([]);if(f.range){if(f.range===true){this.range=b("<div></div>");if(!f.values)f.values=[this._valueMin(),this._valueMin()];if(f.values.length&&f.values.length!==2)f.values=[f.values[0],f.values[0]]}else this.range=b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(f.range==="min"||f.range==="max")this.range.addClass("ui-slider-range-"+f.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
366
+ if(f.values&&f.values.length)for(;b(".ui-slider-handle",this.element).length<f.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){f.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(f.disabled)b(this).blur();
367
+ else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(g){b(this).data("index.ui-slider-handle",g)});this.handles.keydown(function(g){var e=true,a=b(this).data("index.ui-slider-handle"),d,h,i;if(!c.options.disabled){switch(g.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:e=
368
+ false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");d=c._start(g,a);if(d===false)return}break}i=c.options.step;d=c.options.values&&c.options.values.length?(h=c.values(a)):(h=c.value());switch(g.keyCode){case b.ui.keyCode.HOME:h=c._valueMin();break;case b.ui.keyCode.END:h=c._valueMax();break;case b.ui.keyCode.PAGE_UP:h=c._trimAlignValue(d+(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=c._trimAlignValue(d-(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(d===
369
+ c._valueMax())return;h=c._trimAlignValue(d+i);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(d===c._valueMin())return;h=c._trimAlignValue(d-i);break}c._slide(g,a,h);return e}}).keyup(function(g){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(g,e);c._change(g,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
370
+ this._mouseDestroy();return this},_mouseCapture:function(c){var f=this.options,g,e,a,d,h;if(f.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:c.pageX,y:c.pageY});e=this._valueMax()-this._valueMin()+1;d=this;this.handles.each(function(i){var j=Math.abs(g-d.values(i));if(e>j){e=j;a=b(this);h=i}});if(f.range===true&&this.values(1)===f.min){h+=1;a=b(this.handles[h])}if(this._start(c,
371
+ h)===false)return false;this._mouseSliding=true;d._handleIndex=h;a.addClass("ui-state-active").focus();f=a.offset();this._clickOffset=!b(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-f.left-a.width()/2,top:c.pageY-f.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(c,h,g);return this._animateOff=true},_mouseStart:function(){return true},
372
+ _mouseDrag:function(c){var f=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,f);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var f;
373
+ if(this.orientation==="horizontal"){f=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}f=c/f;if(f>1)f=1;if(f<0)f=0;if(this.orientation==="vertical")f=1-f;c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+f*c)},_start:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=
374
+ this.values(f);g.values=this.values()}return this._trigger("start",c,g)},_slide:function(c,f,g){var e;if(this.options.values&&this.options.values.length){e=this.values(f?0:1);if(this.options.values.length===2&&this.options.range===true&&(f===0&&g>e||f===1&&g<e))g=e;if(g!==this.values(f)){e=this.values();e[f]=g;c=this._trigger("slide",c,{handle:this.handles[f],value:g,values:e});this.values(f?0:1);c!==false&&this.values(f,g,true)}}else if(g!==this.value()){c=this._trigger("slide",c,{handle:this.handles[f],
375
+ value:g});c!==false&&this.value(g)}},_stop:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=this.values(f);g.values=this.values()}this._trigger("stop",c,g)},_change:function(c,f){if(!this._keySliding&&!this._mouseSliding){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=this.values(f);g.values=this.values()}this._trigger("change",c,g)}},value:function(c){if(arguments.length){this.options.value=
376
+ this._trimAlignValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(c,f){var g,e,a;if(arguments.length>1){this.options.values[c]=this._trimAlignValue(f);this._refreshValue();this._change(null,c)}if(arguments.length)if(b.isArray(arguments[0])){g=this.options.values;e=arguments[0];for(a=0;a<g.length;a+=1){g[a]=this._trimAlignValue(e[a]);this._change(null,a)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(c):this.value();
377
+ else return this._values()},_setOption:function(c,f){var g,e=0;if(b.isArray(this.options.values))e=this.options.values.length;b.Widget.prototype._setOption.apply(this,arguments);switch(c){case "disabled":if(f){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
378
+ this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(g=0;g<e;g+=1)this._change(null,g);this._animateOff=false;break}},_value:function(){var c=this.options.value;return c=this._trimAlignValue(c)},_values:function(c){var f,g;if(arguments.length){f=this.options.values[c];
379
+ return f=this._trimAlignValue(f)}else{f=this.options.values.slice();for(g=0;g<f.length;g+=1)f[g]=this._trimAlignValue(f[g]);return f}},_trimAlignValue:function(c){if(c<=this._valueMin())return this._valueMin();if(c>=this._valueMax())return this._valueMax();var f=this.options.step>0?this.options.step:1,g=(c-this._valueMin())%f;alignValue=c-g;if(Math.abs(g)*2>=f)alignValue+=g>0?f:-f;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
380
+ _refreshValue:function(){var c=this.options.range,f=this.options,g=this,e=!this._animateOff?f.animate:false,a,d={},h,i,j,n;if(this.options.values&&this.options.values.length)this.handles.each(function(q){a=(g.values(q)-g._valueMin())/(g._valueMax()-g._valueMin())*100;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(g.options.range===true)if(g.orientation==="horizontal"){if(q===0)g.range.stop(1,1)[e?"animate":"css"]({left:a+"%"},f.animate);
381
+ if(q===1)g.range[e?"animate":"css"]({width:a-h+"%"},{queue:false,duration:f.animate})}else{if(q===0)g.range.stop(1,1)[e?"animate":"css"]({bottom:a+"%"},f.animate);if(q===1)g.range[e?"animate":"css"]({height:a-h+"%"},{queue:false,duration:f.animate})}h=a});else{i=this.value();j=this._valueMin();n=this._valueMax();a=n!==j?(i-j)/(n-j)*100:0;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1,
382
+ 1)[e?"animate":"css"]({width:a+"%"},f.animate);if(c==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-a+"%"},{queue:false,duration:f.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:a+"%"},f.animate);if(c==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-a+"%"},{queue:false,duration:f.animate})}}});b.extend(b.ui.slider,{version:"1.8.8"})})(jQuery);
383
+ (function(b,c){function f(){return++e}function g(){return++a}var e=0,a=0;b.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected")this.options.collapsible&&
384
+ h==this.options.selected||this.select(h);else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+f()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+g());return b.cookie.apply(null,[d].concat(b.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=
385
+ b(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(d){function h(r,u){r.css("display","");!b.support.opacity&&u.opacity&&r[0].style.removeAttribute("filter")}var i=this,j=this.options,n=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=b(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);this.anchors.each(function(r,u){var v=b(u).attr("href"),w=v.split("#")[0],y;if(w&&(w===location.toString().split("#")[0]||
386
+ (y=b("base")[0])&&w===y.href)){v=u.hash;u.href=v}if(n.test(v))i.panels=i.panels.add(i.element.find(i._sanitizeSelector(v)));else if(v&&v!=="#"){b.data(u,"href.tabs",v);b.data(u,"load.tabs",v.replace(/#.*$/,""));v=i._tabId(u);u.href="#"+v;u=i.element.find("#"+v);if(!u.length){u=b(j.panelTemplate).attr("id",v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[r-1]||i.list);u.data("destroy.tabs",true)}i.panels=i.panels.add(u)}else j.disabled.push(r)});if(d){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
387
+ this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===c){location.hash&&this.anchors.each(function(r,u){if(u.hash==location.hash){j.selected=r;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(i._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected=
388
+ this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(r){return i.lis.index(r)}))).sort();b.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(b.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
389
+ if(j.selected>=0&&this.anchors.length){i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");i.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[j.selected],i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash))))});this.load(j.selected)}b(window).bind("unload",function(){i.lis.add(i.anchors).unbind(".tabs");i.lis=i.anchors=i.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
390
+ this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);d=0;for(var q;q=this.lis[d];d++)b(q)[b.inArray(d,j.disabled)!=-1&&!b(q).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var l=function(r,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+r)},k=function(r,u){u.removeClass("ui-state-"+
391
+ r)};this.lis.bind("mouseover.tabs",function(){l("hover",b(this))});this.lis.bind("mouseout.tabs",function(){k("hover",b(this))});this.anchors.bind("focus.tabs",function(){l("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",b(this).closest("li"))})}var m,o;if(j.fx)if(b.isArray(j.fx)){m=j.fx[0];o=j.fx[1]}else m=o=j.fx;var p=o?function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
392
+ function(){h(u,o);i._trigger("show",null,i._ui(r,u[0]))})}:function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");i._trigger("show",null,i._ui(r,u[0]))},s=m?function(r,u){u.animate(m,m.duration||"normal",function(){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");h(u,m);i.element.dequeue("tabs")})}:function(r,u){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");i.element.dequeue("tabs")};
393
+ this.anchors.bind(j.event+".tabs",function(){var r=this,u=b(r).closest("li"),v=i.panels.filter(":not(.ui-tabs-hide)"),w=i.element.find(i._sanitizeSelector(r.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||i.panels.filter(":animated").length||i._trigger("select",null,i._ui(this,w[0]))===false){this.blur();return false}j.selected=i.anchors.index(this);i.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected=
394
+ -1;j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){s(r,v)}).dequeue("tabs");this.blur();return false}else if(!v.length){j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this));this.blur();return false}j.cookie&&i._cookie(j.selected,j.cookie);if(w.length){v.length&&i.element.queue("tabs",function(){s(r,v)});i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
395
+ b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string")d=this.anchors.index(this.anchors.filter("[href$="+d+"]"));return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h=
396
+ b.data(this,"href.tabs");if(h)this.href=h;var i=b(this).unbind(".tabs");b.each(["href","load","cache"],function(j,n){i.removeData(n+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(d,
397
+ h,i){if(i===c)i=this.anchors.length;var j=this,n=this.options;h=b(n.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,h));d=!d.indexOf("#")?d.replace("#",""):this._tabId(b("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var q=j.element.find("#"+d);q.length||(q=b(n.panelTemplate).attr("id",d).data("destroy.tabs",true));q.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(i>=this.lis.length){h.appendTo(this.list);q.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[i]);
398
+ q.insertBefore(this.panels[i])}n.disabled=b.map(n.disabled,function(l){return l>=i?++l:l});this._tabify();if(this.anchors.length==1){n.selected=0;h.addClass("ui-tabs-selected ui-state-active");q.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[i],this.panels[i]));return this},remove:function(d){d=this._getIndex(d);var h=this.options,i=this.lis.eq(d).remove(),j=this.panels.eq(d).remove();
399
+ if(i.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(d+(d+1<this.anchors.length?1:-1));h.disabled=b.map(b.grep(h.disabled,function(n){return n!=d}),function(n){return n>=d?--n:n});this._tabify();this._trigger("remove",null,this._ui(i.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(b.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=b.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,
400
+ this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1)if(this.options.collapsible&&this.options.selected!=-1)d=this.options.selected;else return this;this.anchors.eq(d).trigger(this.options.event+".tabs");return this},
401
+ load:function(d){d=this._getIndex(d);var h=this,i=this.options,j=this.anchors.eq(d)[0],n=b.data(j,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&b.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(d).addClass("ui-state-processing");if(i.spinner){var q=b("span",j);q.data("label.tabs",q.html()).html(i.spinner)}this.xhr=b.ajax(b.extend({},i.ajaxOptions,{url:n,success:function(l,k){h.element.find(h._sanitizeSelector(j.hash)).html(l);h._cleanup();i.cache&&b.data(j,
402
+ "cache.tabs",true);h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.success(l,k)}catch(m){}},error:function(l,k){h._cleanup();h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.error(l,k,d,j)}catch(m){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
403
+ url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.8"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(d,h){var i=this,j=this.options,n=i._rotate||(i._rotate=function(q){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var l=j.selected;i.select(++l<i.anchors.length?l:0)},d);q&&q.stopPropagation()});h=i._unrotate||(i._unrotate=!h?function(q){q.clientX&&
404
+ i.rotate(null)}:function(){t=j.selected;n()});if(d){this.element.bind("tabsshow",n);this.anchors.bind(j.event+".tabs",h);n()}else{clearTimeout(i.rotation);this.element.unbind("tabsshow",n);this.anchors.unbind(j.event+".tabs",h);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
javascript/main.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var timer = 5;
2
+
3
+ function autoClick(){
4
+ window.location = document.getElementById('cLink').href;
5
+ }
6
+
7
+ function countdown(){
8
+
9
+ document.getElementById('countdown').innerText = timer;
10
+ if(timer > 0)
11
+ timer = timer - 1;
12
+
13
+ }
14
+
15
+ function cLink_load(){
16
+
17
+ var time = 5000;
18
+
19
+ countdown();
20
+
21
+ setTimeout('autoClick();', time);
22
+ setInterval('countdown()', 1000);
23
+ }
language/deutsch.php CHANGED
@@ -338,9 +338,9 @@ Und folgende Arbeitsschritte sind daf
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
 
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 2 Dateien besteht. Zu finden im
342
+ Verzeichnis administrator/components/com_xcloner-backupandrestore/restore/
343
+ 3. Uploade das Backup und alle 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
 
language/dutch.php CHANGED
@@ -255,7 +255,7 @@ define("LM_CLONER_RESTORE","<h2>Hoe herstel ik een backup op verschillende locat
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
 
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 de bestanden uit de volgende directory: administrator/components/com_cloner-backupandrestore/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
 
language/english.php CHANGED
@@ -119,7 +119,7 @@ define("LM_CRON_MCRON","Configuration Name:");
119
  define("LM_CRON_MCRON_AVAIL","Available Configurations:");
120
  define("LM_CRON_MCRON_R","please provide a simple name for your new cron configuration");
121
  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");
122
- define("LM_CRON_SETTINGS_M","Multiple CronJobs Configuration");
123
  // --- MENU ---//
124
  define("LM_MENU_OPEN_ALL", "open all");
125
  define("LM_MENU_CLOSE_ALL", "close all");
@@ -145,6 +145,9 @@ define("LM_MAIN_View_Backups","View Backups");
145
  define("LM_MAIN_Generate_Backup","Generate Backup");
146
  define("LM_MAIN_Help","Help");
147
  define("LM_FTP_TRANSFER_MORE","FTP Connection Mode");
 
 
 
148
 
149
 
150
  // --- LANGUAGE --//
@@ -236,6 +239,7 @@ define("LM_CLONE_FORM_TOP","<h2>Provide your ftp details below:</h2>");
236
  // --- Info Tab ---//
237
 
238
  define("LM_CONFIG_INFO_T_SAFEMODE","Php Safe_mode:");
 
239
  define("LM_CONFIG_INFO_T_MTIME","Php max_execution_time:");
240
  define("LM_CONFIG_INFO_T_MEML","Php memory_limit:");
241
  define("LM_CONFIG_INFO_T_BDIR","Php open_basedir:");
@@ -257,6 +261,7 @@ define("LM_CONFIG_INFO_TIME","<small>This controls the maximum time your script
257
  define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
258
  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>");
259
  define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
 
260
  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>");
261
  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>");
262
  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>");
@@ -330,45 +335,45 @@ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations I
330
  Restoring your backups has never been more easier!
331
  With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
332
  you will be able to move your Joomla backup anywhere on the Internet.
333
-
334
  Here is what you have to do:
335
-
336
  <b>Step1 - move your backup to the restore host</b>
337
-
338
- - go into the XCloner 'View Backups' area
339
  - after you have selected your backup click on the 'Clone it' button
340
  - enter the ftp details of where you would like to Clone the backup
341
  - after hitting submit the backup and the restore script will be transfered on the new host and you
342
  will be given a url to access the next step based on the url you provided for the remote location
343
  - 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>
344
-
345
  <b>Note:</b> if this process fails for any reason, you need to do this:
346
  1. Download the backup on your computer
347
- 2. Download the restore script, all 3 files from directory administrator/components/com_xcloner/restore
348
  3. Upload both backup and restore script to your restore location
349
- 4. Launch XCloner.php in your browser and follow the restore screen as specified below
350
-
351
  <b>Step 2 - the XCloner.php restore screen:</b>
352
-
353
  <b>XCloner.php - the restore script</b>
354
  - on this step you have in place the clone you made based on your Joomla site and the Restore script
355
  - enter you new mysql details, this includes your new mysql hostname, user and pass, and a new database
356
  different from the original one
357
  - enter you new location Url and pass
358
  - to restore the files you have <b>2 options:</b>
359
-
360
- - 1. restore the files through ftp, the script will simulate a ftp upload process on your server, this will
361
  fix the permissions problem from step 2.
362
- - 2. restore the files directly, this will unarchive the files on your server, will work fast but it might
363
- result in some permission problems if you use your ftp a lot to make changes to the site
364
-
365
- - after you hit submit the script will attempt to move the files to the new path, directly or using ftp and
366
  will install the database
367
  - if everything goes ok your new site clone is up and running on the new location
368
-
369
  For support please consult our forums <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
370
  or email us at <a href='mailto:info@xcloner.com'>info@xcloner.com</a>
371
-
372
 
373
  </pre>");
374
 
@@ -395,15 +400,15 @@ define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2>
395
  define("LM_LOGIN_TEXT","
396
  <pre>
397
  <b>Notes:</b>
398
- 1. If you are on this screen for the first time, your default
399
- username is '<i>admin</i>' and password '<i>admin</i>', you will need
400
  to change them after login
401
-
402
- 2. if you forgot your password, to reset it you need to add
403
  this code:
404
-
405
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
406
-
407
  at the end of the config file cloner.config.php just
408
  before line ?>
409
  Don't forget to replace my_new_pass with the actual password
119
  define("LM_CRON_MCRON_AVAIL","Available Configurations:");
120
  define("LM_CRON_MCRON_R","please provide a simple name for your new cron configuration");
121
  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");
122
+ define("LM_CRON_SETTINGS_M","Multiple CronJobs Configuration");
123
  // --- MENU ---//
124
  define("LM_MENU_OPEN_ALL", "open all");
125
  define("LM_MENU_CLOSE_ALL", "close all");
145
  define("LM_MAIN_Generate_Backup","Generate Backup");
146
  define("LM_MAIN_Help","Help");
147
  define("LM_FTP_TRANSFER_MORE","FTP Connection Mode");
148
+ define("LM_REFRESH_MODE","Backup Refresh Mode");
149
+ define("LM_DEBUG_MODE","Enable log:");
150
+ define("LM_REFRESH_ERROR","There was an error retreiving the JSON data from the server, try again or contact the developers!");
151
 
152
 
153
  // --- LANGUAGE --//
239
  // --- Info Tab ---//
240
 
241
  define("LM_CONFIG_INFO_T_SAFEMODE","Php Safe_mode:");
242
+ define("LM_CONFIG_INFO_T_VERSION","PHP Version Check:");
243
  define("LM_CONFIG_INFO_T_MTIME","Php max_execution_time:");
244
  define("LM_CONFIG_INFO_T_MEML","Php memory_limit:");
245
  define("LM_CONFIG_INFO_T_BDIR","Php open_basedir:");
261
  define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
262
  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>");
263
  define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
264
+ define("LM_CONFIG_INFO_VERSION","<small>PHP >=5.2.0 is required to enjoy all features</small>");
265
  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>");
266
  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>");
267
  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>");
335
  Restoring your backups has never been more easier!
336
  With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
337
  you will be able to move your Joomla backup anywhere on the Internet.
338
+
339
  Here is what you have to do:
340
+
341
  <b>Step1 - move your backup to the restore host</b>
342
+
343
+ - go into the XCloner 'View Backups' area
344
  - after you have selected your backup click on the 'Clone it' button
345
  - enter the ftp details of where you would like to Clone the backup
346
  - after hitting submit the backup and the restore script will be transfered on the new host and you
347
  will be given a url to access the next step based on the url you provided for the remote location
348
  - 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>
349
+
350
  <b>Note:</b> if this process fails for any reason, you need to do this:
351
  1. Download the backup on your computer
352
+ 2. Download the restore script, all files from directory administrator/components/com_xcloner-backupandrestore/restore/
353
  3. Upload both backup and restore script to your restore location
354
+ 4. Launch XCloner.php in your browser and follow the restore screen as specified below
355
+
356
  <b>Step 2 - the XCloner.php restore screen:</b>
357
+
358
  <b>XCloner.php - the restore script</b>
359
  - on this step you have in place the clone you made based on your Joomla site and the Restore script
360
  - enter you new mysql details, this includes your new mysql hostname, user and pass, and a new database
361
  different from the original one
362
  - enter you new location Url and pass
363
  - to restore the files you have <b>2 options:</b>
364
+
365
+ - 1. restore the files through ftp, the script will simulate a ftp upload process on your server, this will
366
  fix the permissions problem from step 2.
367
+ - 2. restore the files directly, this will unarchive the files on your server, will work fast but it might
368
+ result in some permission problems if you use your ftp a lot to make changes to the site
369
+
370
+ - after you hit submit the script will attempt to move the files to the new path, directly or using ftp and
371
  will install the database
372
  - if everything goes ok your new site clone is up and running on the new location
373
+
374
  For support please consult our forums <a href='http://www.xcloner.com/support/forums/' target='_blank'>http://www.xcloner.com/support/forums/</a>
375
  or email us at <a href='mailto:info@xcloner.com'>info@xcloner.com</a>
376
+
377
 
378
  </pre>");
379
 
400
  define("LM_LOGIN_TEXT","
401
  <pre>
402
  <b>Notes:</b>
403
+ 1. If you are on this screen for the first time, your default
404
+ username is '<i>admin</i>' and password '<i>admin</i>', you will need
405
  to change them after login
406
+
407
+ 2. if you forgot your password, to reset it you need to add
408
  this code:
409
+
410
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"my_new_pass\");</b>
411
+
412
  at the end of the config file cloner.config.php just
413
  before line ?>
414
  Don't forget to replace my_new_pass with the actual password
language/spanish.php CHANGED
@@ -93,6 +93,7 @@ define("LM_CRON_MCRON","Nombre de la configuraci
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");
@@ -253,7 +254,7 @@ Esto es lo que debes hacer:
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>
@@ -299,4 +300,4 @@ define("LM_LOGIN_TEXT","<pre>
299
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"mi_nueva_contrase�a\");</b>
300
  </pre>
301
  ");
302
- ?>
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
+
97
  define("LM_CRON_SETTINGS_M","Configuraci�n de procesos Cron m�ltiples");
98
  define("LM_MENU_OPEN_ALL","Abrir todos");
99
  define("LM_MENU_CLOSE_ALL","Cerrar todos");
254
 
255
  <b>Atenci�n:</b>Si este proceso falla por alguna raz�n. Debes hacer esto:
256
  1. Desc�rgate la copia de seguridad en tu PC.
257
+ 2. Desc�rgate el script de restauraci�n, los archivos, desde el directorio administrator/components/com_xcloner-backupandrestore/restore/
258
  3. Sube la copia de seguridad y el script a tu directorio de restauraci�n.
259
  4. Lanza XCloner.php en tu navegador y sigue la pantalla de restauraci�n tal y como especifica abajo
260
  Beispiel URL: <b>http://neue-seite.de/XCloner.php</b>
300
  <b>$"."_CONFIG[\"jcpass\"] = md5(\"mi_nueva_contrase�a\");</b>
301
  </pre>
302
  ");
303
+ ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.xcloner.com/
4
  Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload, wordpress backup, backup plugin, database backup, database restore, site move, transfer, blog transfer
5
  Requires at least: 2.0.2
6
  Tested up to: 3.0.1
7
- Stable tag: 2.1.2
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
 
@@ -39,7 +39,7 @@ Features:
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
@@ -74,12 +74,22 @@ If the inside Clone option fails for some reason, you need to:
74
 
75
  == Changelog ==
76
 
77
- = 2.1 =
78
- Initial release
 
 
 
 
79
  = 2.1.2 =
80
  Added Amazon S3 cron storage support
81
 
 
 
 
82
  == Upgrade Notice ==
83
 
 
 
 
84
  = 2.1 =
85
  Initial release
4
  Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload, wordpress backup, backup plugin, database backup, database restore, site move, transfer, blog transfer
5
  Requires at least: 2.0.2
6
  Tested up to: 3.0.1
7
+ Stable tag: 2.2.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
 
39
 
40
  == Installation ==
41
 
42
+ 1. Upload the plugin directory to wp-content/plugins directory
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
74
 
75
  == Changelog ==
76
 
77
+ = 2.2.1 =
78
+ * Added JSON AJAX interface to the Generate Backup process
79
+ * Added incremental filesystem scan
80
+ * several bug fixes
81
+ * php >=5.2.0 version check
82
+
83
  = 2.1.2 =
84
  Added Amazon S3 cron storage support
85
 
86
+ = 2.1 =
87
+ Initial release
88
+
89
  == Upgrade Notice ==
90
 
91
+ = 2.2.1 =
92
+ Improved filesystem scan to deal with large systems, improved Backup interface
93
+
94
  = 2.1 =
95
  Initial release
xcloner.php CHANGED
@@ -3,9 +3,10 @@
3
  Plugin Name: XCloner
4
  Plugin URI: http://www.xcloner.com
5
  Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks. Don't forget to create the 'administrator/backups' directory in your Wordpress root and make it fully writeable. <a href="plugins.php?page=xcloner_show">Open XCloner</a> | <a href="http://www.xcloner.com/support/premium-support/">Get Premium Support</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40xcloner%2ecom&lc=US&item_name=XCloner%20Support&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest">Donate</a>
6
- Version: 2.1
7
  Author: Liuta Ovidiu
8
  Author URI: http://www.xcloner.com
 
9
  */
10
 
11
 
3
  Plugin Name: XCloner
4
  Plugin URI: http://www.xcloner.com
5
  Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks. Don't forget to create the 'administrator/backups' directory in your Wordpress root and make it fully writeable. <a href="plugins.php?page=xcloner_show">Open XCloner</a> | <a href="http://www.xcloner.com/support/premium-support/">Get Premium Support</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40xcloner%2ecom&lc=US&item_name=XCloner%20Support&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest">Donate</a>
6
+ Version: 2.2.1
7
  Author: Liuta Ovidiu
8
  Author URI: http://www.xcloner.com
9
+ Plugin URI: http://www.xcloner.com
10
  */
11
 
12