XCloner – Backup and Restore - Version 3.0

Version Description

  • incremental database backup
  • incremental file system scan
  • backup size limit and option to split it into additional archives, default 2GB
  • exclude files larger than a certain size option
  • incremental files restore
  • JQuery Start interface
Download this release

Release Info

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

Code changes from version 2.2.1 to 3.0

Files changed (67) hide show
  1. admin.cloner.html.php +1526 -1072
  2. admin.cloner.php +213 -197
  3. admin.xcloner-backupandrestore.php +5 -0
  4. browser/files_inpage.php +10 -3
  5. browser/files_xml.php +20 -13
  6. browser/xmlhttp.js +5 -5
  7. classes/S3.php +4 -1
  8. administrator/backups/.excl → classes/error.class.php +0 -0
  9. classes/fileRecursion.php +57 -8
  10. classes/index.html +0 -0
  11. classes/main.class.php +116 -0
  12. classes/mysqlBackup.class.php +488 -0
  13. cloner.config.php +3 -0
  14. cloner.cron.php +93 -76
  15. cloner.functions.php +285 -126
  16. common.php +40 -15
  17. configs/test.php +53 -0
  18. css/main.css +90 -6
  19. css/start/images/ui-bg_flat_55_999999_40x100.png +0 -0
  20. css/start/images/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
  21. css/start/images/ui-bg_glass_45_0078ae_1x400.png +0 -0
  22. css/start/images/ui-bg_glass_55_f8da4e_1x400.png +0 -0
  23. css/start/images/ui-bg_glass_75_79c9ec_1x400.png +0 -0
  24. css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png +0 -0
  25. css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png +0 -0
  26. css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
  27. css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  28. css/start/images/ui-icons_0078ae_256x240.png +0 -0
  29. css/start/images/ui-icons_056b93_256x240.png +0 -0
  30. css/start/images/ui-icons_d8e7f3_256x240.png +0 -0
  31. css/start/images/ui-icons_e0fdff_256x240.png +0 -0
  32. css/start/images/ui-icons_f5e175_256x240.png +0 -0
  33. css/start/images/ui-icons_f7a50d_256x240.png +0 -0
  34. css/start/images/ui-icons_fcd113_256x240.png +0 -0
  35. css/{jquery-ui.css → start/jquery-ui-1.8.9.custom.css} +319 -316
  36. css/tabber.css +0 -109
  37. images/logo.gif +0 -0
  38. images/logo.png +0 -0
  39. images/progressBarLong.gif +0 -0
  40. install.xcloner.php +4 -12
  41. javascript/backup.js +172 -0
  42. javascript/jquery-ui-1.8.9.custom.min.js +781 -0
  43. javascript/jquery-ui.min.js +0 -404
  44. javascript/main.js +37 -0
  45. javascript/tabber.js +0 -512
  46. language/deutsch.php +0 -0
  47. language/dutch.php +0 -0
  48. language/english.php +46 -33
  49. language/index.html +0 -0
  50. language/spanish.php +0 -0
  51. license.txt +340 -2
  52. readme.txt +30 -31
  53. recursive.php +0 -118
  54. restore/TAR.php +274 -11
  55. restore/XCloner.php +1362 -2222
  56. screenshot-1.png +0 -0
  57. screenshot-2.png +0 -0
  58. screenshot-3.png +0 -0
  59. screenshot-4.png +0 -0
  60. screenshot-5.png +0 -0
  61. screenshot-6.png +0 -0
  62. screenshot-7.png +0 -0
  63. screenshot-8.png +0 -0
  64. toolbar.cloner.html.php +33 -11
  65. toolbar.cloner.php +8 -7
  66. xcloner.php +1 -1
  67. xcloner_j1.5.xml +115 -92
admin.cloner.html.php CHANGED
@@ -31,20 +31,20 @@ class mosTabs{
31
 
32
  function mosTabs($int){
33
 
34
- echo "<div class=\"tabber\">";
35
 
36
  }
37
 
38
  function startTab($name, $class){
39
 
40
- echo "<div class=\"tabbertab\" title=\"$name\">";
41
 
42
 
43
  }
44
 
45
  function endTab(){
46
 
47
- echo "</div>";
48
 
49
  }
50
 
@@ -63,8 +63,16 @@ class HTML_cloner {
63
 
64
  function header(){
65
 
66
- global $mosConfig_live_site, $task;
 
67
 
 
 
 
 
 
 
 
68
  ?>
69
  <html lang="en">
70
  <head>
@@ -72,16 +80,14 @@ function header(){
72
  <title>XCloner Backup and Restore</title>
73
  <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
74
 
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"
@@ -101,23 +107,31 @@ document.write('<style type="text/css">.tabber{display:none;}<\/style>');
101
 
102
  <tr><td align='center'>
103
 
104
- <table width='100%' border='1' bgcolor='white'>
 
105
  <tr>
106
- <td width='100%'>
107
- <table><tr><td>
108
- <img src="images/backup.png" align="middle">&nbsp;
109
- </td><td>
110
- <h2><?php echo LM_COM_TITLE.$_SERVER['HTTP_HOST']; ?></h2>
111
- <h1>Backup and Restore</h1>
112
- </td></tr></table>
113
- <td>
114
- <?php
115
- # Generating the buttons...
116
- require_once( "toolbar.cloner.php" );
117
- ?>
118
-
 
 
 
 
 
119
  </tr>
120
  </table>
 
 
121
  <br />
122
  <table width="100%" cellspacing='3' cellpadding="4" >
123
  <tr><td valign='top' width="160" >
@@ -192,7 +206,7 @@ document.write(d);
192
  <?php
193
  if($_REQUEST['mosmsg']!="")
194
 
195
- echo "<center><h2>".$_REQUEST['mosmsg']."</h2></center>";
196
 
197
  }
198
 
@@ -202,9 +216,11 @@ function footer(){
202
  </td></tr></table>
203
  <hr><br /><br />
204
  <center>
205
- <p>Powered by <a href='http://www.xcloner.com' target='_blank'>XCloner</a>. All rights reserved!</p></center>
206
 
207
  </td></tr></table>
 
 
208
 
209
  <?php
210
 
@@ -218,8 +234,9 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
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']){
@@ -230,6 +247,8 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
230
 
231
  }else{
232
 
 
 
233
  ?>
234
  <!--Start ProgressBar-->
235
  <script type="text/javascript">
@@ -238,6 +257,13 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
238
 
239
  var globalUrl;
240
  var step = "r1";
 
 
 
 
 
 
 
241
 
242
  $("#progressbar").progressbar({ value: 0 });
243
 
@@ -246,12 +272,22 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
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
 
@@ -262,6 +298,56 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
262
  $("#errorText").text(url);
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  if(!parseInt(json.finished)){
266
 
267
  $("#recurseStatus").text(json.tfiles);
@@ -272,8 +358,18 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
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);
@@ -285,9 +381,9 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
285
  }
286
 
287
  function xclonerGetJSON(url){
288
-
289
  globalUrl = url;
290
- step = "r2";
291
 
292
  $.getJSON(url, function(json) {
293
 
@@ -298,62 +394,145 @@ function goRefreshHtml($filename, $perm_lines, $excl_manual){
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;">
@@ -489,6 +668,7 @@ $error = 0;
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
@@ -503,7 +683,9 @@ $error = 0;
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
@@ -520,6 +702,20 @@ $error = 0;
520
  ?>
521
  </span></div>
522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  <div class="status">
524
  <span class="mtext">Backup Ready: </span>
525
  <?php
@@ -544,30 +740,57 @@ $error = 0;
544
  <?php
545
  }
546
 
547
- /*The basic authentification form*/
548
  function Login(){
549
 
550
  ?>
551
  <center><br />
552
- <form action="index2.php" method="post" name="adminForm">
553
- <table border='1' ><tr><td align='center'>
554
- <table align='center' cellpadding='10' cellspacing='20'>
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
 
562
- </table>
563
- </td></tr>
 
564
 
565
 
 
 
 
 
 
 
 
 
 
 
 
 
566
 
 
 
 
 
 
 
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
 
@@ -580,36 +803,45 @@ function Login(){
580
  function Cron(){
581
  global $_CONFIG;
582
  ?>
583
- <table class='adminform'>
584
- <tr><th>
585
- <?php echo LM_CRON_TOP?>
586
- </th></tr>
587
- <tr><td>
588
- <pre>
589
- <?php echo LM_CRON_SUB?>
590
- <br /><b>For Joomla:</b>
591
- <span style='background: #eeeeee'>
592
- /usr/bin/php <?php echo dirname(__FILE__);?>/cloner.cron.php
593
- <br />
594
- or
595
- <br />
596
- links http://link_to_xcloner_dir/cloner.cron.php
597
- <br />
598
- or
599
- <br />
600
- lynx -source http://link_to_xcloner_dir/cloner.cron.php
601
- </span>
602
 
603
- For <b>Running Multiple Crons</b>, you need to first create a custom configuration file in the XCloner Configuration -> Cron tab
604
- and then replace "cloner.cron.php" with "cloner.cron.php?config=myconfig.php", only use 'links' or 'lynx' options to run the cronjob
 
 
 
605
 
606
- If you would like to use the <b>php SSH command</b> for running Multiple Crons, you will need to replace
607
- the "cloner.cron.php" with <b>"cloner.cron.php myconfig.php"</b> in the command line.
 
 
608
 
609
- <?php echo LM_CRON_HELP?>
610
- </pre>
611
- </td></tr>
612
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
 
614
  <?php
615
  }
@@ -743,29 +975,37 @@ function Translator($option, $lang_arr){
743
  global $_CONFIG;
744
 
745
  ?>
 
 
 
 
 
 
 
746
 
747
- <form action="index2.php" method="post" name="adminForm">
 
748
  <table class="adminlist">
749
  <tr>
750
- <th width="5" align="left">#</th>
751
- <th width="5" align="left">
752
- <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $lang_arr ); ?>);" />
753
  </th>
754
  <th align="left">
755
  <?php echo LM_LANG_NAME ?>
756
  </th>
757
  </tr>
758
- <?php
759
 
 
760
  for($i=0; $i<sizeof($lang_arr); $i++){
761
 
762
  ?>
763
 
764
  <tr>
765
- <td width="5" align="left"><?php echo ($i+1);?></td>
766
- <td width="5" align="left">
767
- <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" onclick="isChecked(this.checked);" />
768
- <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $lang_arr[$i] ?>" onclick="isChecked(this.checked);" />
 
769
  </td>
770
  <td align="left" >
771
  <a href="index2.php?option=<?php echo $option;?>&task=edit_lang&langx=<?php echo $lang_arr[$i];?>"><?php echo ucfirst($lang_arr[$i])?>
@@ -775,7 +1015,7 @@ function Translator($option, $lang_arr){
775
 
776
  }
777
  ?>
778
-
779
  <input type="hidden" name="option" value="com_cloner" />
780
  <input type="hidden" name="task" value="lang" />
781
  <input type="hidden" name="boxchecked" value="0" />
@@ -791,23 +1031,31 @@ function showBackups( &$files, &$sizes, $path, $option ) {
791
  global $baDownloadPath, $_CONFIG;
792
 
793
  ?>
 
 
 
 
 
 
 
 
 
794
  <form action="index2.php" method="post" name="adminForm">
795
  <table class="adminlist">
796
  <tr>
797
- <th width="5">#</th>
798
- <th width="5">
799
- <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $files ); ?>);" />
800
- </th>
801
- <th width="33%" class="title">
802
- <?php echo LM_COL_FILENAME ?>
803
  </th>
804
- <th align="left" width="10%">
805
  <?php echo LM_COL_DOWNLOAD ?>
806
  </th>
 
 
 
807
  <th align="left" width="10%">
808
  <?php echo LM_COL_SIZE ?>
809
  </th>
810
- <th align="left" width="43%">
811
  <?php echo LM_COL_DATE ?>
812
  </th>
813
  </tr>
@@ -815,38 +1063,28 @@ function showBackups( &$files, &$sizes, $path, $option ) {
815
  $k = 0;
816
  for ($i=0; $i <= (count( $files )-1); $i++) {
817
  $date = date ("D jS M Y H:i:s (\G\M\T O)", filemtime($path.'/'.$files[$i]));
 
818
  ?>
819
  <tr class="<?php echo "row$k"; ?>">
820
- <td>
821
- <?php echo $i+1; ?>
822
- </td>
823
  <td align="center">
824
- <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" onclick="isChecked(this.checked);" />
825
- <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $files[$i] ?>" onclick="isChecked(this.checked);" />
826
- </td>
827
- <td >
828
- <a target='_blank' href="<?php echo "index2.php?option=com_cloner&task=download&file=".'/'.urlencode($files[$i]); ?>"><?php echo $files[$i]; ?></a><input type="hidden" id="f<?php echo $i ?>" name="f<?php echo $i ?>" value="<?php echo $files[$i]; ?>" >
829
  </td>
830
  <td align="left">
831
- <a target='_blank' href="<?php echo "index2.php?option=com_cloner&task=download&file=".'/'.urlencode($files[$i]); ?>"><img src="images/filesave.png" border="0" alt="<?php echo LM_DOWNLOAD_TITLE ?>" title="<?php echo LM_DOWNLOAD_TITLE ?>"></a></td >
832
- <!--<td align="left">
833
- <?php
834
-
835
- $userfile = $_CONFIG['baDownloadPath']."/".$files[$i];
836
- $localfile = $_CONFIG['clonerPath']."/".$files[$i];
837
- if(@file_exists($userfile))
838
- echo "<a href=\"index2.php?option=com_cloner&task=action&action=delete&file=$files[$i]\">
839
- <img border='0' src='images/tick.png'></a>";
840
- else
841
- echo "<a href=\"index2.php?option=com_cloner&task=action&action=copy&file=$files[$i]\">
842
- <img border='0' src='images/publish_x.png'></a>";
843
- ?>
844
- </td>-->
845
  <td align="left">
846
- <?php echo $sizes[$i]; ?>
847
  </td >
848
  <td align="left">
849
- <?php echo $date; ?>
850
  </td>
851
  </tr>
852
  <?php
@@ -854,7 +1092,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
854
  }
855
  ?>
856
  </table>
857
-
858
  <input type="hidden" name="option" value="com_cloner" />
859
  <input type="hidden" name="task" value="" />
860
  <input type="hidden" name="boxchecked" value="0" />
@@ -868,926 +1106,1083 @@ function showBackups( &$files, &$sizes, $path, $option ) {
868
  global $config_file,$_CONFIG, $lang_array, $database, $mosConfig_db;
869
  ?>
870
  <form name='adminForm' action='index2.php' method='POST'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
871
  <table class='adminform'>
872
  <tr><th colspan='2'>
873
  <?php echo LM_CONFIG_EDIT?> <?php echo $config_file?>
874
  </th></tr>
875
  </table>
876
  <?php
877
- $tabs = new mosTabs(1);
878
- $tabs->startTab(LM_TAB_GENERAL,"config-general-tab");
879
  ?>
880
- <table class='adminform'>
881
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
 
883
- <tr>
884
- <th colspan='2'>
885
- <?php echo LM_CONFIG_BSETTINGS?>
886
- </th>
887
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
888
 
889
- <tr>
890
- <td>
891
- <?php echo LM_CONFIG_UBPATH?>
892
- </td>
893
- <td>
894
- <input type=text size=50 name='backup_path' value='<?php echo $_CONFIG[backup_path]?>'>
895
- <br /><?php echo LM_CONFIG_UBPATH_SUB?>
896
- </td>
897
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
898
 
899
- <tr>
900
- <td width='250'>
901
- <?php echo LM_CONFIG_BPATH?>
902
- </td>
903
- <td>
904
- <input type=text size=50 name='clonerPath' value='<?php echo $_CONFIG[clonerPath]?>'>
905
- <br /><?php echo LM_CONFIG_BPATH_SUB?>
906
- </td>
907
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
 
 
 
 
 
 
 
 
 
909
 
910
- <tr>
911
- <th colspan='2'>
912
- <?php echo LM_CONFIG_BSETTINGS_OPTIONS?>
913
- </th>
914
- </tr>
 
 
 
915
 
916
- <tr>
917
- <td>
918
- <?php echo LM_CONFIG_MANUAL_BACKUP;?>
919
- </td>
920
- <td>
921
- <?php echo LM_YES?> <input type=radio size=50 value=1 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==1) echo 'checked';?>>
922
- <?php echo LM_NO?> <input type=radio size=50 value=0 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==0) echo 'checked';?>>
923
- <br><small><?php echo LM_CONFIG_MANUAL_BACKUP_SUB?></small>
924
- </td>
925
- </tr>
926
 
927
- <tr>
928
- <td>
929
- <?php echo LM_CRON_COMPRESS?>
930
- </td>
931
- <td>
932
- <?php echo LM_YES?> <input type=radio size=50 value=1 name='backup_compress' <?php if($_CONFIG[backup_compress]==1) echo 'checked';?>>
933
- <?php echo LM_NO?> <input type=radio size=50 value=0 name='backup_compress' <?php if($_CONFIG[backup_compress]==0) echo 'checked';?>>
934
- <br /> <small>set it to Yes in order to compress the files into smaller backups</small>
935
- </td>
936
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
937
 
938
- <tr>
939
- <td>
940
- <?php echo LM_CRON_DB_BACKUP?>
941
- </td>
942
- <td>
943
- Yes <input type=radio size=50 value=1 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==1) echo 'checked';?>>
944
- No <input type=radio size=50 value=0 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==0) echo 'checked';?>>
945
- <br />
946
- <?php echo LM_CRON_DB_BACKUP_SUB?>
947
- </td>
948
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
949
 
950
- <tr>
951
- <td>
952
- <?php echo LM_CONFIG_SYSTEM_MBACKUP?>
953
- </td>
954
- <td>
955
- Yes <input type=radio size=50 value=1 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==1) echo 'checked';?>>
956
- No <input type=radio size=50 value=0 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==0) echo 'checked';?>>
957
- <br />
958
- <?php echo LM_CONFIG_SYSTEM_MBACKUP_SUB?>
959
- </td>
960
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
961
 
962
- <tr>
963
- <th colspan='2'>
964
- <?php echo LM_CONFIG_BSETTINGS_SERVER?>
965
- </th>
966
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
967
 
 
 
968
 
969
- <tr >
970
- <td>
971
- <?php echo LM_CONFIG_MEM?>
972
- </td>
973
- <td align='left'>
974
- <table width='85%' cellpadding='0' cellspacing='2' border='1'>
975
- <tr bgcolor='#efefef'><td valign='middle'>
976
- <?php echo LM_ACTIVE;?> <input type=checkbox value=1 name='mem' <?php if($_CONFIG[mem]==1) echo 'checked';?>>
977
- </td><td align='left'>
978
 
979
- <table width='100%' cellpadding='0' cellspacing='0'>
980
- <tr><td>
981
- <?php echo LM_TAR_PATH;?> <br /><input size='50' type=text name=tarpath value='<?php echo $_CONFIG[tarpath]?>'><br />
982
- <?php echo LM_TAR_PATH_SUB;?>
983
- </td></tr>
 
 
 
984
 
985
- </table>
 
986
 
987
- </td></tr>
988
 
989
- <tr bgcolor='#dedede'><td>
990
- <?php echo LM_ACTIVE?> <input type=checkbox value=1 name='sql_mem' <?php if($_CONFIG[sql_mem]==1) echo 'checked';?>>
991
- </td><td align='left'>
992
- <?php echo LM_MYSQLDUMP_PATH;?> <br /><input type=text size='50' name='sqldump' value='<?php echo $_CONFIG[sqldump]?>'>
993
 
994
- </td></tr>
995
- </table>
996
 
997
- <?php echo LM_CONFIG_MEM_SUB?>
 
998
 
999
- </td>
1000
- </tr>
 
1001
 
1002
- <tr>
1003
- <th colspan='2'>
1004
- <?php echo "License Management"?>
1005
- </th>
1006
- </tr>
1007
- <tr>
1008
- <td>
1009
- <?php echo "License Code - optional*
1010
- <br />*only for support purposes"?>
1011
- </td>
1012
- <td>
1013
- <textarea cols=40 rows='7' name='license_code' ><?php echo $_CONFIG[license_code]?></textarea>
1014
- <br />Copy/Paste the license code from <a target='_blank' href='http://www.xcloner.com/'>XCloner.com Members area</a>
1015
- </td>
1016
- </tr>
1017
 
 
 
 
 
 
 
1018
 
1019
- </table>
1020
- <?php
1021
- $tabs->endTab();
1022
- $tabs->startTab(LM_TAB_MYSQL,"config-mysql-tab");
1023
- ?>
1024
- <table class='adminform'>
1025
 
1026
-
1027
- <tr>
1028
- <th colspan='2'>
1029
- <?php echo LM_CONFIG_MYSQL?>
1030
- </th>
1031
- </tr>
1032
-
1033
- <tr>
1034
- <td>
1035
- <?php echo LM_CONFIG_MYSQLH?>
1036
- </td>
1037
- <td>
1038
- <input type=text size=50 name='mysql_host' value='<?php echo $_CONFIG[mysql_host]?>'>
1039
- <br /><?php echo LM_CONFIG_MYSQLH_SUB?>
1040
- </td>
1041
- </tr>
1042
-
1043
- <tr>
1044
- <td>
1045
- <?php echo LM_CONFIG_MYSQLU?>
1046
- </td>
1047
- <td>
1048
- <input type=text size=50 name='mysql_user' value='<?php echo $_CONFIG[mysql_user]?>'>
1049
- <br /><?php echo LM_CONFIG_MYSQLU_SUB?>
1050
- </td>
1051
- </tr>
1052
-
1053
- <tr>
1054
- <td>
1055
- <?php echo LM_CONFIG_MYSQLP?>
1056
- </td>
1057
- <td>
1058
- <input type=text size=50 name='mysql_pass' value='<?php echo $_CONFIG[mysql_pass]?>'>
1059
- <br /><?php echo LM_CONFIG_MYSQLP_SUB?>
1060
- </td>
1061
- </tr>
1062
-
1063
- <tr>
1064
- <td>
1065
- <?php echo LM_CONFIG_MYSQLD?>
1066
- </td>
1067
- <td>
1068
- <input type=text size=50 name='mysql_database' value='<?php echo $_CONFIG[mysql_database]?>'>
1069
- <br /><?php echo LM_CONFIG_MYSQLD_SUB?>
1070
- </td>
1071
- </tr>
1072
-
1073
- <tr>
1074
- <td width='200'>
1075
- <?php echo LM_CONFIG_SYSTEM_MDATABASES?>
1076
- </td>
1077
- <td>
1078
- <?php echo LM_YES?> <input type=radio name='system_mdatabases' value='0' <?php if(abs($_CONFIG[system_mdatabases])==0) echo "checked";?>>
1079
- <?php echo LM_NO?> <input type=radio name='system_mdatabases' value='1' <?php if(abs($_CONFIG[system_mdatabases])==1) echo "checked";?>>
1080
- <br>
1081
-
1082
- <br /><?php echo LM_CONFIG_SYSTEM_MDATABASES_SUB?>
1083
- </td>
1084
- </tr>
1085
-
1086
- </table>
1087
- <?php
1088
- $tabs->endTab();
1089
- $tabs->startTab(LM_TAB_AUTH,"config-mysql-tab");
1090
- ?>
1091
- <table class='adminform'>
1092
-
1093
-
1094
- <tr>
1095
- <th colspan='2'>
1096
- <?php echo LM_CONFIG_AUTH?>
1097
- </th>
1098
- </tr>
1099
-
1100
- <tr>
1101
- <td>
1102
- <?php echo LM_CONFIG_AUTH_USER?>
1103
- </td>
1104
- <td>
1105
- <input type=text size=30 name='jcuser' value='<?php echo $_CONFIG[jcuser]?>'>
1106
- <br /><?php echo LM_CONFIG_AUTH_USER_SUB?>
1107
- </td>
1108
- </tr>
1109
-
1110
- <tr>
1111
- <td>
1112
- <?php echo LM_CONFIG_AUTH_PASS?>
1113
- </td>
1114
- <td>
1115
- <input type=text size=30 name='jcpass' value=''> <?php if($_CONFIG['jcpass'] == md5('admin')) echo "<font color=red>please change the default password 'admin'</font>"?>
1116
- <br /><?php echo LM_CONFIG_AUTH_PASS_SUB?>
1117
- </td>
1118
- </tr>
1119
-
1120
-
1121
- </table>
1122
- <?php
1123
- $tabs->endTab();
1124
- $tabs->startTab(LM_TAB_SYSTEM,"config-system-tab");
1125
- ?>
1126
- <table class='adminform'>
1127
- <tr>
1128
- <th colspan='2'>
1129
- <?php echo LM_CONFIG_DISPLAY?>
1130
- </th>
1131
- </tr>
1132
-
1133
- <tr>
1134
- <td width='200'>
1135
- <?php echo LM_CONFIG_SYSTEM_LANG?>
1136
- </td>
1137
- <td>
1138
- <select name='select_lang'>
1139
- <option value=''><?php echo LM_CONFIG_SYSTEM_LANG_DEFAULT;?></option>
1140
- <?php
1141
- foreach($lang_array as $value)
1142
- if($_CONFIG['select_lang'] == $value)
1143
- echo "<option value='$value' selected>$value</option>\n";
1144
- else
1145
- echo "<option value='$value'>$value</option>\n";
1146
- ?>
1147
- </select>
1148
- <br>
1149
- <br /><?php echo LM_CONFIG_SYSTEM_LANG_SUB?>
1150
- </td>
1151
- </tr>
1152
-
1153
-
1154
- <!--<tr>
1155
- <td width='200'>
1156
- <?php echo LM_CONFIG_SYSTEM_DOWNLOAD?>
1157
- </td>
1158
- <td>
1159
- <?php echo LM_YES?> <input type=radio name='system_dlink' value='1' <?php if(abs($_CONFIG[system_dlink])==1) echo "checked";?>>
1160
- <?php echo LM_NO?> <input type=radio name='system_dlink' value='0' <?php if(abs($_CONFIG[system_dlink])==0) echo "checked";?>>
1161
- <br>
1162
-
1163
- <br /><?php echo LM_CONFIG_SYSTEM_DOWNLOAD_SUB?>
1164
- </td>
1165
- </tr>-->
1166
-
1167
-
1168
- <tr>
1169
- <th colspan='2'>
1170
- <?php echo LM_CONFIG_SYSTEM?>
1171
- </th>
1172
- </tr>
1173
-
1174
- <tr>
1175
- <td width='200'>
1176
- <?php echo LM_CONFIG_SYSTEM_FTP?>
1177
- </td>
1178
- <td>
1179
- Direct <input type=radio name='system_ftptransfer' value='0' <?php if(abs($_CONFIG[system_ftptransfer])==0) echo "checked";?>>
1180
- Passive <input type=radio name='system_ftptransfer' value='1' <?php if(abs($_CONFIG[system_ftptransfer])==1) echo "checked";?>> <br>
1181
-
1182
- <br /><?php echo LM_CONFIG_SYSTEM_FTP_SUB?>
1183
- </td>
1184
- </tr>
1185
- <tr>
1186
- <td>
1187
- <?php echo LM_FTP_TRANSFER_MORE?>
1188
- </td>
1189
- <td>
1190
- Normal <input type=radio size=50 value=0 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==0) echo 'checked';?>>
1191
- Secure <input type=radio size=50 value=1 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==1) echo 'checked';?>>
1192
- </td>
1193
- </tr>
1194
-
1195
- <th colspan='2'>
1196
- <?php echo LM_CONFIG_MANUAL?>
1197
- </th>
1198
- </tr>
1199
-
1200
- <tr>
1201
- <td>
1202
- <?php echo LM_CONFIG_MANUAL_FILES;?>
1203
- </td>
1204
- <td>
1205
- <input type=text size=20 name='backup_refresh_number' value=<?php echo $_CONFIG[backup_refresh_number];?>>
1206
-
1207
- </td>
1208
- </tr>
1209
-
1210
- <tr>
1211
- <td>
1212
- <?php echo LM_CONFIG_MANUAL_REFRESH;?>
1213
- </td>
1214
- <td>
1215
- <input type=text size=20 name='refresh_time' value=<?php echo $_CONFIG[refresh_time];?>> seconds
1216
-
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();
1243
- $tabs->startTab(LM_TAB_CRON,"config-cron-tab");
1244
- ?>
1245
- <table class='adminform'>
1246
- <tr>
1247
- <th colspan='2'>
1248
- <?php echo LM_CRON_SETTINGS_M?> - all configs are saved in configs/
1249
- </th>
1250
- </tr>
1251
-
1252
- <tr>
1253
- <td>
1254
- <?php echo LM_CRON_MCRON?>
1255
- </td>
1256
- <td>
1257
- <input type=text size=30 value="<?php echo $_CONFIG[cron_save_as]?>" name='cron_save_as' >.php <br />
1258
- <?php echo LM_CRON_MCRON_SUB?>
1259
- </td>
1260
- </tr>
1261
-
1262
- <tr>
1263
- <td>
1264
- <?php echo LM_CRON_MCRON_AVAIL?>
1265
- </td>
1266
- <td>
1267
- <?php
1268
-
1269
- if ($handle = @opendir($_CONFIG['multiple_config_dir'])) {
1270
-
1271
- while (false !== ($file = readdir($handle))) {
1272
- if( ($file!=".") && ($file!="..") &&($file!="") && (strstr($file, '.php'))){
1273
- $fcron = "cloner.cron.php?config=$file";
1274
-
1275
- echo "<b>$fcron</b>";
1276
-
1277
- echo " - <a href='$fcron' target='_blank'>execute cron</a>";
1278
-
1279
- echo " | <a href='index2.php?option=com_cloner&task=cron_delete&fconfig=$file'>delete config</a>";
1280
-
1281
- echo "\n<br />";
1282
- }
1283
- }
1284
-
1285
- closedir($handle);
1286
- }
1287
- ?>
1288
- </td>
1289
- </tr>
1290
-
1291
- <tr>
1292
- <th colspan='2'>
1293
- <?php echo LM_CRON_SETTINGS?>
1294
- </th>
1295
- </tr>
1296
-
1297
- <tr>
1298
- <td>
1299
- <?php echo LM_CRON_SEMAIL?>
1300
- </td>
1301
- <td>
1302
- <input type=text size=30 value="<?php echo $_CONFIG[cron_logemail]?>" name='cron_logemail' > <br />
1303
- <?php echo LM_CRON_SEMAIL_SUB?>
1304
- </td>
1305
- </tr>
1306
-
1307
- <tr>
1308
- <td width='200'>
1309
- <?php echo LM_CRON_MODE?>
1310
- </td>
1311
- <td>
1312
- <input type=radio size=50 value=0 name='cron_send' <?php if($_CONFIG[cron_send]==0) echo 'checked';?>>
1313
- <?php echo LM_CONFIG_CRON_LOCAL?><br />
1314
- <input type=radio size=50 value=1 name='cron_send' <?php if($_CONFIG[cron_send]==1) echo 'checked';?>>
1315
- <?php echo LM_CONFIG_CRON_REMOTE?><br />
1316
- <input type=radio size=50 value=2 name='cron_send' <?php if($_CONFIG[cron_send]==2) echo 'checked';?>>
1317
- <?php echo LM_CONFIG_CRON_EMAIL?> <br />
1318
- <?php echo LM_CRON_MODE_INFO?>
1319
- </td>
1320
- </tr>
1321
-
1322
-
1323
- <tr>
1324
- <td>
1325
- <?php echo LM_CRON_TYPE?>
1326
- </td>
1327
- <td>
1328
- <input type=radio size=50 value=0 name='cron_btype' <?php if($_CONFIG[cron_btype]==0) echo 'checked';?>>
1329
- <?php echo LM_CONFIG_CRON_FULL?> <br />
1330
- <input type=radio size=50 value=1 name='cron_btype' <?php if($_CONFIG[cron_btype]==1) echo 'checked';?>>
1331
- <?php echo LM_CONFIG_CRON_FILES?><br />
1332
- <input type=radio size=50 value=2 name='cron_btype' <?php if($_CONFIG[cron_btype]==2) echo 'checked';?>>
1333
- <?php echo LM_CONFIG_CRON_DATABASE?> <br />
1334
- <?php echo LM_CRON_TYPE_INFO?>
1335
- </td>
1336
- </tr>
1337
-
1338
- <tr>
1339
- <td>
1340
- <?php echo LM_CRON_BNAME?>
1341
- </td>
1342
- <td>
1343
- <input type=text size=50 value="<?php echo $_CONFIG[cron_bname]?>" name='cron_bname' > <br />
1344
- <?php echo LM_CRON_BNAME_SUB?>
1345
- </td>
1346
- </tr>
1347
-
1348
-
1349
- <tr>
1350
- <td>
1351
- <?php echo LM_CRON_IP?>
1352
- </td>
1353
- <td>
1354
- <textarea type=text size=50 name='cron_ip' cols='30' rows='5'><?php echo $_CONFIG[cron_ip]?></textarea> <br />
1355
- <?php echo LM_CRON_IP_SUB?>
1356
- </td>
1357
- </tr>
1358
-
1359
- </table>
1360
- <table class='adminform'>
1361
- <tr>
1362
- <th colspan='2'>
1363
- <?php echo LM_CRON_FTP_DETAILS?>
1364
- </th>
1365
- </tr>
1366
- </tr>
1367
- <tr>
1368
- <td width='200'>
1369
- <?php echo LM_CRON_FTP_SERVER?>
1370
- </td>
1371
- <td>
1372
- <input type=text size=50 name='cron_ftp_server' value='<?php echo $_CONFIG[cron_ftp_server]?>'>
1373
- </td>
1374
- </tr>
1375
- <tr>
1376
- <td>
1377
- <?php echo LM_CRON_FTP_USER?>
1378
- </td>
1379
- <td>
1380
- <input type=text size=50 name='cron_ftp_user' value='<?php echo $_CONFIG[cron_ftp_user]?>'>
1381
- </td>
1382
- </tr>
1383
- <tr>
1384
- <td>
1385
- <?php echo LM_CRON_FTP_PASS?>
1386
- </td>
1387
- <td>
1388
- <input type=text size=50 name='cron_ftp_pass' value='<?php echo $_CONFIG[cron_ftp_pass]?>'>
1389
- </td>
1390
- </tr>
1391
- <tr>
1392
- <td>
1393
- <?php echo LM_CRON_FTP_PATH?>
1394
- </td>
1395
- <td>
1396
- <input type=text size=50 name='cron_ftp_path' value='<?php echo $_CONFIG[cron_ftp_path]?>'>
1397
- </td>
1398
- </tr>
1399
- <tr>
1400
- <td>
1401
- <?php echo LM_CRON_FTP_DELB?>
1402
- </td>
1403
- <td>
1404
- <input type=checkbox name='cron_ftp_delb' <?php if($_CONFIG[cron_ftp_delb]==1) echo "checked";?> value='1'>
1405
- </td>
1406
- </tr>
1407
- </table>
1408
-
1409
- <table class='adminform'>
1410
-
1411
- <tr><th colspan=2>
1412
- <?php echo LM_AMAZON_S3?>
1413
- </th></tr>
1414
- <tr>
1415
- <td width='200'>
1416
- <?php echo LM_AMAZON_S3_ACTIVATE?>
1417
- </td>
1418
- <td>
1419
- <input type=checkbox name='cron_amazon_active' <?php if($_CONFIG[cron_amazon_active]==1) echo "checked";?> value='1'>
1420
- </td>
1421
- </tr>
1422
-
1423
- <tr>
1424
- <td width='200'>
1425
- <?php echo LM_AMAZON_S3_AWSACCESSKEY;?>
1426
- </td>
1427
- <td>
1428
- <input type=text size=50 name='cron_amazon_awsAccessKey' value="<?php echo $_CONFIG['cron_amazon_awsAccessKey'];?>">
1429
- </td>
1430
- </tr>
1431
-
1432
- <tr>
1433
- <td width='200'>
1434
- <?php echo LM_AMAZON_S3_AWSSECRETKEY;?>
1435
- </td>
1436
- <td>
1437
- <input type=text size=50 name='cron_amazon_awsSecretKey' value="<?php echo $_CONFIG['cron_amazon_awsSecretKey'];?>">
1438
- </td>
1439
- </tr>
1440
-
1441
- <tr>
1442
- <td width='200'>
1443
- <?php echo LM_AMAZON_S3_BUCKET;?>
1444
- </td>
1445
- <td>
1446
- <input type=text size=50 name='cron_amazon_bucket' value="<?php echo $_CONFIG['cron_amazon_bucket'];?>">
1447
- </td>
1448
- </tr>
1449
-
1450
- <tr>
1451
- <td width='200'>
1452
- <?php echo LM_AMAZON_S3_DIRNAME;?>
1453
- </td>
1454
- <td>
1455
- <input type=text size=50 name='cron_amazon_dirname' value="<?php echo $_CONFIG['cron_amazon_dirname'];?>">
1456
- </td>
1457
- </tr>
1458
-
1459
- <td>
1460
-
1461
- </td>
1462
- </tr>
1463
-
1464
- </table>
1465
-
1466
-
1467
- <table class='adminform'>
1468
- <tr>
1469
- <th colspan='2'>
1470
- <?php echo LM_CRON_EMAIL_DETAILS?>
1471
- </th>
1472
- </tr>
1473
- </tr>
1474
- <tr>
1475
- <td width='200'>
1476
- <?php echo LM_CRON_EMAIL_ACCOUNT?>
1477
- </td>
1478
- <td>
1479
- <input type=text size=50 name='cron_email_address' value='<?php echo $_CONFIG[cron_email_address]?>'>
1480
- </td>
1481
- </tr>
1482
-
1483
-
1484
- </table>
1485
-
1486
- <table class='adminform'>
1487
- <tr>
1488
- <th colspan='2'>
1489
- <?php echo LM_CRON_MYSQL_DETAILS?>
1490
- </th>
1491
- </tr>
1492
- </tr>
1493
- <tr bgcolor='#ffffff'>
1494
- <td width='200'>
1495
- <?php echo LM_CRON_MYSQL_DROP?>
1496
- </td>
1497
- <td>
1498
- <input type=checkbox name='cron_sql_drop' value='1' <?php if($_CONFIG[cron_sql_drop]) echo "checked";?> >
1499
- </td>
1500
- </tr>
1501
-
1502
- <?php
1503
- if((abs($_CONFIG[system_mdatabases])==0) && ($_CONFIG[enable_db_backup]==1)){
1504
- ?>
1505
- <tr><td valign='top'>
1506
- <?php echo LM_DATABASE_INCLUDE_DATABASES?>
1507
- </td><td>
1508
- <select name='databases_incl[]' MULTIPLE SIZE=5>
1509
- <?php
1510
-
1511
- $curent_dbs = explode(",", $_CONFIG['databases_incl_list']);
1512
-
1513
- $query = @mysql_query("SHOW databases");
1514
- while($row = @mysql_fetch_array($query)){
1515
-
1516
- $table = $row[0];
1517
-
1518
- if($table != $_CONFIG['mysql_database'])
1519
-
1520
- if(in_array($table, $curent_dbs)){
1521
-
1522
- echo "<option value='".$table."' selected>$table</option>";
1523
-
1524
- }else{
1525
-
1526
- echo "<option value='".$table."'>$table</option>";
1527
-
1528
- }
1529
- }
1530
- ?>
1531
- </select><br />
1532
- <?php echo LM_DATABASE_INCLUDE_DATABASES_SUB?>
1533
- </td></tr>
1534
- <?php
1535
- }
1536
- ?>
1537
-
1538
- <tr><th colspan=2>
1539
- <?php echo LM_CRON_DELETE_FILES?>
1540
- </th></tr>
1541
- <tr>
1542
- <td width='200'>
1543
- <?php echo LM_CRON_DELETE_FILES_SUB_ACTIVE?>
1544
- </td>
1545
- <td>
1546
- <input type=checkbox name='cron_file_delete_act' <?php if ($_CONFIG['cron_file_delete_act'] == 1) echo 'checked';?> value='1'>
1547
- </td>
1548
- </tr>
1549
- <tr>
1550
- <td width='200'>
1551
- <?php echo LM_CRON_DELETE_FILES_SUB?>
1552
- </td>
1553
- <td>
1554
- <input size=5 name='cron_file_delete' value='<?php echo $_CONFIG[cron_file_delete]?>'> days:
1555
- </td>
1556
- </tr>
1557
- </table>
1558
-
1559
- <table class='adminform'>
1560
- <tr>
1561
- <th colspan='2'>
1562
- <?php echo LM_CRON_EXCLUDE?>
1563
- </th>
1564
- </tr>
1565
- </tr>
1566
- <tr>
1567
- <td width='200'>
1568
- <?php echo LM_CRON_EXCLUDE_DIR?>
1569
- </td>
1570
- <td>
1571
- <textarea cols=50 rows=5 name='cron_exclude'><?php echo $_CONFIG[cron_exclude]?></textarea>
1572
- </td>
1573
- </tr>
1574
-
1575
- </table>
1576
- <?php
1577
- $tabs->endTab();
1578
- $tabs->startTab(LM_TAB_INFO,"config-info-tab");
1579
- ?>
1580
- <table class='adminform'>
1581
- <tr>
1582
- <th colspan='2'>
1583
- <?php echo LM_CONFIG_INFO_PHP?>
1584
- </th>
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>
1607
- <td>
1608
- <b><?php $val = (ini_get('safe_mode') != "")? ini_get('safe_mode'):"Off";
1609
- echo HTML_cloner::get_color($val, 'On');
1610
- ?></b>
1611
- <br />
1612
- <?php echo LM_CONFIG_INFO_SAFEMODE?>
1613
- </td>
1614
- </tr>
1615
-
1616
- <tr>
1617
- <td width='200'>
1618
- <?php echo LM_CONFIG_INFO_T_MTIME?>
1619
- </td>
1620
- <td>
1621
- <b><?php echo (ini_get('max_execution_time') != "")? ini_get('max_execution_time'):"no value";
1622
-
1623
- ?></b>
1624
- <br />
1625
- <?php echo LM_CONFIG_INFO_TIME?>
1626
- </td>
1627
- </tr>
1628
-
1629
- <tr>
1630
- <td width='200'>
1631
- <?php echo LM_CONFIG_INFO_T_MEML?>
1632
- </td>
1633
- <td>
1634
- <b><?php echo (ini_get('memory_limit') != "")? ini_get('memory_limit'):"no value";?> </b>
1635
- <br />
1636
- <?php echo LM_CONFIG_INFO_MEMORY?>
1637
- </td>
1638
- </tr>
1639
-
1640
- <tr>
1641
- <td width='200'>
1642
- <?php echo LM_CONFIG_INFO_T_BDIR?>
1643
- </td>
1644
- <td>
1645
- <b><?php $val = (ini_get('open_basedir') != "")? ini_get('open_basedir'):"no value";
1646
- echo HTML_cloner::get_color($val, '/');
1647
- ?> </b>
1648
- <br />
1649
- <?php echo LM_CONFIG_INFO_BASEDIR?>
1650
- </td>
1651
- </tr>
1652
-
1653
- <tr>
1654
- <td width='200'>
1655
- <?php echo LM_CONFIG_INFO_T_EXEC?>
1656
- </td>
1657
- <td>
1658
- <b><?php
1659
-
1660
- $out = "";
1661
- if(function_exists("exec")){
1662
-
1663
- $out = @exec("ls -al");
1664
- }
1665
-
1666
- $val = ($out != "")? "ENABLED":"<font color='red'>DISABLED</font>";
1667
- echo HTML_cloner::get_color($val, 'DISABLED');
1668
- ?> </b>
1669
- <br />
1670
- <?php echo LM_CONFIG_INFO_EXEC?>
1671
- </td>
1672
- </tr>
1673
-
1674
- <tr>
1675
- <th colspan='2'>
1676
- <?php echo LM_CONFIG_INFO_PATHS?>
1677
- </td>
1678
- <td>
1679
- </tr>
1680
-
1681
- <tr>
1682
- <td width='200'>
1683
- <?php echo LM_CONFIG_INFO_ROOT_BPATH_TMP?>
1684
- </td>
1685
- <td>
1686
- <b><?php $tmp_dir = realpath($_CONFIG['backup_path']."/administrator/backups");
1687
- echo (@is_writeable( $tmp_dir ))? $tmp_dir . " is <font color=green>writeable</font>":$tmp_dir. " <font color=red>incorrect or unreadable</font>";?></b>
1688
- <br />
1689
- <?php echo LM_CONFIG_INFO_ROOT_PATH_TMP_SUB?>
1690
- </td>
1691
- </tr>
1692
-
1693
- <tr>
1694
- <td width='200'>
1695
- <?php echo LM_CONFIG_INFO_ROOT_BPATH?>
1696
- </td>
1697
- <td>
1698
- <b><?php echo (@is_readable($_CONFIG['backup_path']) )? $_CONFIG['backup_path'] . " is <font color=green>readable</font>":$_CONFIG['backup_path']. " <font color=red>incorrect or unreadable</font>";?></b>
1699
- <br />
1700
- <?php echo LM_CONFIG_INFO_ROOT_PATH_SUB?>
1701
- </td>
1702
- </tr>
1703
-
1704
-
1705
- <tr>
1706
- <td width='200'>
1707
- <?php echo LM_CONFIG_INFO_T_BPATH?>
1708
- </td>
1709
- <td>
1710
- <b><?php echo (@is_writeable($_CONFIG['clonerPath']) )? $_CONFIG['clonerPath'] . " is <font color=green>writeable</font>":$_CONFIG['clonerPath']. " <font color=red>unwriteable</font>";?></b>
1711
- <br />
1712
- <?php echo LM_CONFIG_INFO_BPATH?>
1713
- </td>
1714
- </tr>
1715
-
1716
-
1717
- <tr>
1718
- <td width='200'>
1719
- <?php echo LM_CONFIG_INFO_T_TAR?>
1720
- </td>
1721
- <td>
1722
- <b><?php
1723
- if(function_exists('exec')){
1724
- $info_tar_path = explode(" ", @exec("whereis tar"));
1725
- }
1726
- echo ($info_tar_path['1'] != "")? $info_tar_path['1']:"unable to determine";
1727
- ?> </b>
1728
- <br />
1729
- <?php echo LM_CONFIG_INFO_TAR?>
1730
- </td>
1731
- </tr>
1732
-
1733
-
1734
- <tr>
1735
- <td width='200'>
1736
- <?php echo LM_CONFIG_INFO_T_MSQL?>
1737
- </td>
1738
- <td>
1739
- <b><?php
1740
- if(function_exists('exec')){
1741
- $info_msql_path = explode(" ", @exec("whereis mysqldump"));
1742
- }
1743
- echo ($info_msql_path['1'] != "")? $info_msql_path['1']:"unable to determine";
1744
- ?> </b>
1745
- <br />
1746
- <?php echo LM_CONFIG_INFO_MSQL?>
1747
- </td>
1748
- </tr>
1749
-
1750
-
1751
- </table>
1752
- <?php
1753
- $tabs->endTab();
1754
- $tabs->endPane();
1755
- ?>
1756
- <input type="hidden" name="option" value="com_cloner" />
1757
- <input type="hidden" name="task" value="config" />
1758
- <input type="hidden" name='action' value='save'>
1759
- </form>
1760
-
1761
- <?php
1762
- }
1763
-
1764
- function get_color($val, $comp){
1765
-
1766
- if(!stristr($val, $comp))
1767
- echo "<span style='color:green'>$val</span>";
1768
- else
1769
- echo "<span style='color:red'>$val</span>";
1770
-
1771
- }
1772
-
1773
- function TransferForm($option, $files){
1774
- global $baDownloadPath, $mosConfig_absolute_path, $clonerPath, $task;
1775
-
1776
- ?>
1777
- <form action="index2.php" method="GET" name="adminForm">
1778
- <script language="javascript" type="text/javascript">
1779
-
1780
-
1781
- function submitbutton(pressbutton) {
1782
- var form = document.adminForm;
1783
- if (pressbutton == 'cancel') {
1784
- submitform( pressbutton );
1785
- return;
1786
- }
1787
-
1788
- submitform( pressbutton );
1789
-
1790
- }
1791
 
1792
  function gotocontact( id ) {
1793
  var form = document.adminForm;
@@ -1877,23 +2272,48 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1877
  <form action="index2.php" method="post" name="adminForm">
1878
  <?php
1879
  $tabs = new mosTabs(1);
1880
- #$tabs->startPane("BGeneratePane");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1881
  if($_CONFIG['enable_db_backup']){
1882
  $tabs->startTab(LM_TAB_G_DATABASE,"users-databse-options-tab");
1883
  ?>
1884
 
1885
-
1886
  <table class="adminform">
1887
- <tr>
1888
  <th colspan=2>
1889
- <b><?php echo LM_DATABASE_ARCHIVE; ?></b>
1890
  </th>
1891
- </tr>
1892
- <tr>
1893
- <td><input type="checkbox" id="dbbackup" name="dbbackup" checked value="1" />&nbsp;<?php echo LM_CONFIRM_DATABASE; ?></td>
1894
- </tr>
1895
  <tr>
1896
- <td><input type="checkbox" id="dbbackup_drop" name="dbbackup_drop" value="1" />&nbsp;<?php echo "Add DROP SYNTAX"; ?></td>
 
 
 
 
 
1897
  </tr>
1898
  <tr>
1899
  <td><?php echo "Mysql Compatibility"; ?> &nbsp;
@@ -1908,7 +2328,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1908
  <?php echo LM_DATABASE_EXCLUDE_TABLES?>
1909
  </th></tr>
1910
  <tr><td>
1911
- <?php echo LM_DATABASE_CURRENT?> <b><?php echo $mosConfig_db;?></b><br />
1912
  <select name='excltables[]' MULTIPLE SIZE=15>
1913
  <?php
1914
 
@@ -1937,7 +2357,8 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1937
 
1938
  while($row = mysql_fetch_array($query)){
1939
 
1940
- echo "<option value='".$row[0]."'>$row[0]</option>";
 
1941
 
1942
  }
1943
 
@@ -1951,6 +2372,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1951
  ?>
1952
 
1953
  </table>
 
1954
  <?php
1955
  $tabs->endTab();
1956
  }
@@ -1964,7 +2386,7 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1964
  </tr>
1965
  <tr>
1966
  <td>
1967
- <input type=text name='bname' value='' size=40><br/>
1968
  <?php echo LM_BACKUP_NAME_SUB?>
1969
  </td>
1970
  </tr>
@@ -1998,6 +2420,15 @@ function showBackups( &$files, &$sizes, $path, $option ) {
1998
  ?>
1999
 
2000
  </table>
 
 
 
 
 
 
 
 
 
2001
  <?php
2002
  $tabs->endTab();
2003
  $tabs->endPane();
@@ -2078,17 +2509,23 @@ function showBackups( &$files, &$sizes, $path, $option ) {
2078
 
2079
  function showHelp( $option ) {
2080
  ?>
2081
-
2082
- <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
2083
- <tr><th>
2084
- <?php echo LM_CREDIT_TOP?>
2085
- </th></tr>
2086
- <tr>
2087
- <td>
2088
- <?php echo LM_CLONER_ABOUT?>
2089
- </td>
2090
- </tr>
2091
- </table>
 
 
 
 
 
 
2092
  <form action="index2.php" name="adminForm" method="post">
2093
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2094
  <input type="hidden" name="task" value=""/>
@@ -2103,17 +2540,26 @@ function showBackups( &$files, &$sizes, $path, $option ) {
2103
 
2104
  ?>
2105
 
2106
-
2107
- <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
2108
- <tr><th>
2109
- <?php echo LM_RESTORE_TOP?>
2110
- </th></tr>
2111
- <tr>
2112
- <td>
2113
- <?php echo LM_CLONER_RESTORE?>
2114
- </td>
2115
- </tr>
2116
- </table>
 
 
 
 
 
 
 
 
 
2117
  <form action="index2.php" name="adminForm" method="post">
2118
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2119
  <input type="hidden" name="task" value=""/>
@@ -2126,18 +2572,26 @@ function showBackups( &$files, &$sizes, $path, $option ) {
2126
  // ----------------------------------------------------------
2127
 
2128
  ?>
2129
-
2130
- <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
2131
- <tr><th>
2132
- <?php echo LM_CREDIT_TOP?>
2133
- </th></tr>
2134
- <tr>
2135
- <td>
2136
-
2137
- <?echo LM_CLONER_CREDITS?>
2138
- </td>
2139
- </tr>
2140
- </table>
 
 
 
 
 
 
 
 
2141
  <form action="index2.php" name="adminForm" method="post">
2142
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2143
  <input type="hidden" name="task" value=""/>
31
 
32
  function mosTabs($int){
33
 
34
+ echo "<div id=\"tabs\">";
35
 
36
  }
37
 
38
  function startTab($name, $class){
39
 
40
+ echo "<div id=\"tabs-$class\"><p>";
41
 
42
 
43
  }
44
 
45
  function endTab(){
46
 
47
+ echo "</pp></div>";
48
 
49
  }
50
 
63
 
64
  function header(){
65
 
66
+ global $mosConfig_live_site, $task;
67
+ $excl_tasks = array("view", "config","");
68
 
69
+ /*if(!in_array($_REQUEST['task'], $excl_tasks)){
70
+ $seconds_to_cache = 3600;
71
+ $ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
72
+ @header("Expires: $ts");
73
+ @header("Pragma: cache");
74
+ @header("Cache-Control: maxage=$seconds_to_cache");
75
+ }*/
76
  ?>
77
  <html lang="en">
78
  <head>
80
  <title>XCloner Backup and Restore</title>
81
  <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
82
 
 
83
  <link rel="styleSheet" href="css/dtree.css" type="text/css" />
84
  <link rel="styleSheet" href="css/main.css" type="text/css" />
85
+ <link rel="styleSheet" href="css/start/jquery-ui-1.8.9.custom.css" type="text/css" />
86
 
 
87
  <script type="text/javascript" src="javascript/dtree.js"></script>
88
  <script type="text/javascript" src="javascript/main.js"></script>
89
  <script type="text/javascript" src="javascript/jquery-1.4.4.min.js"></script>
90
+ <script type="text/javascript" src="javascript/jquery-ui-1.8.9.custom.min.js"></script>
91
  <script type="text/javascript">
92
 
93
  /* Optional: Temporarily hide the "tabber" class so it does not "flash"
107
 
108
  <tr><td align='center'>
109
 
110
+ <div class="status" >
111
+ <table width='100%' bgcolor='white' class="header">
112
  <tr>
113
+ <td width='auto'>
114
+ <table><tr><td>
115
+ <img src="images/backup.png" align="middle">&nbsp;
116
+ </td><td>
117
+ <a href="index.php"><h2><?php echo LM_COM_TITLE.$_SERVER['HTTP_HOST']; ?></h2>
118
+ <h1>Backup and Restore</h1>
119
+ </a>
120
+ </td></tr>
121
+ </table>
122
+ </td>
123
+ <td align="right">
124
+ <div id="toolbar" style="display:none">
125
+ <?php
126
+ # Generating the buttons...
127
+ require_once( "toolbar.cloner.php" );
128
+ ?>
129
+ </div>
130
+ </td>
131
  </tr>
132
  </table>
133
+ </div>
134
+
135
  <br />
136
  <table width="100%" cellspacing='3' cellpadding="4" >
137
  <tr><td valign='top' width="160" >
206
  <?php
207
  if($_REQUEST['mosmsg']!="")
208
 
209
+ echo "<center><h2>".strip_tags($_REQUEST['mosmsg'])."</h2></center>";
210
 
211
  }
212
 
216
  </td></tr></table>
217
  <hr><br /><br />
218
  <center>
219
+ <p>Powered by <a href='http://www.xcloner.com' target='_blank'>XCloner</a>. Backup and Restore Made Easy!</p></center>
220
 
221
  </td></tr></table>
222
+ <script> $( "#toolbar" ).show(); </script>
223
+ </body></html>
224
 
225
  <?php
226
 
234
  $backupFile = $f['basename'];
235
 
236
  if (file_exists($filename)) {
237
+ echo "<h2>Initializing backup...</h2>";
238
+ echo "<h3 >Backup <b>$filename</b> created, we may continue!</h3><br />";
239
+
240
  $urlReturn = "index2.php?option=com_cloner&lines=" . $perm_lines . "&task=refresh&backup=$backupFile&excl_manual=$excl_manual";
241
 
242
  if(!$_CONFIG['refresh_mode']){
247
 
248
  }else{
249
 
250
+ echo "<script>var dbbackup = ".intval($_REQUEST['dbbackup']).";</script>";
251
+
252
  ?>
253
  <!--Start ProgressBar-->
254
  <script type="text/javascript">
257
 
258
  var globalUrl;
259
  var step = "r1";
260
+ var count = 0;
261
+ var counter = 0;
262
+ var counter_old = 0;
263
+ var completeSize = 0;
264
+ var oldBackupName = "";
265
+ var parts = 0;
266
+ var oldSize = 0;
267
 
268
  $("#progressbar").progressbar({ value: 0 });
269
 
272
  //reset state here;
273
  $("#error").show();
274
  $("#errorText").append(status+" -- "+error);
275
+ $("#errorText").append("<br /><br />JSON url: "+globalUrl);
276
  }});
277
 
278
+ function getSize(bytes, conv){
279
 
280
+ return (parseInt(bytes)/parseInt(conv)).toFixed(2);
281
+
282
+ }
283
+ function appendIcon(icon){
284
+
285
+ return '<span class="ui-icon ui-icon-'+icon+'" style="float:left;"></span>';
286
+
287
+ }
288
 
289
+ function xclonerRecurseMYSQL(url){
290
+ // create database backup
291
  globalUrl = url;
292
  step = "r1";
293
 
298
  $("#errorText").text(url);
299
  }
300
 
301
+ if(json.dumpsize && !json.endDump){
302
+ $("#mysqlProcess").append(" ("+getSize(json.dumpsize, 1024*1024)+" MB) <br />");
303
+ }
304
+
305
+ if(json.newDump){
306
+ count++;
307
+ //$("#mysqlProcess").append(appendIcon("arrowthick-1-e"));
308
+ if(json.databaseName!="")
309
+ $("#mysqlProcess").append("<b>["+json.databaseName+"]</b> <span id='db"+count+"'></span> tables ");
310
+ counter = parseInt(json.startAtLine);
311
+
312
+ }else{
313
+ $("#db"+count).text(json.startAtLine - counter);
314
+ }
315
+
316
+ if(!parseInt(json.finished)){
317
+ //get next records
318
+
319
+ $("#db"+count).text(json.startAtLine - counter);
320
+
321
+ recurseUrl = "index2.php?task=recurse_database&nohtml=1&dbbackup_comp="+json.dbbackup_comp+"&dbbackup_drop="+json.dbbackup_drop+"&startAtLine="+json.startAtLine+"&startAtRecord="+json.startAtRecord+"&dumpfile="+json.dumpfile;
322
+ xclonerRecurseMYSQL(recurseUrl);
323
+
324
+ }
325
+ else{
326
+
327
+ $("#fileSystem").show();
328
+ var recurseUrl="index2.php?task=recurse_files&mode=start&nohtml=1";
329
+ xclonerRecurseJSON(recurseUrl);
330
+
331
+ }
332
+
333
+
334
+ });
335
+ }
336
+
337
+ function xclonerRecurseJSON(url){
338
+ //scan file system
339
+ $("#result").hide();
340
+
341
+ globalUrl = url;
342
+ step = "r2";
343
+
344
+ $.getJSON(url, function(json) {
345
+
346
+ if(!json){
347
+ $("#error").show();
348
+ $("#errorText").text(url);
349
+ }
350
+
351
  if(!parseInt(json.finished)){
352
 
353
  $("#recurseStatus").text(json.tfiles);
358
  }
359
  else{
360
  var size = parseFloat(json.size)/(1024*1024);
361
+ $("#recurseStatus").text(" done! (Estimated size:"+size.toFixed(2)+"MB) in "+json.tfiles+" files");
362
  $("#result").show();
363
+
364
+ if(json.overlimit.length > 0){
365
+ $("#overlimit").show();
366
+ for(var i=0; i < json.overlimit.length; i++){
367
+
368
+ $("#overlimit").append("<span class='oversizedFile'></span>"+json.overlimit[i]+"<br />");
369
+
370
+ }
371
+ }
372
+
373
  //xclonerGetJSON("<?php echo $urlReturn;?>");
374
  returnUrl = "index2.php?option=com_cloner&lines="+json.tfiles+"&task=refresh&backup=<?php echo $backupFile; ?>&excl_manual=";
375
  xclonerGetJSON(returnUrl);
381
  }
382
 
383
  function xclonerGetJSON(url){
384
+ //create backup archive
385
  globalUrl = url;
386
+ step = "r3";
387
 
388
  $.getJSON(url, function(json) {
389
 
394
 
395
  var percent = parseInt(json.percent);
396
  $("#progressbar").progressbar({ value: percent });
397
+ $("#backupSize").text(getSize(json.backupSize, 1024*1024));
398
  $("#nFiles").text(json.startf);
399
  $("#percent").text(json.percent);
400
+ $("#backupName").text(json.backup);
401
  if(!json.finished){
402
+
403
+ if(oldBackupName != json.backup){
404
+ oldBackupName = json.backup;
405
+ completeSize = completeSize + oldSize;
406
+ parts++;
407
+ }else{
408
+ oldSize = parseInt(json.backupSize);
409
+ }
410
+
411
  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;
412
  xclonerGetJSON(url);
413
  }else{
414
 
415
+ //all done
416
+ url = "index2.php?task=cleanup&nohtml=1";
417
+ $.getJSON(url, function(json) {
418
+ });
419
+
420
  $("#complete").show();
421
  $("#nFiles").text(json.lines);
422
+ if(parts > 0){
423
+ $("#backupParts").show();
424
+ $("#backupPartsNr").text(parts);
425
  }
426
+ $("#backupFiles").text(json.lines);
427
+ $("#backupSizeComplete").append(getSize(completeSize+parseInt(json.backupSize), 1024*1024));
428
+ $("#backupNameC").text(json.backup);
429
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
430
+ $( "#dialog-message" ).dialog({
431
+ modal: true,
432
+ width: 600,
433
+ buttons: {
434
+ Close: function() {
435
+ $( this ).dialog( "close" );
436
+ }
437
+ }
438
+ });
439
+
440
+ }
441
 
442
  });
443
 
444
  }
445
 
446
+ //Main program here
447
+
448
  $("#retry").click(function(){
449
  $("#error").hide();
450
  $("#errorText").empty();
451
  if(step == "r1"){
452
+ xclonerRecurseMYSQL(globalUrl);
453
+ }
454
+ else
455
+ if(step == "r2"){
456
  xclonerRecurseJSON(globalUrl);
457
  }
458
+ else if(step == "r3"){
459
  xclonerGetJSON(globalUrl);
460
  }
461
  });
462
 
463
+ $("#result").hide();
464
+ $("#fileSystem").hide();
 
465
 
466
+ if(dbbackup){
467
+ recurseUrl = "index2.php?task=recurse_database&nohtml=1&dbbackup_comp=<?php echo $_REQUEST['dbbackup_comp']?>&dbbackup_drop=<?php echo $_REQUEST['dbbackup_drop']?>";
468
+ xclonerRecurseMYSQL(recurseUrl);
469
+ }else{
470
+ $("#fileSystem").show();
471
+ var recurseUrl="index2.php?task=recurse_files&mode=start&nohtml=1";
472
+ xclonerRecurseJSON(recurseUrl);
473
+
474
+ }
475
 
476
  });
477
  </script>
478
 
479
+ <?php
 
 
 
 
 
 
 
 
480
 
481
+ if($_REQUEST['dbbackup']){
482
+ //lets start the incremental procedure
483
+ ?>
484
 
485
+ <div id="mysqlBackup">
486
+ <h2>Database backup...</h2><br />
487
+ <div id="mysqlProcess"></div><div id="counter"></div>
488
+ </div>
 
 
489
 
490
+ <?php
491
+ }
492
+ ?>
493
+
494
+ <div id="fileSystem">
495
+ <h2>Filesystem backup...</h2>
496
+
497
+ <div id="recurseFiles">
498
+ <br /><strong>Scanning files system...</strong> <span id="recurseStatus"></span>
499
+ <br /><div id="overlimit" style="display:none"><b>Excluded oversized files:</b><br /> </div>
500
+ </div>
501
+
502
+ <div id="result">
503
+ <br /> <strong>Processing Files:</strong> <span id="percent">0</span>% (<span id="nFiles"></span> files)
504
+ <br /><br /> <strong>Backup Name: </strong><span id="backupName"></span>
505
+ <br /><br /> <strong>Backup Size: </strong><span id="backupSize"></span>MB
506
+ <br /><br /> <div id="progressbar"></div>
507
+ </div>
508
+
509
+ <div id="complete">
510
+ <br /><h2>Backup completed!</h2>
511
+
512
+ <form action="index2.php" name="adminForm" method="post">
513
+ <input type=hidden name=files[1] value='<?php echo $backupFile?>'>
514
+ <input type=hidden name=cid[1] value='<?php echo $backupFile?>'>
515
+ <input type="hidden" name="option" value="<?php echo $option; ?>"/>
516
+ <input type="hidden" name="task" value=""/>
517
+ </form>
518
+
519
+ <div id="dialog-message" title="Backup completed">
520
+ <p>
521
+ <span class="ui-icon ui-icon-arrowthick-1-e" style="float:left;"></span>
522
+ <strong>Backup name:</strong> <span id="backupNameC"></span>
523
+ </p>
524
+ <p>
525
+ <span class="ui-icon ui-icon-arrowthick-1-e" style="float:left;"></span><strong>Backup size:</strong> <span id="backupSizeComplete"></span>MB
526
+ </p>
527
+ <p>
528
+ <span class="ui-icon ui-icon-arrowthick-1-e" style="float:left;"></span><strong>Number of files:</strong> <span id="backupFiles"></span>
529
+ </p>
530
+ <p class="backupParts">
531
+ <span class="ui-icon ui-icon-arrowthick-1-e" style="float:left;"></span><strong>Backup Parts:</strong> <span id="backupPartsNr"></span>
532
+ </p>
533
+ </div>
534
+
535
+ </div>
536
  </div>
537
 
538
  <div id="error" style="display:none;">
668
  echo " ($_CONFIG[backup_start_path])";
669
  ?>
670
  </span></div>
671
+
672
  <div class="status">
673
  <span class="mtext">Backup Store Path Check: </span>
674
  <?php
683
  }
684
  echo " ($_CONFIG[backup_store_path])";
685
  ?>
686
+ </span>
687
+ </div>
688
+
689
  <div class="status">
690
  <span class="mtext">Temporary Path Check: </span>
691
  <?php
702
  ?>
703
  </span></div>
704
 
705
+ <div class="status">
706
+ <span class="mtext">Authentication: </span>
707
+ <?php
708
+
709
+ if($_CONFIG['jcpass'] == md5('admin')){
710
+ echo "<span class='error'>Change default password 'admin'"; $error = 1;
711
+ }
712
+ else{
713
+ echo "<span class='success'>OK";
714
+ }
715
+
716
+ ?>
717
+ </span></div>
718
+
719
  <div class="status">
720
  <span class="mtext">Backup Ready: </span>
721
  <?php
740
  <?php
741
  }
742
 
743
+ /*The basic Authentication form*/
744
  function Login(){
745
 
746
  ?>
747
  <center><br />
 
 
 
 
 
 
 
748
 
749
+ <script>
750
+ $(function() {
751
+ $( "button, submit:input", ".loginform" ).button({
752
+ icons: {
753
+ primary: "ui-icon-locked"
754
+ }
755
+ }).next()
756
+ .button({
757
+ icons: {
758
+ primary: "ui-icon-trash"
759
+ }
760
+ })
761
+ .click(function() {
762
+ $("#adminForm")[0].reset();
763
+ return false;
764
+ });
765
 
766
+
767
+ });
768
+ </script>
769
 
770
 
771
+ <div class="loginform">
772
+ <form action="index2.php" method="post" name="adminForm" id="adminForm">
773
+ <table class="loginForm">
774
+ <tr><td align='center'>
775
+ <table align='center' cellpadding='10' cellspacing='20'>
776
+ <tr ><td colspan='2' align='center'><b>Authentication Area:</b></td></tr>
777
+ <tr><td>Username:</td><td><input type='text' size='30' name='username'></td></tr>
778
+ <tr><td>Password:</td><td><input type='password' size='30' name='password'></td></tr>
779
+ <tr><td>&nbsp;</td><td>
780
+ <div class="loginform">
781
+ <button>Login</button>
782
+ <button>Reset</button>
783
 
784
+
785
+ </div>
786
+ </td></tr>
787
+ <tr><td colspan='2'><?php echo LM_LOGIN_TEXT;?></td></tr>
788
+ </table>
789
+ </td></tr>
790
  </table>
791
 
792
  <input type="hidden" name="option" value="com_cloner" />
793
+ <input type="hidden" name="task" value="dologin" />
794
  <input type="hidden" name="boxchecked" value="0" />
795
  <input type="hidden" name="hidemainmenu" value="0" />
796
 
803
  function Cron(){
804
  global $_CONFIG;
805
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
806
 
807
+ <script>
808
+ $(function() {
809
+ $( "#tabs" ).tabs();
810
+ });
811
+ </script>
812
 
813
+ <div id="tabs">
814
+ <ul>
815
+ <li><a href="#tabs-1"><?php echo LM_CRON_TOP?></a></li>
816
+ </ul>
817
 
818
+ <div id="tabs-1"><p>
819
+
820
+ <div class="mainText">
821
+ <?php echo LM_CRON_SUB?>
822
+ <br /><br />
823
+
824
+ <ul>
825
+ <li><input type="text" value="/usr/bin/php <?php echo dirname(__FILE__);?>/cloner.cron.php" size="150" /></li>
826
+ <li><strong>curl http://website/path_to_xcloner_folder/cloner.cron.php</strong></li>
827
+ <li><strong>wget -q http://website/path_to_xcloner_folder/cloner.cron.php</strong></li>
828
+ <li><strong>lynx -sourcehttp://website/path_to_xcloner_folder/cloner.cron.php</strong></li>
829
+ </ul>
830
+ <br /><br />
831
+
832
+ For <b>Running Multiple Crons</b>, you need to first create a custom configuration file in the XCloner Configuration -> Cron tab
833
+ and then replace "cloner.cron.php" with "cloner.cron.php?config=myconfig.php", only use 'links' or 'lynx' options to run the cronjob
834
+ <br /><br />
835
+
836
+ If you would like to use the <b>php SSH command</b> for running Multiple Crons, you will need to replace
837
+ the "cloner.cron.php" with <b>"cloner.cron.php myconfig.php"</b> in the command line.
838
+ <br /><br />
839
+
840
+ <?php echo LM_CRON_HELP?>
841
+ </div>
842
+
843
+ </p></div>
844
+ </div>
845
 
846
  <?php
847
  }
975
  global $_CONFIG;
976
 
977
  ?>
978
+ <script>
979
+ $(function() {
980
+ $( "#toggle" ).button();
981
+ $( "#toggle" ).click(function() { checkJAll(<?php echo count( $lang_arr ); ?>, "toggle", "cb"); });
982
+ $( "#checklist" ).buttonset();
983
+ });
984
+ </script>
985
 
986
+ <form action="index2.php" method="post" name="adminForm">
987
+ <div id="checklist">
988
  <table class="adminlist">
989
  <tr>
990
+ <th align="center">
991
+ <input id="toggle" type="checkbox" name="toggle" value="" /><label for="toggle">Check All</label>
 
992
  </th>
993
  <th align="left">
994
  <?php echo LM_LANG_NAME ?>
995
  </th>
996
  </tr>
 
997
 
998
+ <?php
999
  for($i=0; $i<sizeof($lang_arr); $i++){
1000
 
1001
  ?>
1002
 
1003
  <tr>
1004
+ <!--<td width="5" align="left"><?php echo ($i+1);?></td>-->
1005
+ <td align="center" width="100">
1006
+ <label for="cb<?php echo $i ?>"><?php echo $i ?></label>
1007
+ <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" />
1008
+ <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $lang_arr[$i] ?>" />
1009
  </td>
1010
  <td align="left" >
1011
  <a href="index2.php?option=<?php echo $option;?>&task=edit_lang&langx=<?php echo $lang_arr[$i];?>"><?php echo ucfirst($lang_arr[$i])?>
1015
 
1016
  }
1017
  ?>
1018
+ </table></div>
1019
  <input type="hidden" name="option" value="com_cloner" />
1020
  <input type="hidden" name="task" value="lang" />
1021
  <input type="hidden" name="boxchecked" value="0" />
1031
  global $baDownloadPath, $_CONFIG;
1032
 
1033
  ?>
1034
+
1035
+ <script>
1036
+ $(function() {
1037
+ $( "#toggle" ).button();
1038
+ $( "#toggle" ).click(function() { checkJAll(<?php echo (count( $files )); ?>, "toggle", "cb"); });
1039
+ $( "#checklist" ).buttonset();
1040
+ });
1041
+ </script>
1042
+ <div id="checklist">
1043
  <form action="index2.php" method="post" name="adminForm">
1044
  <table class="adminlist">
1045
  <tr>
1046
+ <th width="100">
1047
+ <input type="checkbox" id="toggle" name="toggle" value="" /><label for="toggle">Check All</label>
 
 
 
 
1048
  </th>
1049
+ <th align="left" width="100px;">
1050
  <?php echo LM_COL_DOWNLOAD ?>
1051
  </th>
1052
+ <th width="50%" class="title">
1053
+ <?php echo LM_COL_FILENAME ?>
1054
+ </th>
1055
  <th align="left" width="10%">
1056
  <?php echo LM_COL_SIZE ?>
1057
  </th>
1058
+ <th align="left" width="">
1059
  <?php echo LM_COL_DATE ?>
1060
  </th>
1061
  </tr>
1063
  $k = 0;
1064
  for ($i=0; $i <= (count( $files )-1); $i++) {
1065
  $date = date ("D jS M Y H:i:s (\G\M\T O)", filemtime($path.'/'.$files[$i]));
1066
+ $url = "index2.php?option=com_cloner&task=download&file=".'/'.urlencode($files[$i]);
1067
  ?>
1068
  <tr class="<?php echo "row$k"; ?>">
1069
+
 
 
1070
  <td align="center">
1071
+ <label for="cb<?php echo $i ?>"><?php echo $i ?></label>
1072
+ <input type="checkbox" id="cb<?php echo $i ?>" name="cid[<?php echo $i?>]" value="<?php echo $i ?>" />
1073
+ <input type="hidden" name="files[<?php echo $i?>]" value="<?php echo $files[$i] ?>" />
 
 
1074
  </td>
1075
  <td align="left">
1076
+ <a target='_blank' href="<?php echo $url ?>"><img src="images/filesave.png" border="0" title="<?php echo LM_DOWNLOAD_TITLE." - ".$files[$i] ?>" /></a>
1077
+ </td>
1078
+ <td>
1079
+ <span class="backup_name"><?php echo $files[$i]; ?></span>
1080
+ <input type="hidden" id="f<?php echo $i ?>" name="f<?php echo $i ?>" value="<?php echo $files[$i]; ?>" >
1081
+ </td>
1082
+
 
 
 
 
 
 
 
1083
  <td align="left">
1084
+ <?php echo $sizes[$i]; ?>
1085
  </td >
1086
  <td align="left">
1087
+ <?php echo $date; ?>
1088
  </td>
1089
  </tr>
1090
  <?php
1092
  }
1093
  ?>
1094
  </table>
1095
+ </div>
1096
  <input type="hidden" name="option" value="com_cloner" />
1097
  <input type="hidden" name="task" value="" />
1098
  <input type="hidden" name="boxchecked" value="0" />
1106
  global $config_file,$_CONFIG, $lang_array, $database, $mosConfig_db;
1107
  ?>
1108
  <form name='adminForm' action='index2.php' method='POST'>
1109
+
1110
+ <script>
1111
+ $(function() {
1112
+ $( "#tabs" ).tabs();
1113
+ });
1114
+
1115
+ $(function() {
1116
+ $( "#radiog1" ).buttonset();
1117
+ $( "#radiog2" ).buttonset();
1118
+ $( "#radiog3" ).buttonset();
1119
+ $( "#radiog4" ).buttonset();
1120
+ $( "#radio" ).buttonset();
1121
+ $( "#radiom" ).buttonset();
1122
+ $( "#radiob" ).buttonset();
1123
+ $( "#radioftp" ).buttonset();
1124
+ $( "#radioftps" ).buttonset();
1125
+ $( "#radiodebug" ).buttonset();
1126
+ $( "#radiorefresh" ).buttonset();
1127
+ $( "#checktar" ).button();
1128
+ $( "#cron_file_delete_act" ).button();
1129
+ $( "#cron_sql_drop" ).button();
1130
+ $( "#cron_amazon_active" ).button();
1131
+ $( "#cron_ftp_delb" ).button();
1132
+ $( "#checkmysqldump" ).button();
1133
+ });
1134
+ </script>
1135
+
1136
+ <?php $tabs = new mosTabs(1);?>
1137
+ <ul>
1138
+
1139
+ <li><a href="#tabs-1"><?php echo LM_TAB_GENERAL;?></a></li>
1140
+ <li><a href="#tabs-2"><?php echo LM_TAB_MYSQL;?></a></li>
1141
+ <li><a href="#tabs-3"><?php echo LM_TAB_AUTH;?></a></li>
1142
+ <li><a href="#tabs-4"><?php echo LM_TAB_SYSTEM;?></a></li>
1143
+ <li><a href="#tabs-5"><?php echo LM_TAB_CRON;?></a></li>
1144
+ <li><a href="#tabs-6"><?php echo LM_TAB_INFO;?></a></li>
1145
+ </ul>
1146
+
1147
  <table class='adminform'>
1148
  <tr><th colspan='2'>
1149
  <?php echo LM_CONFIG_EDIT?> <?php echo $config_file?>
1150
  </th></tr>
1151
  </table>
1152
  <?php
1153
+ $tabs->startTab(LM_TAB_GENERAL,"1");
 
1154
  ?>
 
1155
 
1156
+ <div id="configtabinside">
1157
+
1158
+ <div>
1159
+ <h3><a href="#"> <?php echo LM_CONFIG_BSETTINGS?></a></h3>
1160
+ <div><p>
1161
+ <table class='adminform'>
1162
+
1163
+ <tr>
1164
+ <td>
1165
+ <?php echo LM_CONFIG_UBPATH?>
1166
+ </td>
1167
+ <td>
1168
+ <input type=text size=100 name='backup_path' value='<?php echo $_CONFIG[backup_path]?>'>
1169
+ <br /><?php echo LM_CONFIG_UBPATH_SUB?>
1170
+ </td>
1171
+ </tr>
1172
+
1173
+ <tr>
1174
+ <td width='250'>
1175
+ <?php echo LM_CONFIG_BPATH?>
1176
+ </td>
1177
+ <td>
1178
+ <input type=text size=100 name='clonerPath' value='<?php echo $_CONFIG[clonerPath]?>'>
1179
+ <br /><?php echo LM_CONFIG_BPATH_SUB?>
1180
+ </td>
1181
+ </tr>
1182
+
1183
+ </table>
1184
+ </p></div>
1185
+ </div>
1186
+
1187
+ <div>
1188
+ <h3><a href="#"> <?php echo LM_CONFIG_BSETTINGS_OPTIONS?></a></h3>
1189
+ <div><p>
1190
+ <table class='adminform'>
1191
+
1192
+ <tr>
1193
+ <td width='250'>
1194
+ <?php echo LM_CONFIG_MANUAL_BACKUP;?>
1195
+ </td>
1196
+ <td>
1197
+ <div id="radiog1">
1198
+ <label for="radiog11"><?php echo LM_YES?></label> <input id="radiog11" type=radio size=50 value=1 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==1) echo 'checked';?>>
1199
+ <label for="radiog12"><?php echo LM_NO?></label> <input id="radiog12" type=radio size=50 value=0 name='backup_refresh' <?php if($_CONFIG[backup_refresh]==0) echo 'checked';?>>
1200
+ <br><small><?php echo LM_CONFIG_MANUAL_BACKUP_SUB?></small>
1201
+ </div>
1202
+ </td>
1203
+ </tr>
1204
+
1205
+ <tr>
1206
+ <td>
1207
+ <?php echo LM_CRON_COMPRESS?>
1208
+ </td>
1209
+ <td>
1210
+ <div id="radiog2">
1211
+ <label for="radiog21"><?php echo LM_YES?></label> <input id="radiog21" type=radio size=50 value=1 name='backup_compress' <?php if($_CONFIG[backup_compress]==1) echo 'checked';?>>
1212
+ <label for="radiog22"><?php echo LM_NO?></label> <input id="radiog22" type=radio size=50 value=0 name='backup_compress' <?php if($_CONFIG[backup_compress]==0) echo 'checked';?>>
1213
+ <br /> <small>set it to Yes in order to compress the files into smaller backups</small>
1214
+ </div>
1215
+ </td>
1216
+ </tr>
1217
+
1218
+ <tr>
1219
+ <td>
1220
+ <?php echo LM_CRON_DB_BACKUP?>
1221
+ </td>
1222
+ <td>
1223
+ <div id="radiog3">
1224
+ <label for="radiog31">Yes</label> <input id="radiog31" type=radio size=50 value=1 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==1) echo 'checked';?>>
1225
+ <label for="radiog32">No</label> <input id="radiog32" type=radio size=50 value=0 name='enable_db_backup' <?php if($_CONFIG[enable_db_backup]==0) echo 'checked';?>>
1226
+ <br /><?php echo LM_CRON_DB_BACKUP_SUB?>
1227
+ </div>
1228
+
1229
+ </td>
1230
+ </tr>
1231
+
1232
+ <tr>
1233
+ <td>
1234
+ <?php echo LM_CONFIG_SYSTEM_MBACKUP?>
1235
+ </td>
1236
+ <td>
1237
+ <div id="radiog4">
1238
+ <label for="radiog41">Yes</label> <input id="radiog41" type=radio size=50 value=1 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==1) echo 'checked';?>>
1239
+ <label for="radiog42">No</label> <input id="radiog42" type=radio size=50 value=0 name='add_backups_dir' <?php if($_CONFIG[add_backups_dir]==0) echo 'checked';?>>
1240
+ <br /><?php echo LM_CONFIG_SYSTEM_MBACKUP_SUB?>
1241
+ </td>
1242
+ </div>
1243
+ </tr>
1244
+
1245
+ </table>
1246
+ </p></div>
1247
+ </div>
1248
+
1249
+ <div>
1250
+ <h3><a href="#"> <?php echo LM_CONFIG_BSETTINGS_SERVER?></a></h3>
1251
+ <div><p>
1252
+ <table class='adminform'>
1253
+
1254
+ <tr><td width='250'>
1255
+ <?php echo LM_CONFIG_MEM?>
1256
+ </td>
1257
+ <td align='left'>
1258
+ <table style="width:auto; margin-bottom: 10px;" cellpadding='0' cellspacing='2' border='1'>
1259
+ <tr bgcolor='#efefef'><td style="width:70px;">
1260
+ <label for="checktar"><?php echo LM_ACTIVE;?></label> <input type=checkbox id="checktar" value=1 name='mem' <?php if($_CONFIG[mem]==1) echo 'checked';?>>
1261
+ </td><td align='left'>
1262
+
1263
+ <table width='100%' cellpadding='0' cellspacing='0'>
1264
+ <tr><td>
1265
+ <?php echo LM_TAR_PATH;?> <br /><input size='50' type=text name=tarpath value='<?php echo $_CONFIG[tarpath]?>'><br />
1266
+ <?php echo LM_TAR_PATH_SUB;?>
1267
+ </td></tr>
1268
+
1269
+ </table>
1270
+
1271
+
1272
+ </td></tr>
1273
+
1274
+ <tr bgcolor='#dedede'><td>
1275
+ <label for="checkmysqldump"><?php echo LM_ACTIVE?></label> <input id="checkmysqldump" type=checkbox value=1 name='sql_mem' <?php if($_CONFIG[sql_mem]==1) echo 'checked';?>>
1276
+ </td><td align='left'>
1277
+ <?php echo LM_MYSQLDUMP_PATH;?> <br /><input type=text size='50' name='sqldump' value='<?php echo $_CONFIG[sqldump]?>'>
1278
+
1279
+ </td></tr>
1280
+ </table>
1281
+
1282
+ <?php echo LM_CONFIG_MEM_SUB?>
1283
+
1284
+ </td>
1285
+ </tr>
1286
+ </table>
1287
+ </p></div>
1288
+ </div>
1289
+
1290
+ <div>
1291
+ <h3><a href="#">Public Key Management</a></h3>
1292
+ <div><p>
1293
+ <table class='adminForm'>
1294
+
1295
+ <tr><td width="250">
1296
+ Public Key
1297
+ </td>
1298
+ <td>
1299
+ <input type-text size=50 name='license_code' value="<?php echo $_CONFIG[license_code]?>"/>
1300
+ <br />Use this code in the MultiSite XCloner Manager <a target='_blank' href='http://www.xcloner.com/'>XCloner.com Members area</a>
1301
+ <br />Leave it empty to disable it
1302
+
1303
+ </td>
1304
+ </tr>
1305
+
1306
+ </table>
1307
+ </p></div>
1308
+ </div>
1309
+
1310
+ </div>
1311
 
1312
+ <?php
1313
+ $tabs->endTab();
1314
+ $tabs->startTab(LM_TAB_MYSQL,"2");
1315
+ ?>
1316
+ <div id="configtabinside">
1317
+ <div>
1318
+ <h3><a href="#"><?php echo LM_CONFIG_MYSQL?></a></h3>
1319
+ <div><p>
1320
+
1321
+ <table class='adminform'>
1322
+
1323
+ <tr>
1324
+ <td width='250'>
1325
+ <?php echo LM_CONFIG_MYSQLH?>
1326
+ </td>
1327
+ <td>
1328
+ <input type=text size=50 name='mysql_host' value='<?php echo $_CONFIG[mysql_host]?>'>
1329
+ <br /><?php echo LM_CONFIG_MYSQLH_SUB?>
1330
+ </td>
1331
+ </tr>
1332
+
1333
+ <tr>
1334
+ <td>
1335
+ <?php echo LM_CONFIG_MYSQLU?>
1336
+ </td>
1337
+ <td>
1338
+ <input type=text size=50 name='mysql_user' value='<?php echo $_CONFIG[mysql_user]?>'>
1339
+ <br /><?php echo LM_CONFIG_MYSQLU_SUB?>
1340
+ </td>
1341
+ </tr>
1342
+
1343
+ <tr>
1344
+ <td>
1345
+ <?php echo LM_CONFIG_MYSQLP?>
1346
+ </td>
1347
+ <td>
1348
+ <input type=text size=50 name='mysql_pass' value='<?php echo $_CONFIG[mysql_pass]?>'>
1349
+ <br /><?php echo LM_CONFIG_MYSQLP_SUB?>
1350
+ </td>
1351
+ </tr>
1352
+
1353
+ <tr>
1354
+ <td>
1355
+ <?php echo LM_CONFIG_MYSQLD?>
1356
+ </td>
1357
+ <td>
1358
+ <input type=text size=50 name='mysql_database' value='<?php echo $_CONFIG[mysql_database]?>'>
1359
+ <br /><?php echo LM_CONFIG_MYSQLD_SUB?>
1360
+ </td>
1361
+ </tr>
1362
+
1363
+ <tr>
1364
+ <td width='200'>
1365
+ <?php echo LM_CONFIG_SYSTEM_MDATABASES?>
1366
+ </td>
1367
+ <td>
1368
+ <div id="radiom">
1369
+ <label for="radiom1"><?php echo LM_YES?></label> <input id="radiom1" type=radio name='system_mdatabases' value='0' <?php if(abs($_CONFIG[system_mdatabases])==0) echo "checked";?>>
1370
+ <label for="radiom2"><?php echo LM_NO?></label> <input id="radiom2" type=radio name='system_mdatabases' value='1' <?php if(abs($_CONFIG[system_mdatabases])==1) echo "checked";?>>
1371
+ <br /> <?php echo LM_CONFIG_SYSTEM_MDATABASES_SUB?>
1372
+ </div>
1373
+ </td>
1374
+ </tr>
1375
+
1376
+ </table>
1377
+ </p></div>
1378
+ </div>
1379
+ </div>
1380
+ <?php
1381
+ $tabs->endTab();
1382
+ $tabs->startTab(LM_TAB_AUTH,"3");
1383
+ ?>
1384
+ <div id="configtabinside">
1385
+ <div>
1386
+ <h3><a href="#"><?php echo LM_CONFIG_AUTH?></a></h3>
1387
+ <div><p>
1388
+ <table class='adminform'>
1389
+ <tr>
1390
+ <td width='250'>
1391
+ <?php echo LM_CONFIG_AUTH_USER?>
1392
+ </td>
1393
+ <td>
1394
+ <input type=text size=30 name='jcuser' value='<?php echo $_CONFIG[jcuser]?>'>
1395
+ <br /><?php echo LM_CONFIG_AUTH_USER_SUB?>
1396
+ </td>
1397
+ </tr>
1398
+
1399
+ <tr>
1400
+ <td>
1401
+ <?php echo LM_CONFIG_AUTH_PASS?>
1402
+ </td>
1403
+ <td>
1404
+ <input type=text size=30 name='jcpass' value=''> <?php if($_CONFIG['jcpass'] == md5('admin')) echo "<font color=red>please change the default password 'admin'</font>"?>
1405
+ <br /><?php echo LM_CONFIG_AUTH_PASS_SUB?>
1406
+ </td>
1407
+ </tr>
1408
+ </table>
1409
+ </p></div>
1410
+ </div>
1411
+ </div>
1412
+ <?php
1413
+ $tabs->endTab();
1414
+ $tabs->startTab(LM_TAB_SYSTEM,"4");
1415
+ ?>
1416
 
1417
+ <div id="configtabinside">
1418
+ <div>
1419
+ <h3><a href="#"><?php echo LM_CONFIG_DISPLAY?></a></h3>
1420
+ <div><p>
1421
+ <table class='adminform'>
1422
+ <tr>
1423
+ <td width='250'>
1424
+ <?php echo LM_CONFIG_SYSTEM_LANG?>
1425
+ </td><td>
1426
+ <select name='select_lang'>
1427
+ <option value=''><?php echo LM_CONFIG_SYSTEM_LANG_DEFAULT;?></option>
1428
+ <?php
1429
+ foreach($lang_array as $value)
1430
+ if($_CONFIG['select_lang'] == $value)
1431
+ echo "<option value='$value' selected>$value</option>\n";
1432
+ else
1433
+ echo "<option value='$value'>$value</option>\n";
1434
+ ?>
1435
+ </select>
1436
+ <br>
1437
+ <br /><?php echo LM_CONFIG_SYSTEM_LANG_SUB?>
1438
+ </td></tr>
1439
+ </table>
1440
+ </p></div>
1441
+ </div>
1442
+ <div>
1443
+ <h3><a href="#"> <?php echo LM_CONFIG_SYSTEM?></a></h3>
1444
+ <div><p>
1445
+
1446
+ <table class='adminform'>
1447
+
1448
+ <tr>
1449
+ <td width='250'>
1450
+ <?php echo LM_CONFIG_SYSTEM_FTP?>
1451
+ </td>
1452
+ <td>
1453
+ <div id="radioftp">
1454
+ <label for="radioftp1">Direct</label><input id="radioftp1" type=radio name='system_ftptransfer' value='0' <?php if(abs($_CONFIG[system_ftptransfer])==0) echo "checked";?>>
1455
+ <label for="radioftp2">Passive</label><input id="radioftp2" type=radio name='system_ftptransfer' value='1' <?php if(abs($_CONFIG[system_ftptransfer])==1) echo "checked";?>> <br>
1456
+ <br /><?php echo LM_CONFIG_SYSTEM_FTP_SUB?>
1457
+ </div>
1458
+
1459
+ </td></tr>
1460
+ <tr><td>
1461
+ <?php echo LM_FTP_TRANSFER_MORE?>
1462
+ </td><td>
1463
+ <div id="radioftps">
1464
+ <label for="radioftps1">Normal</label><input id="radioftps1" type=radio size=50 value=0 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==0) echo 'checked';?>>
1465
+ <label for="radioftps2">Secure</label><input id="radioftps2" type=radio size=50 value=1 name='secure_ftp' <?php if($_CONFIG[secure_ftp]==1) echo 'checked';?>>
1466
+ </td>
1467
+ </tr>
1468
+
1469
+ </table>
1470
+ </p></div>
1471
+ </div>
1472
+ <div>
1473
+ <h3><a href="#"> <?php echo LM_CONFIG_MANUAL?></a></h3>
1474
+ <div><p>
1475
+
1476
+ <script>
1477
+ $(function() {
1478
+ $( "#slider" ).slider({
1479
+ value:parseInt(<?php echo $_CONFIG[backup_refresh_number];?>),
1480
+ min: 10,
1481
+ max: 1000,
1482
+ step: 10,
1483
+ slide: function( event, ui ) {
1484
+ $( "#backup_refresh_number" ).val( ui.value );
1485
+ }
1486
+ });
1487
+ $( "#backup_refresh_number" ).val( $( "#slider" ).slider( "value" ) );
1488
+ });
1489
+ $(function() {
1490
+ $( "#sliderRPS" ).slider({
1491
+ value:parseInt(<?php echo $_CONFIG[recordsPerSession];?>),
1492
+ min: 100,
1493
+ max: 100000,
1494
+ step: 100,
1495
+ slide: function( event, ui ) {
1496
+ $( "#recordsPerSession" ).val( ui.value );
1497
+ }
1498
+ });
1499
+ $( "#recordsPerSession" ).val( $( "#sliderRPS" ).slider( "value" ) );
1500
+ });
1501
+ $(function() {
1502
+ $( "#sliderEFZ" ).slider({
1503
+ value:parseInt(<?php echo $_CONFIG[excludeFilesSize];?>),
1504
+ min: -1,
1505
+ max: 10240,
1506
+ step: 1,
1507
+ slide: function( event, ui ) {
1508
+ $( "#excludeFilesSize" ).val( ui.value );
1509
+ }
1510
+ });
1511
+ $( "#excludeFilesSize" ).val( $( "#sliderEFZ" ).slider( "value" ) );
1512
+ });
1513
+
1514
+ $(function() {
1515
+ $( "#sliderSBS" ).slider({
1516
+ value:parseInt(<?php echo $_CONFIG[splitBackupSize];?>),
1517
+ min: -1,
1518
+ max: 10000,
1519
+ step: 1,
1520
+ slide: function( event, ui ) {
1521
+ $( "#splitBackupSize" ).val( ui.value );
1522
+ }
1523
+ });
1524
+ $( "#splitBackupSize" ).val( $( "#sliderSBS" ).slider( "value" ) );
1525
+ });
1526
+ </script>
1527
+
1528
+ <table class='adminform'>
1529
+
1530
+ <tr><td width="250">
1531
+ <?php echo LM_CONFIG_MANUAL_FILES;?>
1532
+ </td><td>
1533
+ <div class="sliderContainer">
1534
+ <div id="slider" style="width:500px;padding:5px 0 0 0;float:left"></div>
1535
+ <label for="backup_refresh_number"></label>
1536
+ <input id="backup_refresh_number" type=text size=10 name='backup_refresh_number' value=<?php echo $_CONFIG[backup_refresh_number];?>>
1537
+ </div>
1538
+ </td></tr>
1539
+
1540
+ <tr><td width="250">
1541
+ <?php echo LM_CONFIG_DB_RECORDS;?>
1542
+ </td><td>
1543
+ <div class="sliderContainer">
1544
+ <div id="sliderRPS" style="width:500px;padding:5px 0 0 0;float:left;"></div>
1545
+ <label for="recordsPerSession"></label>
1546
+ <input id="recordsPerSession" type=text size=10 name='recordsPerSession' value=<?php echo $_CONFIG[recordsPerSession];?>>
1547
+ </div>
1548
+ </td></tr>
1549
+
1550
+ <tr><td width="250">
1551
+ <?php echo LM_CONFIG_EXCLUDE_FILES_SIZE;?>
1552
+ </td><td>
1553
+ <div class="sliderContainer">
1554
+ <div id="sliderEFZ" style="width:500px;padding:5px 0 0 0;float:left"></div>
1555
+ <label for="excludeFilesSize"></label>
1556
+ <input id="excludeFilesSize" type=text size=10 name='excludeFilesSize' value=<?php echo $_CONFIG[excludeFilesSize];?>> MB
1557
+ </div>
1558
+ </td></tr>
1559
+
1560
+ <tr><td width="250">
1561
+ <?php echo LM_CONFIG_SPLIT_BACKUP_SIZE;?>
1562
+ </td><td>
1563
+ <div class="sliderContainer">
1564
+ <div id="sliderSBS" style="width:500px;padding:5px 0 0 0;float:left;"></div>
1565
+ <label for="splitBackupSize"></label>
1566
+ <input id="splitBackupSize" type=text size=10 name='splitBackupSize' value=<?php echo $_CONFIG[splitBackupSize];?>> MB
1567
+ </div>
1568
+
1569
+ </td></tr>
1570
+
1571
+ <tr><td>
1572
+ <?php echo LM_CONFIG_MANUAL_REFRESH;?>
1573
+ </td><td>
1574
+ <input type=text size=20 name='refresh_time' value=<?php echo $_CONFIG[refresh_time];?>> miliseconds
1575
+
1576
+ </td></tr>
1577
+
1578
+ <tr><td>
1579
+ <?php echo LM_REFRESH_MODE?>
1580
+ </td><td>
1581
+ <div id="radiorefresh">
1582
+ <label for="radiorefresh1">Normal</label> <input id="radiorefresh1" type=radio size=50 value=0 name='refresh_mode' <?php if($_CONFIG[refresh_mode]==0) echo 'checked';?>>
1583
+ <label for="radiorefresh2">AJAX</label> <input id="radiorefresh2" type=radio size=50 value=1 name='refresh_mode' <?php if($_CONFIG[refresh_mode]==1) echo 'checked';?>>
1584
+ </div>
1585
+ </td></tr>
1586
+
1587
+ <tr><td>
1588
+ <?php echo LM_DEBUG_MODE?>
1589
+ </td><td>
1590
+ <div id="radiodebug">
1591
+ <label for="radiodebug1">No</label> <input id="radiodebug1" type=radio size=50 value=0 name='debug' <?php if($_CONFIG[debug]==0) echo 'checked';?>>
1592
+ <label for="radiodebug2">Yes</label> <input id="radiodebug2" type=radio size=50 value=1 name='debug' <?php if($_CONFIG[debug]==1) echo 'checked';?>>
1593
+ </td></tr>
1594
+ </table>
1595
+
1596
+ </p></div>
1597
+ </div>
1598
 
1599
+ </div>
1600
+ <?php
1601
+ $tabs->endTab();
1602
+ $tabs->startTab(LM_TAB_CRON,"5");
1603
+ ?>
1604
+ <div id="configtabinside">
1605
+
1606
+ <div>
1607
+ <h3><a href="#"> <?php echo LM_CRON_SETTINGS_M?> - all configs are saved in directory configs/ </a></h3>
1608
+ <div><p>
1609
+ <table class='adminform'>
1610
+
1611
+ <tr>
1612
+ <td width='250'>
1613
+ <?php echo LM_CRON_MCRON?>
1614
+ </td>
1615
+ <td>
1616
+ <input type=text size=30 value="<?php echo $_CONFIG[cron_save_as]?>" name='cron_save_as' >.php <br />
1617
+ <?php echo LM_CRON_MCRON_SUB?>
1618
+ </td>
1619
+ </tr>
1620
+
1621
+ <tr>
1622
+ <td>
1623
+ <?php echo LM_CRON_MCRON_AVAIL?>
1624
+ </td>
1625
+ <td>
1626
+ <?php
1627
+
1628
+ if ($handle = @opendir($_CONFIG['multiple_config_dir'])) {
1629
+
1630
+ while (false !== ($file = readdir($handle))) {
1631
+ if( ($file!=".") && ($file!="..") &&($file!="") && (strstr($file, '.php'))){
1632
+ $fcron = "cloner.cron.php?config=$file";
1633
+
1634
+ echo "<b>$fcron</b>";
1635
+
1636
+ echo " - <a href='$fcron' target='_blank'>execute cron</a>";
1637
+
1638
+ echo " | <a href='index2.php?option=com_cloner&task=cron_delete&fconfig=$file'>delete config</a>";
1639
+
1640
+ echo "\n<br />";
1641
+ }
1642
+ }
1643
+
1644
+ closedir($handle);
1645
+ }
1646
+ ?>
1647
+ </td>
1648
+ </tr>
1649
+ </table>
1650
+ </p></div>
1651
+ </div>
1652
+
1653
+ <div>
1654
+ <h3><a href="#"> <?php echo LM_CRON_SETTINGS?></a></h3>
1655
+ <div><p>
1656
+ <table class='adminform'>
1657
+
1658
+ <tr>
1659
+ <td width='250'>
1660
+ <?php echo LM_CRON_SEMAIL?>
1661
+ </td>
1662
+ <td>
1663
+ <input type=text size=30 value="<?php echo $_CONFIG[cron_logemail]?>" name='cron_logemail' > <br />
1664
+ <?php echo LM_CRON_SEMAIL_SUB?>
1665
+ </td>
1666
+ </tr>
1667
+
1668
+ <tr>
1669
+ <td>
1670
+ <?php echo LM_CRON_MODE?>
1671
+ </td>
1672
+ <td>
1673
+
1674
+ <div id="radio">
1675
+ <input id="radio1" type=radio size=50 value=0 name='cron_send' <?php if($_CONFIG[cron_send]==0) echo 'checked';?>>
1676
+ <label for="radio1"><?php echo LM_CONFIG_CRON_LOCAL?></label>
1677
+ <input id="radio2" type=radio size=50 value=1 name='cron_send' <?php if($_CONFIG[cron_send]==1) echo 'checked';?>>
1678
+ <label for="radio2"><?php echo LM_CONFIG_CRON_REMOTE?></label>
1679
+ <input id="radio3" type=radio size=50 value=2 name='cron_send' <?php if($_CONFIG[cron_send]==2) echo 'checked';?>>
1680
+ <label for="radio3"><?php echo LM_CONFIG_CRON_EMAIL?></label>
1681
+ </div>
1682
+ <?php echo LM_CRON_MODE_INFO?>
1683
+ </td>
1684
+ </tr>
1685
+
1686
+
1687
+ <tr>
1688
+ <td>
1689
+ <?php echo LM_CRON_TYPE?>
1690
+ </td>
1691
+ <td>
1692
+ <div id="radiob">
1693
+ <input id="radiob1" type=radio size=50 value=0 name='cron_btype' <?php if($_CONFIG[cron_btype]==0) echo 'checked';?>>
1694
+ <label for="radiob1"><?php echo LM_CONFIG_CRON_FULL?></label>
1695
+ <input id="radiob2" type=radio size=50 value=1 name='cron_btype' <?php if($_CONFIG[cron_btype]==1) echo 'checked';?>>
1696
+ <label for="radiob2"><?php echo LM_CONFIG_CRON_FILES?></label>
1697
+ <input id="radiob3" type=radio size=50 value=2 name='cron_btype' <?php if($_CONFIG[cron_btype]==2) echo 'checked';?>>
1698
+ <label for="radiob3"><?php echo LM_CONFIG_CRON_DATABASE?></label>
1699
+ <?php echo LM_CRON_TYPE_INFO?>
1700
+ </div>
1701
+ </td>
1702
+ </tr>
1703
+
1704
+ <tr>
1705
+ <td>
1706
+ <?php echo LM_CRON_BNAME?>
1707
+ </td>
1708
+ <td>
1709
+ <input type=text size=50 value="<?php echo $_CONFIG[cron_bname]?>" name='cron_bname' > <br />
1710
+ <?php echo LM_CRON_BNAME_SUB?>
1711
+ </td>
1712
+ </tr>
1713
+
1714
+
1715
+ <tr>
1716
+ <td>
1717
+ <?php echo LM_CRON_IP?>
1718
+ </td>
1719
+ <td>
1720
+ <textarea type=text size=50 name='cron_ip' cols='30' rows='5'><?php echo $_CONFIG[cron_ip]?></textarea> <br />
1721
+ <?php echo LM_CRON_IP_SUB?>
1722
+ </td>
1723
+ </tr>
1724
+ </table>
1725
+ </p></div>
1726
+ </div>
1727
+
1728
+ <div>
1729
+ <h3><a href="#"> <?php echo LM_CRON_FTP_DETAILS?></a></h3>
1730
+ <div><p>
1731
+ <table class='adminform'>
1732
+
1733
+ <tr>
1734
+ <td width='250'>
1735
+ <?php echo LM_CRON_FTP_SERVER?>
1736
+ </td>
1737
+ <td>
1738
+ <input type=text size=50 name='cron_ftp_server' value='<?php echo $_CONFIG[cron_ftp_server]?>'>
1739
+ </td>
1740
+ </tr>
1741
+ <tr>
1742
+ <td>
1743
+ <?php echo LM_CRON_FTP_USER?>
1744
+ </td>
1745
+ <td>
1746
+ <input type=text size=50 name='cron_ftp_user' value='<?php echo $_CONFIG[cron_ftp_user]?>'>
1747
+ </td>
1748
+ </tr>
1749
+ <tr>
1750
+ <td>
1751
+ <?php echo LM_CRON_FTP_PASS?>
1752
+ </td>
1753
+ <td>
1754
+ <input type=text size=50 name='cron_ftp_pass' value='<?php echo $_CONFIG[cron_ftp_pass]?>'>
1755
+ </td>
1756
+ </tr>
1757
+ <tr>
1758
+ <td>
1759
+ <?php echo LM_CRON_FTP_PATH?>
1760
+ </td>
1761
+ <td>
1762
+ <input type=text size=50 name='cron_ftp_path' value='<?php echo $_CONFIG[cron_ftp_path]?>'>
1763
+ </td>
1764
+ </tr>
1765
+ <tr>
1766
+ <td>
1767
+ <!--<?php echo LM_CRON_FTP_DELB?>-->
1768
+ </td>
1769
+ <td>
1770
+ <input id="cron_ftp_delb" type=checkbox name='cron_ftp_delb' <?php if($_CONFIG[cron_ftp_delb]==1) echo "checked";?> value='1'>
1771
+ <label for="cron_ftp_delb"><?php echo LM_CRON_FTP_DELB?></label>
1772
+ </td>
1773
+ </tr>
1774
+ </table>
1775
+ </p></div>
1776
+ </div>
1777
+
1778
+ <div>
1779
+ <h3><a href="#"> <?php echo LM_AMAZON_S3?></a></h3>
1780
+ <div><p>
1781
+ <table class='adminform'>
1782
+
1783
+ <tr>
1784
+ <td width='250'>
1785
+ <?php #echo LM_AMAZON_S3_ACTIVATE?>
1786
+ </td>
1787
+ <td>
1788
+ <label for="cron_amazon_active"><?php echo LM_AMAZON_S3_ACTIVATE?></label>
1789
+ <input id="cron_amazon_active" type=checkbox name='cron_amazon_active' <?php if($_CONFIG[cron_amazon_active]==1) echo "checked";?> value='1'>
1790
+ </td>
1791
+ </tr>
1792
 
1793
+ <tr>
1794
+ <td>
1795
+ <?php echo LM_AMAZON_S3_AWSACCESSKEY;?>
1796
+ </td>
1797
+ <td>
1798
+ <input type=text size=50 name='cron_amazon_awsAccessKey' value="<?php echo $_CONFIG['cron_amazon_awsAccessKey'];?>">
1799
+ </td>
1800
+ </tr>
1801
 
1802
+ <tr>
1803
+ <td>
1804
+ <?php echo LM_AMAZON_S3_AWSSECRETKEY;?>
1805
+ </td>
1806
+ <td>
1807
+ <input type=text size=50 name='cron_amazon_awsSecretKey' value="<?php echo $_CONFIG['cron_amazon_awsSecretKey'];?>">
1808
+ </td>
1809
+ </tr>
1810
 
1811
+ <tr>
1812
+ <td width='200'>
1813
+ <?php echo LM_AMAZON_S3_BUCKET;?>
1814
+ </td>
1815
+ <td>
1816
+ <input type=text size=50 name='cron_amazon_bucket' value="<?php echo $_CONFIG['cron_amazon_bucket'];?>">
1817
+ </td>
1818
+ </tr>
 
 
1819
 
1820
+ <tr>
1821
+ <td>
1822
+ <?php echo LM_AMAZON_S3_DIRNAME;?>
1823
+ </td>
1824
+ <td>
1825
+ <input type=text size=50 name='cron_amazon_dirname' value="<?php echo $_CONFIG['cron_amazon_dirname'];?>">
1826
+ </td>
1827
+ </tr>
1828
+ </tr>
1829
+ </table>
1830
+ </p></div>
1831
+ </div>
1832
+
1833
+ <div>
1834
+ <h3><a href="#"> <?php echo LM_CRON_EMAIL_DETAILS?></a></h3>
1835
+ <div><p>
1836
+ <table class='adminform'>
1837
+
1838
+ <tr>
1839
+ <td width="250">
1840
+ <?php echo LM_CRON_EMAIL_ACCOUNT?>
1841
+ </td>
1842
+ <td>
1843
+ <input type=text size=50 name='cron_email_address' value='<?php echo $_CONFIG[cron_email_address]?>'>
1844
+ </td>
1845
+ </tr>
1846
+ </table>
1847
+ </p></div>
1848
+ </div>
1849
+
1850
+ <div>
1851
+ <h3><a href="#"> <?php echo LM_CRON_MYSQL_DETAILS?></a></h3>
1852
+ <div><p>
1853
+ <table class='adminform'>
1854
+
1855
+ <tr bgcolor='#ffffff'>
1856
+ <td width='250'>
1857
+ <?php #echo LM_CRON_MYSQL_DROP?>
1858
+ </td>
1859
+ <td>
1860
+ <label for="cron_sql_drop"><?php echo LM_CRON_MYSQL_DROP?></label>
1861
+ <input id="cron_sql_drop" type=checkbox name='cron_sql_drop' value='1' <?php if($_CONFIG[cron_sql_drop]) echo "checked";?> >
1862
+ </td>
1863
+ </tr>
1864
+
1865
+ <?php
1866
+ if((abs($_CONFIG[system_mdatabases])==0) && ($_CONFIG[enable_db_backup]==1)){
1867
+ ?>
1868
+ <tr><td valign='top'>
1869
+ <?php echo LM_DATABASE_INCLUDE_DATABASES?>
1870
+ </td><td>
1871
+ <select name='databases_incl[]' MULTIPLE SIZE=5>
1872
+ <?php
1873
+
1874
+ $curent_dbs = explode(",", $_CONFIG['databases_incl_list']);
1875
+
1876
+ $query = @mysql_query("SHOW databases");
1877
+ while($row = @mysql_fetch_array($query)){
1878
+
1879
+ $table = $row[0];
1880
+
1881
+ if($table != $_CONFIG['mysql_database'])
1882
+
1883
+ if(in_array($table, $curent_dbs)){
1884
+
1885
+ echo "<option value='".$table."' selected>$table</option>";
1886
+
1887
+ }else{
1888
+
1889
+ echo "<option value='".$table."'>$table</option>";
1890
 
1891
+ }
1892
+ }
1893
+ ?>
1894
+ </select><br />
1895
+ <?php echo LM_DATABASE_INCLUDE_DATABASES_SUB?>
1896
+ </td></tr>
1897
+ <?php
1898
+ }
1899
+ ?>
1900
+ </table>
1901
+ </p></div>
1902
+ </div>
1903
+
1904
+ <div>
1905
+ <h3><a href="#"> <?php echo LM_CRON_DELETE_FILES?></a></h3>
1906
+ <div><p>
1907
+
1908
+ <script>
1909
+ $(function() {
1910
+ $( "#slider2" ).slider({
1911
+ value:parseInt(<?php echo (int)$_CONFIG[cron_file_delete];?>),
1912
+ min: 0,
1913
+ max: 100,
1914
+ step: 1,
1915
+ slide: function( event, ui ) {
1916
+ $( "#cron_file_delete" ).val( ui.value );
1917
+ }
1918
+ });
1919
+ $( "#cron_file_delete" ).val( $( "#slider2" ).slider( "value" ) );
1920
+ });
1921
+ </script>
1922
+
1923
+ <table class='adminform'>
1924
+
1925
+ <tr>
1926
+ <td width='250'>
1927
+ <?php #echo LM_CRON_DELETE_FILES_SUB_ACTIVE?>
1928
+ </td>
1929
+ <td>
1930
+ <label for="cron_file_delete_act"><?php echo LM_CRON_DELETE_FILES_SUB_ACTIVE?></label>
1931
+ <input id="cron_file_delete_act" type=checkbox name='cron_file_delete_act' <?php if ($_CONFIG['cron_file_delete_act'] == 1) echo 'checked';?> value='1'>
1932
+ </td>
1933
+ </tr>
1934
+ <tr>
1935
+ <td>
1936
+ <?php echo LM_CRON_DELETE_FILES_SUB?>
1937
+ </td>
1938
+ <td>
1939
+ <div id="slider2" style="width:300px;padding-top:5px;"></div>
1940
+ <br /><label for="cron_file_delete"></label>
1941
+ <input id="cron_file_delete" size=5 name='cron_file_delete' value='<?php echo $_CONFIG[cron_file_delete]?>'> days:
1942
+ </td>
1943
+ </tr>
1944
+ </table>
1945
+
1946
+ <table class='adminform'>
1947
+ <tr>
1948
+ <th colspan='2'>
1949
+ <?php echo LM_CRON_EXCLUDE?>
1950
+ </th>
1951
+ </tr>
1952
+ </tr>
1953
+ <tr>
1954
+ <td width='250'>
1955
+ <?php echo LM_CRON_EXCLUDE_DIR?>
1956
+ </td>
1957
+ <td>
1958
+ <textarea cols=50 rows=5 name='cron_exclude'><?php echo $_CONFIG[cron_exclude]?></textarea>
1959
+ </td>
1960
+ </tr>
1961
+
1962
+ </table>
1963
+ </p></div>
1964
+ </div>
1965
+
1966
+ </div>
1967
+ <?php
1968
+ $tabs->endTab();
1969
+ $tabs->startTab(LM_TAB_INFO,"6");
1970
+ ?>
1971
 
1972
+ <div id="configtabinside">
1973
+ <div>
1974
+ <h3><a href="#"><?php echo LM_CONFIG_INFO_PHP?></a></h3>
1975
+ <div><p>
1976
+
1977
+ <table class='adminform'>
1978
+
1979
+ <tr>
1980
+ <td width='250'>
1981
+ <?php echo LM_CONFIG_INFO_T_VERSION?>
1982
+ </td>
1983
+ <td>
1984
+ <b><?php
1985
+ $version = phpversion();
1986
+ $ver = str_replace(".", "", $version);
1987
+ $val = (version_compare(PHP_VERSION, '5.2.3') < 0)? $version: "Off";
1988
+ echo HTML_cloner::get_color($version, $val);
1989
+ ?></b>
1990
+ <br />
1991
+ <?php echo LM_CONFIG_INFO_VERSION?>
1992
+ </td>
1993
+ </tr>
1994
+
1995
+ <tr>
1996
+ <td>
1997
+ <?php echo LM_CONFIG_INFO_T_SAFEMODE?>
1998
+ </td>
1999
+ <td>
2000
+ <b><?php $val = (ini_get('safe_mode') != "")? ini_get('safe_mode'):"Off";
2001
+ echo HTML_cloner::get_color($val, 'On');
2002
+ ?></b>
2003
+ <br />
2004
+ <?php echo LM_CONFIG_INFO_SAFEMODE?>
2005
+ </td>
2006
+ </tr>
2007
+
2008
+ <tr>
2009
+ <td>
2010
+ <?php echo LM_CONFIG_INFO_T_MTIME?>
2011
+ </td>
2012
+ <td>
2013
+ <b><?php echo (ini_get('max_execution_time') != "")? ini_get('max_execution_time'):"no value";
2014
+
2015
+ ?></b>
2016
+ <br />
2017
+ <?php echo LM_CONFIG_INFO_TIME?>
2018
+ </td>
2019
+ </tr>
2020
+
2021
+ <tr>
2022
+ <td>
2023
+ <?php echo LM_CONFIG_INFO_T_MEML?>
2024
+ </td>
2025
+ <td>
2026
+ <b><?php echo (ini_get('memory_limit') != "")? ini_get('memory_limit'):"no value";?> </b>
2027
+ <br />
2028
+ <?php echo LM_CONFIG_INFO_MEMORY?>
2029
+ </td>
2030
+ </tr>
2031
+
2032
+ <tr>
2033
+ <td>
2034
+ <?php echo LM_CONFIG_INFO_T_BDIR?>
2035
+ </td>
2036
+ <td>
2037
+ <b><?php $val = (ini_get('open_basedir') != "")? ini_get('open_basedir'):"no value";
2038
+ echo HTML_cloner::get_color($val, '/');
2039
+ ?> </b>
2040
+ <br />
2041
+ <?php echo LM_CONFIG_INFO_BASEDIR?>
2042
+ </td>
2043
+ </tr>
2044
+
2045
+ <tr>
2046
+ <td>
2047
+ <?php echo LM_CONFIG_INFO_T_EXEC?>
2048
+ </td>
2049
+ <td>
2050
+ <b><?php
2051
+
2052
+ $out = "";
2053
+ if(function_exists("exec")){
2054
+
2055
+ $out = @exec("ls -al");
2056
+ }
2057
 
2058
+ $val = ($out != "")? "ENABLED":"<font color='red'>DISABLED</font>";
2059
+ echo HTML_cloner::get_color($val, 'DISABLED');
2060
+ ?> </b>
2061
+ <br />
2062
+ <?php echo LM_CONFIG_INFO_EXEC?>
2063
+ </td>
2064
+ </tr>
2065
+ </table>
2066
+ </p></div>
2067
+ </div>
2068
+ <div>
2069
+ <h3><a href="#"><?php echo LM_CONFIG_INFO_PATHS?></a></h3>
2070
+ <div><p>
2071
+ <table class='adminform'>
2072
+
2073
+ <tr>
2074
+ <td width='250'>
2075
+ <?php echo LM_CONFIG_INFO_ROOT_BPATH_TMP?>
2076
+ </td>
2077
+ <td>
2078
+ <b><?php $tmp_dir = realpath($_CONFIG['backup_path']."/administrator/backups");
2079
+ echo (@is_writeable( $tmp_dir ))? $tmp_dir . " is <font color=green>writeable</font>":$tmp_dir. " <font color=red>incorrect or unreadable</font>";?></b>
2080
+ <br />
2081
+ <?php echo LM_CONFIG_INFO_ROOT_PATH_TMP_SUB?>
2082
+ </td>
2083
+ </tr>
2084
+
2085
+ <tr>
2086
+ <td>
2087
+ <?php echo LM_CONFIG_INFO_ROOT_BPATH?>
2088
+ </td>
2089
+ <td>
2090
+ <b><?php echo (@is_readable($_CONFIG['backup_path']) )? $_CONFIG['backup_path'] . " is <font color=green>readable</font>":$_CONFIG['backup_path']. " <font color=red>incorrect or unreadable</font>";?></b>
2091
+ <br />
2092
+ <?php echo LM_CONFIG_INFO_ROOT_PATH_SUB?>
2093
+ </td>
2094
+ </tr>
2095
+
2096
+
2097
+ <tr>
2098
+ <td>
2099
+ <?php echo LM_CONFIG_INFO_T_BPATH?>
2100
+ </td>
2101
+ <td>
2102
+ <b><?php echo (@is_writeable($_CONFIG['clonerPath']) )? $_CONFIG['clonerPath'] . " is <font color=green>writeable</font>":$_CONFIG['clonerPath']. " <font color=red>unwriteable</font>";?></b>
2103
+ <br />
2104
+ <?php echo LM_CONFIG_INFO_BPATH?>
2105
+ </td>
2106
+ </tr>
2107
+
2108
+
2109
+ <tr>
2110
+ <td>
2111
+ <?php echo LM_CONFIG_INFO_T_TAR?>
2112
+ </td>
2113
+ <td>
2114
+ <b><?php
2115
+ if(function_exists('exec')){
2116
+ $info_tar_path = explode(" ", @exec("whereis tar"));
2117
+ }
2118
+ echo ($info_tar_path['1'] != "")? $info_tar_path['1']:"unable to determine";
2119
+ ?> </b>
2120
+ <br />
2121
+ <?php echo LM_CONFIG_INFO_TAR?>
2122
+ </td>
2123
+ </tr>
2124
+
2125
+
2126
+ <tr>
2127
+ <td>
2128
+ <?php echo LM_CONFIG_INFO_T_MSQL?>
2129
+ </td>
2130
+ <td>
2131
+ <b><?php
2132
+ if(function_exists('exec')){
2133
+ $info_msql_path = explode(" ", @exec("whereis mysqldump"));
2134
+ }
2135
+ echo ($info_msql_path['1'] != "")? $info_msql_path['1']:"unable to determine";
2136
+ ?> </b>
2137
+ <br />
2138
+ <?php echo LM_CONFIG_INFO_MSQL?>
2139
+ </td>
2140
+ </tr>
2141
 
2142
+ </table>
2143
+ </p></div>
2144
 
2145
+ </div></div>
 
 
 
 
 
 
 
 
2146
 
2147
+ <?php
2148
+ $tabs->endTab();
2149
+ $tabs->endPane();
2150
+ ?>
2151
+ <input type="hidden" name="option" value="com_cloner" />
2152
+ <input type="hidden" name="task" value="config" />
2153
+ <input type="hidden" name='action' value='save'>
2154
+ </form>
2155
 
2156
+ <?php
2157
+ }
2158
 
2159
+ function get_color($val, $comp){
2160
 
2161
+ if(!stristr($val, $comp))
2162
+ echo "<span style='color:green'>$val</span>";
2163
+ else
2164
+ echo "<span style='color:red'>$val</span>";
2165
 
2166
+ }
 
2167
 
2168
+ function TransferForm($option, $files){
2169
+ global $baDownloadPath, $mosConfig_absolute_path, $clonerPath, $task;
2170
 
2171
+ ?>
2172
+ <form action="index2.php" method="GET" name="adminForm">
2173
+ <script language="javascript" type="text/javascript">
2174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2175
 
2176
+ function submitbutton(pressbutton) {
2177
+ var form = document.adminForm;
2178
+ if (pressbutton == 'cancel') {
2179
+ submitform( pressbutton );
2180
+ return;
2181
+ }
2182
 
2183
+ submitform( pressbutton );
 
 
 
 
 
2184
 
2185
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2186
 
2187
  function gotocontact( id ) {
2188
  var form = document.adminForm;
2272
  <form action="index2.php" method="post" name="adminForm">
2273
  <?php
2274
  $tabs = new mosTabs(1);
2275
+ ?>
2276
+
2277
+ <script>
2278
+ $(function() {
2279
+ $( "#tabs" ).tabs().find( ".ui-tabs-nav" ).sortable({ axis: "x" });
2280
+ $( "#radio_dbbackup" ).buttonset();
2281
+ $( "#radio_dbbackup1" ).button( { icons: {primary:'ui-icon-bullet'} } );
2282
+ $( "#radio_dbbackup2" ).button( { icons: {primary:'ui-icon-bullet'} } );
2283
+ });
2284
+ </script>
2285
+
2286
+
2287
+ <ul>
2288
+ <?php
2289
+ if($_CONFIG['enable_db_backup']){
2290
+ ?>
2291
+ <li><a href="#tabs-users-databse-options-tab"><?php echo LM_TAB_G_DATABASE;?></a></li>
2292
+ <?php }?>
2293
+ <li><a href="#tabs-users-files-options-tab"><?php echo LM_TAB_G_FILES;?></a></li>
2294
+ <li><a href="#tabs-users-comments-options-tab"><?php echo LM_TAB_G_COMMENTS;?></a></li>
2295
+ </ul>
2296
+
2297
+ <?php
2298
+ #$tabs->startPane("BGeneratePane");
2299
  if($_CONFIG['enable_db_backup']){
2300
  $tabs->startTab(LM_TAB_G_DATABASE,"users-databse-options-tab");
2301
  ?>
2302
 
2303
+ <div id="radio_dbbackup">
2304
  <table class="adminform">
2305
+ <!--<tr>
2306
  <th colspan=2>
2307
+ <b><?php #echo LM_DATABASE_ARCHIVE; ?></b>
2308
  </th>
2309
+ </tr>-->
 
 
 
2310
  <tr>
2311
+ <td>
2312
+ <label for="radio_dbbackup1"><?php echo LM_CONFIRM_DATABASE; ?></label>
2313
+ <input id="radio_dbbackup1" type="checkbox" id="dbbackup" name="dbbackup" checked value="1" />
2314
+ &nbsp;<label for="radio_dbbackup2">Add DROP SYNTAX</label>
2315
+ <input id="radio_dbbackup2" type="checkbox" id="dbbackup_drop" name="dbbackup_drop" value="1" />
2316
+ </td>
2317
  </tr>
2318
  <tr>
2319
  <td><?php echo "Mysql Compatibility"; ?> &nbsp;
2328
  <?php echo LM_DATABASE_EXCLUDE_TABLES?>
2329
  </th></tr>
2330
  <tr><td>
2331
+ <?php echo LM_DATABASE_CURRENT?> <b><?php echo $_CONFIG['mysql_database'];?></b><br />
2332
  <select name='excltables[]' MULTIPLE SIZE=15>
2333
  <?php
2334
 
2357
 
2358
  while($row = mysql_fetch_array($query)){
2359
 
2360
+ if($_CONFIG['mysql_database'] != $row[0])
2361
+ echo "<option value='".$row[0]."'>$row[0]</option>";
2362
 
2363
  }
2364
 
2372
  ?>
2373
 
2374
  </table>
2375
+ </div>
2376
  <?php
2377
  $tabs->endTab();
2378
  }
2386
  </tr>
2387
  <tr>
2388
  <td>
2389
+ <input type=text name='bname' value='' size=100><br/>
2390
  <?php echo LM_BACKUP_NAME_SUB?>
2391
  </td>
2392
  </tr>
2420
  ?>
2421
 
2422
  </table>
2423
+ <?php
2424
+ $tabs->endTab();
2425
+ $tabs->startTab(LM_TAB_G_COMMENTS,"users-comments-options-tab");
2426
+ ?>
2427
+ <div class="mainText">
2428
+ <h2><?php echo LM_TAB_G_COMMENTS_H2?></h2>
2429
+ <textarea name="backupComments" rows=20 cols=80></textarea>
2430
+ <br /><small> <?php echo LM_TAB_G_COMMENTS_NOTE?></small>
2431
+ </div>
2432
  <?php
2433
  $tabs->endTab();
2434
  $tabs->endPane();
2509
 
2510
  function showHelp( $option ) {
2511
  ?>
2512
+ <script>
2513
+ $(function() {
2514
+ $( "#tabs" ).tabs();
2515
+ });
2516
+ </script>
2517
+
2518
+ <div id="tabs" >
2519
+ <ul>
2520
+ <li><a href="#tabs-1"><?php echo LM_CREDIT_TOP?></a></li>
2521
+ </ul>
2522
+ <div id="tabs-1" >
2523
+ <div class="mainText">
2524
+
2525
+ <?php echo LM_CLONER_ABOUT?>
2526
+ </div>
2527
+ </div>
2528
+ </div>
2529
  <form action="index2.php" name="adminForm" method="post">
2530
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2531
  <input type="hidden" name="task" value=""/>
2540
 
2541
  ?>
2542
 
2543
+ <script>
2544
+ $(function() {
2545
+ $( "#tabs" ).tabs();
2546
+ });
2547
+ </script>
2548
+
2549
+ <div id="tabs">
2550
+ <ul>
2551
+ <li><a href="#tabs-1"><?php echo LM_RESTORE_TOP?></a></li>
2552
+ </ul>
2553
+ <div id="tabs-1"><p class="mainText">
2554
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
2555
+ <tr>
2556
+ <td>
2557
+ <?php echo LM_CLONER_RESTORE?>
2558
+ </td>
2559
+ </tr>
2560
+ </table>
2561
+ </p></div>
2562
+ </div>
2563
  <form action="index2.php" name="adminForm" method="post">
2564
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2565
  <input type="hidden" name="task" value=""/>
2572
  // ----------------------------------------------------------
2573
 
2574
  ?>
2575
+ <script>
2576
+ $(function() {
2577
+ $( "#tabs" ).tabs();
2578
+ });
2579
+ </script>
2580
+
2581
+ <div id="tabs">
2582
+ <ul>
2583
+ <li><a href="#tabs-1"><?php echo LM_CREDIT_TOP?></a></li>
2584
+ </ul>
2585
+ <div id="tabs-1"><p class="mainText">
2586
+ <table border="0" align="center" cellspacing="0" cellpadding="2" width="100%" class="adminform">
2587
+ <tr>
2588
+ <td>
2589
+ <?echo LM_CLONER_CREDITS?>
2590
+ </td>
2591
+ </tr>
2592
+ </table>
2593
+ </p></div>
2594
+ </div>
2595
  <form action="index2.php" name="adminForm" method="post">
2596
  <input type="hidden" name="option" value="<?php echo $option; ?>"/>
2597
  <input type="hidden" name="task" value=""/>
admin.cloner.php CHANGED
@@ -1,202 +1,218 @@
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
  ?>
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
+ //Doing some basic authentification
39
+ if ((!isset($_SESSION['clone'])) && ($task != 'dologin')) {
40
+ $task = 'login';
41
+
42
+ HTML_cloner::header();
43
+
44
+ HTML_cloner::Login();
45
+
46
+ HTML_cloner::footer();
47
+
48
+ exit;
49
+ } elseif ($task == 'dologin') {
50
+ if (($_REQUEST['username'] == $_CONFIG['jcuser']) && (md5($_REQUEST['password']) == $_CONFIG['jcpass'])) {
51
+ if (function_exists('session_register')) {
52
+ @session_register('clone');
53
+ }
54
+ $_SESSION['clone'] = 1;
55
+
56
+ mosRedirect('index2.php?option=' . $option, "Welcome to XCloner backend");
57
+ } else {
58
+
59
+
60
+ mosRedirect('index2.php?option=' . $option, "Incorrect username and/or password");
61
+ }
62
+ }
63
+
64
+ //###########GLOBALS in effect
65
+ $GLOBALS['lang_dir'] = $lang_dir;
66
+ //###########
67
+ $lang_array = get_avalaible_langs();
68
+
69
+
70
+ // retrieve row selection from forms
71
+ $cid = $_REQUEST['cid'];
72
+ if (!is_array($cid)) {
73
+ $cid = array(0);
74
+ }
 
 
 
75
 
76
  if(!$_REQUEST['nohtml'])
77
  if (($task != 'download') and (($_REQUEST['task']!="refresh") or (!$_CONFIG['refresh_mode'])))
78
+ HTML_cloner::header();
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
+ openXLog();
95
+
96
+ // process the workflow selection
97
+ switch ($task) {
98
+ case 'rename_save':
99
+ case 'rename':
100
+ clone_rename($option);
101
+ break;
102
+ case 'action':
103
+ action($option);
104
+ break;
105
+
106
+
107
+ case 'cancel_lang':
108
+ mosRedirect('index2.php?option=' . $option . "&task=lang");
109
+ break;
110
+ case 'add_lang':
111
+ case 'add_lang_new':
112
+ translator_add($option, $task);
113
+ break;
114
+ case 'save_lang_apply':
115
+ case 'save_lang':
116
+ case 'edit_lang':
117
+ translator_edit($option, $task);
118
+ break;
119
+
120
+
121
+ case 'del_lang':
122
+ case 'lang':
123
+ translator($option);
124
+ break;
125
+
126
+ case 'recurse_database';
127
+ goRecurseDatabases();
128
+ break;
129
+
130
+ case 'recurse_files':
131
+ goRecurseFiles();
132
+ break;
133
+
134
+ case 'cleanup':
135
+ include_once("classes/main.class.php");
136
+ $main = new Main();
137
+ $main->init($_CONFIG);
138
+ $main->cleanUp();
139
+ break;
140
+
141
+ case 'refresh':
142
+ generateBackuprefresh($cid, $option, $_REQUEST['backup'], $_CONFIG['refresh_mode']);
143
+ break;
144
+
145
+ case 'generate':
146
+ if($_CONFIG['refresh_mode']){
147
+ $_REQUEST['mode'] = "start";
148
+ if($_CONFIG['enable_db_backup'])
149
+ goRecurseDatabases();
150
+ //initBackup($_REQUEST['bname']);
151
+ //break;
152
+ }
153
+ generateBackup($cid, $option);
154
+ break;
155
+
156
+ case 'confirm':
157
+ deleteXLog();
158
+ confirmBackup($option);
159
+ break;
160
+ case 'download':
161
+ downloadBackup($_REQUEST[file]);
162
+ break;
163
+ case 'cron':
164
+ HTML_cloner::Cron();
165
+ break;
166
+ case 'about':
167
+ case 'credits':
168
+ showHelp($option);
169
+ break;
170
+ case 'restore':
171
+ HTML_cloner::Restore($option);
172
+ break;
173
+
174
+ case 'cron_delete':
175
+ if (unlink($_CONFIG['multiple_config_dir'] . "/" . $_REQUEST['fconfig']))
176
+ $msg = " was deleted";
177
+ else
178
+ $msg = " was not deleted, please delete it manually!";
179
+
180
+ mosRedirect('index2.php?option=' . $option . "&task=config", $_REQUEST['fconfig'] . $msg);
181
+ break;
182
+
183
+ case 'remove':
184
+ deleteBackups($cid, $option);
185
+ break;
186
+ case 'continue':
187
+ case 'move':
188
+ case 'clone':
189
+ moveBackup($option);
190
+ break;
191
+
192
+ case 'cancel':
193
+ mosRedirect('index2.php?option=' . $option);
194
+ break;
195
+ case 'config':
196
+ config($option);
197
+ break;
198
+ case 'rename_cancel':
199
+ mosRedirect('index2.php?option=' . $option . "&task=view");
200
+ break;
201
+ case 'show':
202
+ case 'view':
203
+ showBackups($option);
204
+ break;
205
+ case 'logout':
206
+ doLogout();
207
+ break;
208
+ default:
209
+ fdefault();
210
+ break;
211
+ }
212
+
213
+ closeXLog();
214
+ if(!$_REQUEST['nohtml'])
215
+ HTML_cloner::footer();
216
+
217
+ @mysql_close($link);
218
  ?>
admin.xcloner-backupandrestore.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ print "<iframe src='components/com_xcloner-backupandrestore/index.php' width='100%' height='900' frameborder=0 marginWidth=0 frameSpacing=0 marginHeight=110 ></iframe>";
4
+
5
+ ?>
browser/files_inpage.php CHANGED
@@ -1,18 +1,25 @@
1
  <?php
2
  @ini_set("error_reporting", "2");
3
 
 
 
4
  $thisApp=$_SERVER['PHP_SELF'] . "?browse=true";
5
 
 
 
 
 
 
 
6
  if(isset($_GET['browse'])){
7
  $dir = isset($_GET['dir']) ? $_GET['dir'] : '/files';
8
  if(strpos($dir, "../")===true){
9
  exit;
10
- }
11
-
12
  }else{
13
 
14
  echo "Please wait... we are loading the folder structure";
15
 
16
  }
17
 
18
- ?>
1
  <?php
2
  @ini_set("error_reporting", "2");
3
 
4
+ define("_VALID_MOS", 1);
5
+
6
  $thisApp=$_SERVER['PHP_SELF'] . "?browse=true";
7
 
8
+ $fp = @fopen($_CONFIG['exfile'], "w");
9
+ if($fp){
10
+ @fwrite($fp, $_CONFIG['cron_exclude']);
11
+ @fclose($fp);
12
+ }
13
+
14
  if(isset($_GET['browse'])){
15
  $dir = isset($_GET['dir']) ? $_GET['dir'] : '/files';
16
  if(strpos($dir, "../")===true){
17
  exit;
18
+ }
 
19
  }else{
20
 
21
  echo "Please wait... we are loading the folder structure";
22
 
23
  }
24
 
25
+ ?>
browser/files_xml.php CHANGED
@@ -10,6 +10,14 @@
10
  * Date: November 2010
11
  **/
12
 
 
 
 
 
 
 
 
 
13
  header("Cache-Control: no-cache");
14
  header("Pragma: nocache");
15
  header("Content-Type: text/xml");
@@ -22,7 +30,7 @@ if($_COOKIE["auth_clone"] != 1){
22
  exit;
23
  }
24
 
25
-
26
  include("../cloner.config.php");
27
  include("../common.php");
28
 
@@ -45,15 +53,15 @@ $path = $_REQUEST['path'];
45
  $loc = $_REQUEST['dir'];
46
 
47
  if(!is_dir($_CONFIG['backup_path'])){
48
-
49
  echo "<directory location=\"Error: Directory $_CONFIG[backup_path] does not exist!\"></directory>";
50
  exit;
51
-
52
  }elseif(!is_readable($_CONFIG['backup_path'])){
53
-
54
  echo "<directory location=\"Error: Directory $_CONFIG[backup_path] is not readable!\"></directory>";
55
  exit;
56
-
57
  }
58
 
59
 
@@ -70,8 +78,8 @@ elseif($_REQUEST['act'] == "uncheckall"){
70
 
71
  if($loc == "")
72
  $loc = "/";
73
-
74
-
75
  $data = "";
76
 
77
  if($fp = @fopen($exfile,"r")){
@@ -84,7 +92,6 @@ fclose($fp);
84
  $_COOKIES = explode("\r\n", $data);
85
 
86
 
87
-
88
  $exc = 0;
89
 
90
  if($fp = @fopen($exfile,"w")){
@@ -127,10 +134,10 @@ fclose($fp);
127
 
128
  }
129
  else{
130
-
131
  echo "<directory location=\"Error: Unable to write to file $exfile\"></directory>";
132
  exit;
133
-
134
  }
135
 
136
  $_COOKIES = explode("\r\n", $data);
@@ -187,7 +194,7 @@ sort($exclude);
187
  $check = 'checked';
188
  else
189
  $check = '';
190
-
191
  echo "<file check='$check' link=\"#\">".htmlspecialchars($file)."</file>";
192
 
193
  }
@@ -202,7 +209,7 @@ sort($exclude);
202
 
203
  function check($loc, $exfile, $act ){
204
  global $_CONFIG;
205
-
206
  $fulldir = $loc;
207
  $flist = array();
208
  $_COOKIES = array();
@@ -235,7 +242,7 @@ function check($loc, $exfile, $act ){
235
  if($act == 1){
236
 
237
  $flist = @array_merge($_COOKIES, $flist);
238
-
239
  }
240
  else{
241
 
10
  * Date: November 2010
11
  **/
12
 
13
+ define("_VALID_MOS", 1);
14
+
15
+ session_start();
16
+ if(!isset($_SESSION['clone'])){
17
+ echo "Not Authorized";
18
+ exit;
19
+ }
20
+
21
  header("Cache-Control: no-cache");
22
  header("Pragma: nocache");
23
  header("Content-Type: text/xml");
30
  exit;
31
  }
32
 
33
+
34
  include("../cloner.config.php");
35
  include("../common.php");
36
 
53
  $loc = $_REQUEST['dir'];
54
 
55
  if(!is_dir($_CONFIG['backup_path'])){
56
+
57
  echo "<directory location=\"Error: Directory $_CONFIG[backup_path] does not exist!\"></directory>";
58
  exit;
59
+
60
  }elseif(!is_readable($_CONFIG['backup_path'])){
61
+
62
  echo "<directory location=\"Error: Directory $_CONFIG[backup_path] is not readable!\"></directory>";
63
  exit;
64
+
65
  }
66
 
67
 
78
 
79
  if($loc == "")
80
  $loc = "/";
81
+
82
+
83
  $data = "";
84
 
85
  if($fp = @fopen($exfile,"r")){
92
  $_COOKIES = explode("\r\n", $data);
93
 
94
 
 
95
  $exc = 0;
96
 
97
  if($fp = @fopen($exfile,"w")){
134
 
135
  }
136
  else{
137
+
138
  echo "<directory location=\"Error: Unable to write to file $exfile\"></directory>";
139
  exit;
140
+
141
  }
142
 
143
  $_COOKIES = explode("\r\n", $data);
194
  $check = 'checked';
195
  else
196
  $check = '';
197
+
198
  echo "<file check='$check' link=\"#\">".htmlspecialchars($file)."</file>";
199
 
200
  }
209
 
210
  function check($loc, $exfile, $act ){
211
  global $_CONFIG;
212
+
213
  $fulldir = $loc;
214
  $flist = array();
215
  $_COOKIES = array();
242
  if($act == 1){
243
 
244
  $flist = @array_merge($_COOKIES, $flist);
245
+
246
  }
247
  else{
248
 
browser/xmlhttp.js CHANGED
@@ -35,7 +35,7 @@ function processXMLRequest() {
35
 
36
  function do_browser(){
37
  targetDiv=document.getElementById("browser");
38
-
39
  if(loadXMLDoc("browser/files_xml.php")){
40
  targetDiv.className="searching";
41
  targetDiv.innerHTML="";
@@ -102,7 +102,7 @@ function checkc(value){
102
  function useXML(xmlInfo){
103
  targetDiv.className="";
104
  message = "";
105
-
106
  var infoTags=xmlInfo.getElementsByTagName("directory");
107
  var loc=infoTags[0].getAttribute("location");
108
  if(loc == "")
@@ -124,11 +124,11 @@ function useXML(xmlInfo){
124
 
125
  var newloc="browser/files_xml.php?dir=" + loc ;
126
  path = loc+"/"+node.firstChild.nodeValue;
127
-
128
  if(node.nodeName=="file"){
129
 
130
  stringHTML=stringHTML+"<li class=\"file\"><img src='browser/file.gif' border='0'><input type=checkbox "+node.getAttribute('check')+" onclick=\"loadXMLDoc('" + newloc +"&amp;path="+path+"')\" name=cid[] value='"+path+"'><a href=\"" +node.getAttribute('link')+ "\">"+node.firstChild.nodeValue+"</a></li>";
131
-
132
  }
133
  if(node.nodeName=="message"){
134
 
@@ -150,5 +150,5 @@ function useXML(xmlInfo){
150
  }
151
 
152
  //stringHTML = stringHTML+ "</form>";
153
- targetDiv.innerHTML= "<table align='right' width='200'><tr><td align='right'><b>" + "Excluded items list:" + "</b><br />"+ message+"</td></tr></table>" + stringHTML ;
154
  }
35
 
36
  function do_browser(){
37
  targetDiv=document.getElementById("browser");
38
+
39
  if(loadXMLDoc("browser/files_xml.php")){
40
  targetDiv.className="searching";
41
  targetDiv.innerHTML="";
102
  function useXML(xmlInfo){
103
  targetDiv.className="";
104
  message = "";
105
+
106
  var infoTags=xmlInfo.getElementsByTagName("directory");
107
  var loc=infoTags[0].getAttribute("location");
108
  if(loc == "")
124
 
125
  var newloc="browser/files_xml.php?dir=" + loc ;
126
  path = loc+"/"+node.firstChild.nodeValue;
127
+
128
  if(node.nodeName=="file"){
129
 
130
  stringHTML=stringHTML+"<li class=\"file\"><img src='browser/file.gif' border='0'><input type=checkbox "+node.getAttribute('check')+" onclick=\"loadXMLDoc('" + newloc +"&amp;path="+path+"')\" name=cid[] value='"+path+"'><a href=\"" +node.getAttribute('link')+ "\">"+node.firstChild.nodeValue+"</a></li>";
131
+
132
  }
133
  if(node.nodeName=="message"){
134
 
150
  }
151
 
152
  //stringHTML = stringHTML+ "</form>";
153
+ targetDiv.innerHTML= "<table align='right' width='450'><tr><td align='right'><b>" + "Excluded items list:" + "</b><br />"+ message+"</td></tr></table>" + stringHTML ;
154
  }
classes/S3.php CHANGED
@@ -28,6 +28,9 @@
28
  * Amazon S3 is a trademark of Amazon.com, Inc. or its affiliates.
29
  */
30
 
 
 
 
31
  /**
32
  * Amazon S3 PHP class
33
  *
@@ -794,7 +797,7 @@ class S3 {
794
  }
795
  array_push($policy->conditions, array('content-length-range', 0, $maxFileSize));
796
  $policy = base64_encode(str_replace('\/', '/', json_encode($policy)));
797
-
798
  // Create parameters
799
  $params = new stdClass;
800
  $params->AWSAccessKeyId = self::$__accessKey;
28
  * Amazon S3 is a trademark of Amazon.com, Inc. or its affiliates.
29
  */
30
 
31
+ /** ensure this file is being included by a parent file */
32
+ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
33
+
34
  /**
35
  * Amazon S3 PHP class
36
  *
797
  }
798
  array_push($policy->conditions, array('content-length-range', 0, $maxFileSize));
799
  $policy = base64_encode(str_replace('\/', '/', json_encode($policy)));
800
+
801
  // Create parameters
802
  $params = new stdClass;
803
  $params->AWSAccessKeyId = self::$__accessKey;
administrator/backups/.excl → classes/error.class.php RENAMED
File without changes
classes/fileRecursion.php CHANGED
@@ -27,6 +27,7 @@ class fileRecursion{
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");
@@ -39,17 +40,22 @@ class fileRecursion{
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
@@ -74,6 +80,7 @@ class fileRecursion{
74
 
75
  self::$fp = fopen(self::$TEMP_PERM, "a");
76
  self::$fpd = fopen(self::$TEMP_D_ARR, "w");
 
77
 
78
  self::initEXCL();
79
 
@@ -84,6 +91,20 @@ class fileRecursion{
84
 
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  /*
88
  * Count the number of files saved in TEMP_PERM
89
  * name: countPermFiles
@@ -327,6 +348,23 @@ class fileRecursion{
327
 
328
  }
329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  /*
331
  * Writing file details(path, permissions, size) to file
332
  *
@@ -338,12 +376,23 @@ class fileRecursion{
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
  }
27
 
28
  private static $fp;
29
  private static $fpd;
30
+ private static $fpe;
31
  private static $d_arr;
32
  private static $f_arr;
33
  private static $BACKUP_EXTENSIONS = array("tar", "zip", "tgz", "tar.gz");
40
  public static $TEMP_EXCL = "tmp/.excl";
41
  public static $TEMP_DIR = "/opt/lampp/htdocs/joomla/administrator/backups"; //exclude other backups
42
  public static $START_DIR = "/"; # Backups Start Dir
43
+ public static $EXCLUDE_FILES_SIZE = -1; //disabled
44
+ public static $TEMP_OVERSIZED_FILE = "tmp/.oversized_files";
45
 
46
 
47
 
48
+ public static function setData($data) {
49
 
50
+ self::$TEMP_PERM = $data['TEMP_PERM'];
51
+ self::$TEMP_EXCL = $data['TEMP_EXCL'];
52
+ self::$TEMP_D_ARR = $data['TEMP_D_ARR'];
53
+ self::$TEMP_DIR = $data['TEMP_DIR'];
54
+ self::$START_DIR = $data['START_DIR'];
55
+ self::$EXCLUDE_FILES_SIZE = $data['EXCLUDE_FILES_SIZE'];
56
+ self::$TEMP_OVERSIZED_FILE = $data['TEMP_OVERSIZED_FILE'];
57
  }
58
+
59
  /*
60
  * Init the recursion system
61
  * name: init
80
 
81
  self::$fp = fopen(self::$TEMP_PERM, "a");
82
  self::$fpd = fopen(self::$TEMP_D_ARR, "w");
83
+ self::$fpe = fopen(self::$TEMP_OVERSIZED_FILE, "a");
84
 
85
  self::initEXCL();
86
 
91
 
92
  }
93
 
94
+ /*
95
+ * We close the stuff left opened
96
+ * name: close
97
+ * @param
98
+ * @return
99
+ */
100
+ public static function close(){
101
+
102
+ @fclose(self::$fp );
103
+ @fclose(self::$fpd );
104
+ @fclose(self::$fpe );
105
+
106
+ }
107
+
108
  /*
109
  * Count the number of files saved in TEMP_PERM
110
  * name: countPermFiles
348
 
349
  }
350
 
351
+ public static function getOverLimitFiles(){
352
+ @fclose(self::$fpe);
353
+ $files = explode("\n", file_get_contents(self::$TEMP_OVERSIZED_FILE));
354
+
355
+ return array_diff($files, array(""));
356
+ }
357
+
358
+ public static function writeExcludedFile($file, $fsize = 0){
359
+
360
+ self::debug("Excluded $file from list as it is bigger than ". self::$EXCLUDE_FILES_SIZE." MB!!!");
361
+
362
+ if(self::$fpe){
363
+ fwrite(self::$fpe, $file."\t(".$fsize." bytes)\n");
364
+ }
365
+
366
+ }
367
+
368
  /*
369
  * Writing file details(path, permissions, size) to file
370
  *
376
  public static function writePermFile($file, $append = "", $force = 0){
377
 
378
  $file = realpath($file);
379
+
380
  if((self::isNotExcluded($file)) or ($force)){
381
+ // we check if file is not excluded
382
  $fperm = substr(sprintf('%o', @fileperms($file)), -4);
383
  $fsize = self::getFileSize($file);
384
+ $sizeLimit = (self::$EXCLUDE_FILES_SIZE)*1024*1024; // we limit by MB
385
+
386
+ if(intval(self::$EXCLUDE_FILES_SIZE) > -1){
387
+ if(($fsize > $sizeLimit) and is_file($file)){
388
+ //we check if file is larger than $EXCLUDE_FILES_SIZE
389
+ self::writeExcludedFile($file, $fsize);
390
+ return;
391
+ }
392
+ }
393
+
394
  $file = str_replace(self::$START_DIR, "", str_replace("\\","/", $file));
395
+
396
  fwrite(self::$fp, $file."|".$fperm."|".$fsize."|".$append."\n");
397
  self::debug($file ." added to list");
398
  }
classes/index.html CHANGED
File without changes
classes/main.class.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * main.class.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
+ class Main{
24
+
25
+ public static $_CONFIG;
26
+
27
+
28
+ /*
29
+ *
30
+ * name: init
31
+ * @param
32
+ * @return
33
+ */
34
+ public static function init($_CONFIG){
35
+ self::$_CONFIG = $_CONFIG;
36
+ }
37
+
38
+ /*
39
+ *
40
+ * name: unknown
41
+ * @param
42
+ * @return
43
+ */
44
+ public static function initBackup($backupName){
45
+
46
+ self::generateBackupName($backupName);
47
+
48
+ }
49
+
50
+ /*
51
+ * Will cleanup the temporary directory
52
+ *
53
+ * name: cleanUp
54
+ * @param
55
+ * @return
56
+ */
57
+ public static function cleanUp(){
58
+
59
+ $dir = self::$_CONFIG['temp_dir'] ;
60
+
61
+ if (@is_dir($dir)) {
62
+ if ($dh = @opendir($dir)) {
63
+ while (($file = @readdir($dh)) !== false) {
64
+ if(($file!=".") and ($file!="..")){
65
+ if(($file[0] == ".") and ($file[0] != ".htaccess"))
66
+ //cleanup temp files
67
+ @unlink($dir."/".$file);
68
+ elseif(strstr( $file, "-sql.sql") != "")
69
+ //cleanup sql files
70
+ @unlink($dir."/".$file);
71
+
72
+ }
73
+ }
74
+ closedir($dh);
75
+ }
76
+ }
77
+
78
+ }
79
+
80
+ public static function generateBackupName($backupName, $backupDatabase = 0, $dbbackup_drop = 0){
81
+
82
+ $domainname = $_SERVER['HTTP_HOST'];
83
+
84
+ if ((self::$_CONFIG['mem']) && ($_CONFIG['backup_refresh'])) {
85
+ $f_ext = '.tar';
86
+ $_CONFIG['tarcompress'] = '';
87
+ } elseif (self::$_CONFIG['backup_compress']) {
88
+ $f_ext = '.tgz';
89
+ $_CONFIG['tarcompress'] = 'z';
90
+ } else {
91
+ $f_ext = '.tar';
92
+ $_CONFIG['tarcompress'] = '';
93
+ }
94
+
95
+
96
+ if ($backupName == "") {
97
+ if ($backupDatabase == 1) {
98
+ if ($_REQUEST['dbbackup_drop']) {
99
+ $filename = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-sql-drop' . $f_ext;
100
+ } else {
101
+ $filename = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-sql-nodrop' . $f_ext;
102
+ }
103
+ } else
104
+ $filename = 'backup_' . date("Y-m-d_H-i") . '_' . $domainname . '-nosql' . $f_ext;
105
+ } else {
106
+ $filename = $_REQUEST['bname'] . $f_ext;
107
+ }
108
+
109
+ return $filename;
110
+
111
+ }
112
+
113
+ }
114
+
115
+
116
+ ?>
classes/mysqlBackup.class.php ADDED
@@ -0,0 +1,488 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * mysqlBackup.class.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 DB{
25
+
26
+ public static $dbHostname = "localhost";
27
+ public static $dbUsername = "root";
28
+ public static $dbPassword = "";
29
+ public static $dbDatabase = "";
30
+ public static $excludedTables = array();
31
+
32
+ public static $debug = 0;
33
+ public static $recordsPerSession = 10000;
34
+ public static $dbCompatibility = "";
35
+ public static $dbDropSyntax = 0;
36
+ public static $countRecords = 0;
37
+
38
+ private static $link;
39
+ private static $db_selected;
40
+
41
+ public static $TEMP_DBPROCESS_FILE = "tmp/.database";
42
+ public static $TEMP_DUMP_FILE = "tmp/database-sql.sql";
43
+
44
+ /*
45
+ *Return any error
46
+ *
47
+ * name: error
48
+ * @param string $message
49
+ * @return
50
+ */
51
+ public function error($message, $force = ""){
52
+
53
+ $return = "";
54
+ $date = date("M j, Y @ H:i:s");
55
+
56
+ if((self::$debug) && ($force)){
57
+ //we have debug message as force is 1
58
+ printf("Debug(%s) - %s \n", $date, $message);
59
+ }
60
+
61
+ if(!$force){
62
+ //we have an error message
63
+ printf("Error(%s) - %s \n", $date, $message);
64
+ }
65
+
66
+ return;
67
+
68
+ }
69
+
70
+ /*
71
+ * Initialize the database connection
72
+ *
73
+ * name: init
74
+ * @param array $data {'dbHostname', 'dbUsername', 'dbPassword', 'dbDatabase'}
75
+ * @return
76
+ */
77
+ public function init($data, $start = 0){
78
+
79
+ self::$dbHostname = $data['dbHostname'];
80
+ self::$dbUsername = $data['dbUsername'];
81
+ self::$dbPassword = $data['dbPassword'];
82
+ self::$dbDatabase = $data['dbDatabase'];
83
+ self::$excludedTables = $data['excludedTables'];
84
+ self::$TEMP_DBPROCESS_FILE = $data['TEMP_DBPROCESS_FILE'];
85
+ self::$TEMP_DUMP_FILE = $data['TEMP_DUMP_FILE'];
86
+ self::$recordsPerSession = $data['recordsPerSession'];
87
+ self::$dbCompatibility = $data['dbCompatibility'];
88
+ self::$dbDropSyntax = $data['dbDropSyntax'];
89
+
90
+ self::connect();
91
+ self::headers();
92
+
93
+ if($start){
94
+ @unlink(self::$TEMP_DBPROCESS_FILE);
95
+ }
96
+
97
+ }
98
+
99
+ /*
100
+ * Connect to the database
101
+ *
102
+ * name: connect
103
+ * @param
104
+ * @return
105
+ */
106
+ public function connect(){
107
+
108
+ self::$link = mysql_connect(self::$dbHostname, self::$dbUsername, self::$dbPassword);
109
+ if (!self::$link) {
110
+ self::error('Could not connect: ' . mysql_error());
111
+ }
112
+
113
+ if(self::$dbDatabase != ""){
114
+ self::$db_selected = mysql_select_db(self::$dbDatabase, self::$link);
115
+ if (!self::$db_selected) {
116
+ self::error ('Can\'t use foo : ' . mysql_error());
117
+ }
118
+ }
119
+
120
+ }
121
+
122
+ /*
123
+ * Disconnect from the database
124
+ *
125
+ * name: disconnect
126
+ * @param
127
+ * @return
128
+ */
129
+ public function disconnect(){
130
+
131
+ mysql_close(self::$link);
132
+
133
+ }
134
+
135
+ /*
136
+ * Send some special headers after the connection is initialized
137
+ *
138
+ * name: headers
139
+ * @param
140
+ * @return
141
+ */
142
+ private function headers(){
143
+
144
+ self::query("SET SQL_QUOTE_SHOW_CREATE=1;");
145
+ self::query("SET sql_mode = 0;");
146
+ mysql_set_charset('utf8', self::$link);
147
+ if (self::$dbCompatibility)
148
+ self::query("SET sql_mode=" . self::$dbCompatibility . ";");
149
+
150
+ }
151
+
152
+ /*
153
+ * Run a mysql qeury
154
+ *
155
+ * name: query
156
+ * @param string $query Query to run
157
+ * @return $result or false
158
+ */
159
+ public function query($query){
160
+
161
+ $result = mysql_query($query.";", self::$link);
162
+ self::error($query, 1);
163
+
164
+ if (!$result) {
165
+ self::error('Invalid query: ' . mysql_error());
166
+ return false;
167
+ }
168
+ else{
169
+ return $result;
170
+ }
171
+
172
+ }
173
+
174
+
175
+ /*
176
+ * Returns an array of tables from a database and mark $2excluded ones
177
+ *
178
+ * name: lisTables
179
+ * @param array $excluded array of tables to mark as excluded
180
+ * @return array $tablesList
181
+ */
182
+ public function listTables($excluded){
183
+
184
+ $tablesList = array("");
185
+ $inc = 0;
186
+
187
+ $result = self::query("SHOW TABLES in `".self::$dbDatabase."`");
188
+
189
+ while ($row = mysql_fetch_array($result)){
190
+ $tablesList[$inc]['table'] = $row[0];
191
+
192
+ if(is_array($excluded))
193
+ if( in_array($row[0], $excluded) )
194
+ $tablesList[$inc]['excluded'] = 1;
195
+ $inc++;
196
+ }
197
+
198
+ return $tablesList;
199
+
200
+ }
201
+
202
+ public function writeTempFile(){
203
+
204
+ $tables = self::listTables(self::$excludedTables);
205
+
206
+ $fp = fopen(self::$TEMP_DBPROCESS_FILE, "a");
207
+
208
+ if($fp){
209
+
210
+ fwrite($fp, sprintf("###newdump###\t%s\t%s\n", self::$dbDatabase, self::$TEMP_DUMP_FILE));
211
+
212
+ // write this to the class and write to $TEMP_DBPROCESS_FILE file as database.table records
213
+ foreach($tables as $key=>$table) if($table!= ""){
214
+
215
+ $tables[$key]['records'] = 0;
216
+
217
+ if(!$tables[$key]['excluded'])
218
+ $tables[$key]['records'] = self::countRecords($tables[$key]['table']);
219
+
220
+ $tmp = sprintf("`%s`.`%s`\t%s\t%s\n", self::$dbDatabase, $tables[$key]['table'], $tables[$key]['records'], $tables[$key]['excluded']);
221
+ fwrite($fp, $tmp);
222
+ }
223
+
224
+ fwrite($fp, "###enddump###\n");
225
+ fclose($fp);
226
+ }
227
+ else{
228
+ self::error("Unable to open for writing file ".self::$TEMP_DBPROCESS_FILE);
229
+ }
230
+
231
+ }
232
+
233
+ /*
234
+ * Returns the number of records from a table
235
+ *
236
+ * name: countRecords
237
+ * @param string $table - the source table
238
+ * @return int $count
239
+ */
240
+ public function countRecords($table){
241
+
242
+ $table = "`".self::$dbDatabase."`.`$table`";
243
+
244
+ $result = self::query("SELECT count(*) FROM $table;");
245
+
246
+ $count = mysql_fetch_row($result);
247
+
248
+ return intval($count[0]) ;// not max limit on 32 bit systems 2147483647; on 64 bit 9223372036854775807
249
+
250
+ }
251
+
252
+ /*
253
+ * Processing the mysql backup incrementally
254
+ *
255
+ * name: processIncremental
256
+ * @param
257
+ * int $startAtLine - at which line from the perm.txt file to start reading
258
+ * int startAtRecord - at which record to start from the table found at $startAtLine
259
+ * string $dumpfie - where to save the data
260
+ * string $dbCompatibility - MYSQL40, MYSQ32, none=default
261
+ * int $dbDropSyntax - check if the DROP TABLE syntax should be added
262
+ * @return array $return
263
+ */
264
+ public function processIncremental($startAtLine= 0, $startAtRecord = 0, $dumpfile = "", $dbCompatibility= "", $dbDropSyntax= ""){
265
+
266
+ $count = 0;
267
+ $return = array();
268
+
269
+ self::error("Starting new process at line $startAtLine from record $startAtRecord", 1);
270
+
271
+ $fp = fopen(self::$TEMP_DBPROCESS_FILE, "r");
272
+ if($fp){
273
+
274
+ while (($buffer = fgets($fp, 4096)) !== false){
275
+
276
+ if($count == $startAtLine){
277
+
278
+ $buffer = str_replace("\n", "", $buffer);
279
+ $tableInfo =explode("\t", $buffer);
280
+ //print_r($tableInfo);
281
+ if($tableInfo[0] == "###newdump###"){
282
+ // we create a new mysql dump file
283
+ if($dumpfile != ""){
284
+ // we finished a previous one and write the footers
285
+ $return['dumpsize'] = self::dataFooters($dumpfile);
286
+ }
287
+
288
+ $dump = fopen($tableInfo[2], "w");
289
+ fwrite($dump, self::dataHeaders($tableInfo[1]));
290
+ $startAtLine++;
291
+ fclose($dump);
292
+ $dumpfile = $tableInfo[2];
293
+
294
+ $return['newDump'] = 1;
295
+ //break;
296
+ }
297
+ else{
298
+ //we export the table
299
+ if($tableInfo[0] == "###enddump###")
300
+ $return['endDump'] = 1;
301
+
302
+ $fd = fopen($dumpfile, "a");
303
+
304
+ if($fd){
305
+
306
+ $next = $startAtRecord + self::$recordsPerSession;
307
+ // $tableInfo[1] number of records in the table
308
+ $table = explode("`.`", $tableInfo[0]);
309
+ $tableName = str_replace("`", "", $table[1]);
310
+ $databaseName = str_replace("`", "", $table[0]);
311
+
312
+ //return something to the browser
313
+ $return['tableName'] = $tableName;
314
+ $return['databaseName'] = $databaseName;
315
+ $return['totalRecords'] = $tableInfo[1];
316
+
317
+ //if(intval($return['totalRecords']) != 0)
318
+ if(trim($tableName) != "")
319
+ self::exportTable($databaseName, $tableName, $startAtRecord, self::$recordsPerSession, $fd);
320
+
321
+ fclose($fd);
322
+
323
+ if($next > $tableInfo[1]) //we finished loading the records for next sessions, will go to the new record
324
+ {
325
+ $startAtLine ++;
326
+ $startAtRecord = 0;
327
+ }else{
328
+ $startAtRecord = $startAtRecord + self::$recordsPerSession;
329
+ }
330
+
331
+ //$return['dbCompatibility'] = self::$dbCompatibility;
332
+ //$return['dbDropSyntax'] = self::$dbDropSyntax;
333
+ $return['startAtLine'] = $startAtLine;
334
+ $return['startAtRecord'] = $startAtRecord;
335
+ $return['dumpfile'] = $dumpfile;
336
+
337
+ return $return;
338
+ break;
339
+
340
+ }else{
341
+ self::error("Unable to open for writing file $dumpfile");
342
+ }
343
+ }
344
+
345
+ }
346
+
347
+ $count++;
348
+
349
+
350
+ }
351
+
352
+ //while is finished, lets go home...
353
+ if($dumpfile != ""){
354
+ // we finished a previous one and write the footers
355
+ $return['dumpsize'] = self::dataFooters($dumpfile);
356
+ }
357
+ $return['finished'] = 1;
358
+ $return['startAtLine'] = $startAtLine;
359
+
360
+ return $return;
361
+
362
+ }else{
363
+ self::error("Unable to open for reading file ".self::$TEMP_DBPROCESS_FILE);
364
+ }
365
+
366
+
367
+ }
368
+
369
+
370
+ /*
371
+ * Exporting the table records
372
+ *
373
+ * name: exportTable
374
+ * @param
375
+ * string $databaseName - database name of the table
376
+ * string tableName - table name
377
+ * int $start - where to start from
378
+ * int $limit - how many records
379
+ * handler $fd - file handler where to write the records
380
+ * @return
381
+ */
382
+ public function exportTable($databaseName, $tableName, $start, $limit, $fd){
383
+
384
+ if($start == 0)
385
+ self::dumpStructure($databaseName, $tableName, $fd);
386
+
387
+ $start = intval($start);
388
+ $limit = intval($limit);
389
+ //exporting the table content now
390
+
391
+ $result = self::query("SELECT * from `$databaseName`.`$tableName` Limit $start, $limit ;");
392
+ if($result){
393
+ while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
394
+
395
+ fwrite($fd, "INSERT INTO `$tableName` VALUES (");
396
+ $arr = $row;
397
+ $buffer = "";
398
+ self::$countRecords++;
399
+
400
+ foreach ($arr as $key => $value) {
401
+ $value = mysql_escape_string($value);
402
+ $buffer .= "'".$value."', ";
403
+ }
404
+ $buffer = rtrim($buffer, ', ') . ");\n";
405
+ fwrite($fd, $buffer);
406
+ unset($buffer);
407
+
408
+ }
409
+ }
410
+
411
+ }
412
+
413
+ public function dumpStructure($databaseName, $tableName ,$fd){
414
+
415
+ fwrite($fd, "\n#\n# Table structure for table `$tableName`\n#\n\n");
416
+
417
+ if (self::$dbDropSyntax)
418
+ fwrite($fd, "\nDROP table IF EXISTS `$tableName`;\n");
419
+
420
+ $result = self::query("SHOW CREATE table `$databaseName`.`$tableName`;");
421
+ if($result){
422
+ $row = mysql_fetch_row($result);
423
+ fwrite($fd, $row[1].";\n");
424
+ }
425
+
426
+ fwrite($fd, "\n#\n# End Structure for table `$tableName`\n#\n\n");
427
+ fwrite($fd, "#\n# Dumping data for table `$tableName`\n#\n\n");
428
+ return;
429
+
430
+ }
431
+
432
+ public function dataFooters($dumpfile){
433
+
434
+ // we finished the dump file, not return the size of it
435
+ $ftemp = fopen($dumpfile, "a");
436
+ if($ftemp){
437
+ fwrite($ftemp, "\n#\n# Finished at: ".date("M j, Y \a\\t H:i")."\n#");
438
+ fclose($ftemp);
439
+ }else{
440
+ self::error("Unable to open file $ftemp for writing");
441
+ }
442
+
443
+ return sprintf("%u", filesize($dumpfile));
444
+
445
+ }
446
+
447
+ public function resetcountRecords(){
448
+ self::$countRecords = 0;
449
+
450
+ return self::$countRecords;
451
+ }
452
+
453
+ public function getcountRecords(){
454
+ return self::$countRecords;
455
+ }
456
+
457
+
458
+ public function dataHeaders($database){
459
+
460
+ $return = "";
461
+
462
+ $return .= "#\n";
463
+ $return .= "# Powered by XCloner Site Backup\n";
464
+ $return .= "# http://www.xcloner.com\n";
465
+ $return .= "#\n";
466
+ $return .= "# Host: " . $_SERVER['HTTP_HOST'] . "\n";
467
+ $return .= "# Generation Time: " . date("M j, Y \a\\t H:i") . "\n";
468
+ $return .= "# PHP Version: " . phpversion() . "\n";
469
+ $return .= "# Mysql Compatibility: ". self::$dbCompatibility . "\n";
470
+
471
+ $result = self::query("SHOW VARIABLES LIKE \"%version%\";");
472
+ if($result){
473
+ while($row = mysql_fetch_array($result)){
474
+
475
+ $return .= "# MYSQL ".$row[0].": ".$row[1]."\n";
476
+
477
+ }
478
+ }
479
+
480
+ $return .= "#\n# Database : `" . $database . "`\n# --------------------------------------------------------\n\n";
481
+ return $return;
482
+
483
+ }
484
+
485
+
486
+ }
487
+
488
+ ?>
cloner.config.php CHANGED
@@ -39,6 +39,9 @@ $_CONFIG['sqldump']="mysqldump --quote-names ";
39
  $_CONFIG['system_dlink']="";
40
  $_CONFIG['system_ftptransfer']="0";
41
  $_CONFIG['system_mdatabases']="0";
 
 
 
42
 
43
  ### Defaults
44
  $script_dir = str_replace("\\","/",dirname(__FILE__));
39
  $_CONFIG['system_dlink']="";
40
  $_CONFIG['system_ftptransfer']="0";
41
  $_CONFIG['system_mdatabases']="0";
42
+ $_CONFIG['recordsPerSession']= "10000";
43
+ $_CONFIG['excludeFilesSize'] = "-1";
44
+ $_CONFIG['splitBackupSize'] = "2048"; //MB
45
 
46
  ### Defaults
47
  $script_dir = str_replace("\\","/",dirname(__FILE__));
cloner.cron.php CHANGED
@@ -18,36 +18,53 @@ define( '_VALID_MOS', 1 );
18
  include_once("admin.cloner.html.php");
19
  include_once("cloner.functions.php");
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  $script_dir = str_replace("\\","/",dirname(__FILE__));
23
  if(is_dir($script_dir)){
24
-
25
  chdir($script_dir);
26
 
27
  }
28
 
29
  if($_REQUEST['config'] == ""){
30
-
31
  if($argv[1] != ""){
32
-
33
- $_REQUEST['config'] = $argv[1];
34
-
35
  }
36
 
37
 
38
  }
39
 
40
  if($_REQUEST['config'] != ""){
41
-
42
  require_once( './configs/'.$_REQUEST['config'] );
43
-
44
  $smsg = "Using configs/".$_REQUEST['config']." as configuration file";
45
-
46
  }
47
  else{
48
 
49
  @require_once( './cloner.config.php' );
50
-
51
  $smsg = "Using default configuration file";
52
 
53
  }
@@ -74,7 +91,7 @@ if($_CONFIG['select_lang']!="")
74
  if (file_exists( "language/".$mosConfig_lang.".php" )) {
75
  include_once( "language/".$mosConfig_lang.".php" );
76
  @include_once( "language/english.php" );
77
- }
78
  else{
79
  include_once( "language/english.php" );
80
  }
@@ -82,16 +99,16 @@ else{
82
 
83
 
84
  ####### VERIFY IP ACCESS
85
- $ip_list = @explode("\r\n", $_CONFIG['cron_ip']);
86
  $ip_list[] = $_SERVER['SERVER_ADDR'];
87
  $curent_ip = $_SERVER["REMOTE_ADDR"];
88
 
89
  if(!in_array($curent_ip, $ip_list)){
90
-
91
  echo "Access Denied for ip $curent_ip!";
92
  exit;
93
-
94
- }
95
  #########################
96
 
97
  $access=1;
@@ -104,14 +121,14 @@ $_REQUEST['databases_incl'] = @explode(",",$_CONFIG[databases_incl_list]);
104
 
105
  if($_CONFIG[cron_bname]!="")
106
  $_REQUEST['bname'] = $_CONFIG[cron_bname];
107
-
108
-
109
  function logxx($string = ""){
110
-
111
- global $mail_log;
112
 
113
  $return = "<b>$string</b><br />\r\n";
114
-
115
  $mail_log .= $return;
116
 
117
  echo $return;
@@ -131,8 +148,8 @@ logxx("Starting XCloner for site $mosConfig_live_site at ".date("Y-m-d H:i"));
131
  #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludefolders, '');
132
  #$excludedFolders = confirmBackup('nohtml');
133
  #logxx("Done");
134
-
135
-
136
 
137
  if($_CONFIG['cron_btype']==0){
138
  $_REQUEST[dbbackup] = 1;
@@ -154,7 +171,7 @@ if($_CONFIG['cron_btype']==2){
154
  $GLOBALS['_CONFIG'] = $_CONFIG;
155
  $_REQUEST[cron_dbonly] = 1;
156
  #}
157
-
158
  logxx("Creating an sql only backup");
159
  $msg = "database backup";
160
  }
@@ -183,7 +200,7 @@ $destination_files[] = $_CONFIG[cron_ftp_path]."/".$file;
183
  list($fhost, $fport) = explode(":",$_CONFIG[cron_ftp_server]);
184
  if($fport == "")
185
  $fport = '21';
186
-
187
  $ftp_timeout = '3600';
188
 
189
  // set up basic connection
@@ -248,7 +265,7 @@ if($_CONFIG[cron_ftp_delb]==1){
248
  @unlink($source_file);
249
  logxx("Backup succesfully deleted from the original server!");
250
  }
251
-
252
  ##############################################################################
253
  }
254
  elseif($_CONFIG['cron_send']==2){
@@ -262,19 +279,19 @@ elseif($_CONFIG['cron_send']==2){
262
  Attached is the backup generated on $date
263
  Source Filename: $source_file
264
  Server: $mosConfig_live_site
265
-
266
- Powered by http://www.xcloner.com - Xcloner - Backup and Restore made easy!
267
  </pre>
268
 
269
  ";
270
-
271
  $ok = send_mail($mosConfig_mailfrom, "XCloner $msg", $message, $_CONFIG['cron_email_address'], $source_file);
272
-
273
  #echo mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $_CONFIG['cron_email_address'], "XCloner $msg", $message, $mode, '', '' );
274
  if($ok)
275
  logxx("Mail sent to ".$_CONFIG['cron_email_address']);
276
  else
277
- logxx("There was an error in sending the mail cron to ".$_CONFIG['cron_email_address']);
278
 
279
  ##############################################################################
280
  }
@@ -332,27 +349,27 @@ delete_older_backups($clonerPath);
332
 
333
  $logemail = explode(";", $_CONFIG['cron_logemail']);
334
  if(sizeof($logemail)>0){
335
-
336
  for($i=0; $i<sizeof($logemail);$i++){
337
-
338
  $email = trim($logemail[$i]);
339
  if($email != ""){
340
-
341
  $email_subject = "cron log ".time();
342
-
343
  $headers ="From: \"Cronlog XCloner\" <nobody@noreply.com>\n";
344
 
345
  if(mail($email, $email_subject, strip_tags($mail_log), $headers)){
346
-
347
  logxx ("Notification Mail was sent to $email");
348
-
349
  }
350
-
351
-
352
  }
353
-
354
  }
355
-
356
  }
357
 
358
  logxx("<br />\n\nALL DONE! I will exit now from cron.");
@@ -374,78 +391,78 @@ getBackupFiles($d_arr, $f_arr, $s_arr, $d, $f);
374
  if(is_array($f_arr))
375
  foreach($f_arr as $file)
376
  if(($file!='.')&&($file != '..')){
377
-
378
  #logxx("Processing backup file $file");
379
  $cfile = $_CONFIG['clonerPath']."/".$file;
380
-
381
  $filemtime = filemtime($cfile) ;
382
-
383
  $ftime= $filemtime + $_CONFIG['cron_file_delete']*24*60*60;
384
-
385
  $ctime = time();
386
-
387
  if($ftime < $ctime){
388
-
389
  if(unlink($cfile))
390
  logxx("Deleted backup file $file created on ".date("Y-m-d", $filemtime));
391
  else
392
  logxx("Could not delete backup file $file, please delete it manually");
393
-
394
  }
395
-
396
  }
397
 
398
  }
399
 
400
  function send_mail($email_from, $email_subject, $email_txt, $email_to, $fileatt){
401
- $fileatt_type = "application/octet-stream"; // File Type
402
- $fileatt_name = basename($fileatt); // Filename that will be used for the file as the attachment
403
  $data = "";
404
 
405
- $headers = "From: \"Cronbackup XCloner\" <".$email_from.">";
406
 
407
  if($fileatt != ""){
408
-
409
  if($file = @fopen($fileatt,'rb')){
410
-
411
  $data = fread($file,filesize($fileatt));
412
-
413
  fclose($file);
414
 
415
- }
416
  else{
417
  logxx("Unable to open file $fileatt");
418
  }
419
 
420
  }
421
 
422
- $semi_rand = md5(time());
423
- $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
424
-
425
- $headers .= "\nMIME-Version: 1.0\n" .
426
- "Content-Type: multipart/mixed;\n" .
427
- " boundary=\"{$mime_boundary}\"";
428
 
429
- $email_message .= "This is a multi-part message in MIME format.\n\n" .
430
- "--{$mime_boundary}\n" .
431
- "Content-Type:text/html; charset=\"iso-8859-1\"\n" .
432
- "Content-Transfer-Encoding: 7bit\n\n" .
433
- $email_txt . "\n\n";
434
 
435
- $data = chunk_split(base64_encode($data));
 
 
 
 
436
 
437
- $email_message .= "--{$mime_boundary}\n" .
438
- "Content-Type: {$fileatt_type};\n" .
439
- " name=\"{$fileatt_name}\"\n" .
440
- //"Content-Disposition: attachment;\n" .
441
- //" filename=\"{$fileatt_name}\"\n" .
442
- "Content-Transfer-Encoding: base64\n\n" .
443
- $data . "\n\n" .
444
- "--{$mime_boundary}--\n";
445
 
446
- $ok = mail($email_to, $email_subject, $email_message, $headers);
 
 
 
 
 
 
 
 
 
447
 
448
  return $ok;
449
 
450
  }
451
- ?>
18
  include_once("admin.cloner.html.php");
19
  include_once("cloner.functions.php");
20
 
21
+ require_once( 'cloner.config.php' );
22
+
23
+ ####### VERIFY IP ACCESS
24
+ $ip_list = @explode("\r\n", $_CONFIG['cron_ip']);
25
+ $ip_list[] = $_SERVER['SERVER_ADDR'];
26
+ $curent_ip = $_SERVER["REMOTE_ADDR"];
27
+
28
+ if(!in_array($curent_ip, $ip_list)){
29
+
30
+ echo "Access Denied for ip $curent_ip!";
31
+ exit;
32
+
33
+ }
34
+ #########################
35
+
36
+
37
+
38
 
39
  $script_dir = str_replace("\\","/",dirname(__FILE__));
40
  if(is_dir($script_dir)){
41
+
42
  chdir($script_dir);
43
 
44
  }
45
 
46
  if($_REQUEST['config'] == ""){
47
+
48
  if($argv[1] != ""){
49
+
50
+ $_REQUEST['config'] = $argv[1];
51
+
52
  }
53
 
54
 
55
  }
56
 
57
  if($_REQUEST['config'] != ""){
58
+
59
  require_once( './configs/'.$_REQUEST['config'] );
60
+
61
  $smsg = "Using configs/".$_REQUEST['config']." as configuration file";
62
+
63
  }
64
  else{
65
 
66
  @require_once( './cloner.config.php' );
67
+
68
  $smsg = "Using default configuration file";
69
 
70
  }
91
  if (file_exists( "language/".$mosConfig_lang.".php" )) {
92
  include_once( "language/".$mosConfig_lang.".php" );
93
  @include_once( "language/english.php" );
94
+ }
95
  else{
96
  include_once( "language/english.php" );
97
  }
99
 
100
 
101
  ####### VERIFY IP ACCESS
102
+ /*$ip_list = @explode("\r\n", $_CONFIG['cron_ip']);
103
  $ip_list[] = $_SERVER['SERVER_ADDR'];
104
  $curent_ip = $_SERVER["REMOTE_ADDR"];
105
 
106
  if(!in_array($curent_ip, $ip_list)){
107
+
108
  echo "Access Denied for ip $curent_ip!";
109
  exit;
110
+
111
+ }*/
112
  #########################
113
 
114
  $access=1;
121
 
122
  if($_CONFIG[cron_bname]!="")
123
  $_REQUEST['bname'] = $_CONFIG[cron_bname];
124
+
125
+
126
  function logxx($string = ""){
127
+
128
+ global $mail_log;
129
 
130
  $return = "<b>$string</b><br />\r\n";
131
+
132
  $mail_log .= $return;
133
 
134
  echo $return;
148
  #recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludefolders, '');
149
  #$excludedFolders = confirmBackup('nohtml');
150
  #logxx("Done");
151
+
152
+
153
 
154
  if($_CONFIG['cron_btype']==0){
155
  $_REQUEST[dbbackup] = 1;
171
  $GLOBALS['_CONFIG'] = $_CONFIG;
172
  $_REQUEST[cron_dbonly] = 1;
173
  #}
174
+
175
  logxx("Creating an sql only backup");
176
  $msg = "database backup";
177
  }
200
  list($fhost, $fport) = explode(":",$_CONFIG[cron_ftp_server]);
201
  if($fport == "")
202
  $fport = '21';
203
+
204
  $ftp_timeout = '3600';
205
 
206
  // set up basic connection
265
  @unlink($source_file);
266
  logxx("Backup succesfully deleted from the original server!");
267
  }
268
+
269
  ##############################################################################
270
  }
271
  elseif($_CONFIG['cron_send']==2){
279
  Attached is the backup generated on $date
280
  Source Filename: $source_file
281
  Server: $mosConfig_live_site
282
+
283
+ Powered by http://www.xcloner.com - XCloner - Backup and Restore made easy!
284
  </pre>
285
 
286
  ";
287
+
288
  $ok = send_mail($mosConfig_mailfrom, "XCloner $msg", $message, $_CONFIG['cron_email_address'], $source_file);
289
+
290
  #echo mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $_CONFIG['cron_email_address'], "XCloner $msg", $message, $mode, '', '' );
291
  if($ok)
292
  logxx("Mail sent to ".$_CONFIG['cron_email_address']);
293
  else
294
+ logxx("There was an error in sending the mail cron to ".$_CONFIG['cron_email_address']);
295
 
296
  ##############################################################################
297
  }
349
 
350
  $logemail = explode(";", $_CONFIG['cron_logemail']);
351
  if(sizeof($logemail)>0){
352
+
353
  for($i=0; $i<sizeof($logemail);$i++){
354
+
355
  $email = trim($logemail[$i]);
356
  if($email != ""){
357
+
358
  $email_subject = "cron log ".time();
359
+
360
  $headers ="From: \"Cronlog XCloner\" <nobody@noreply.com>\n";
361
 
362
  if(mail($email, $email_subject, strip_tags($mail_log), $headers)){
363
+
364
  logxx ("Notification Mail was sent to $email");
365
+
366
  }
367
+
368
+
369
  }
370
+
371
  }
372
+
373
  }
374
 
375
  logxx("<br />\n\nALL DONE! I will exit now from cron.");
391
  if(is_array($f_arr))
392
  foreach($f_arr as $file)
393
  if(($file!='.')&&($file != '..')){
394
+
395
  #logxx("Processing backup file $file");
396
  $cfile = $_CONFIG['clonerPath']."/".$file;
397
+
398
  $filemtime = filemtime($cfile) ;
399
+
400
  $ftime= $filemtime + $_CONFIG['cron_file_delete']*24*60*60;
401
+
402
  $ctime = time();
403
+
404
  if($ftime < $ctime){
405
+
406
  if(unlink($cfile))
407
  logxx("Deleted backup file $file created on ".date("Y-m-d", $filemtime));
408
  else
409
  logxx("Could not delete backup file $file, please delete it manually");
410
+
411
  }
412
+
413
  }
414
 
415
  }
416
 
417
  function send_mail($email_from, $email_subject, $email_txt, $email_to, $fileatt){
418
+ $fileatt_type = "application/octet-stream"; // File Type
419
+ $fileatt_name = basename($fileatt); // Filename that will be used for the file as the attachment
420
  $data = "";
421
 
422
+ $headers = "From: \"Cronbackup XCloner\" <".$email_from.">";
423
 
424
  if($fileatt != ""){
425
+
426
  if($file = @fopen($fileatt,'rb')){
427
+
428
  $data = fread($file,filesize($fileatt));
429
+
430
  fclose($file);
431
 
432
+ }
433
  else{
434
  logxx("Unable to open file $fileatt");
435
  }
436
 
437
  }
438
 
439
+ $semi_rand = md5(time());
440
+ $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
 
 
 
 
441
 
442
+ $headers .= "\nMIME-Version: 1.0\n" .
443
+ "Content-Type: multipart/mixed;\n" .
444
+ " boundary=\"{$mime_boundary}\"";
 
 
445
 
446
+ $email_message .= "This is a multi-part message in MIME format.\n\n" .
447
+ "--{$mime_boundary}\n" .
448
+ "Content-Type:text/html; charset=\"iso-8859-1\"\n" .
449
+ "Content-Transfer-Encoding: 7bit\n\n" .
450
+ $email_txt . "\n\n";
451
 
452
+ $data = chunk_split(base64_encode($data));
 
 
 
 
 
 
 
453
 
454
+ $email_message .= "--{$mime_boundary}\n" .
455
+ "Content-Type: {$fileatt_type};\n" .
456
+ " name=\"{$fileatt_name}\"\n" .
457
+ //"Content-Disposition: attachment;\n" .
458
+ //" filename=\"{$fileatt_name}\"\n" .
459
+ "Content-Transfer-Encoding: base64\n\n" .
460
+ $data . "\n\n" .
461
+ "--{$mime_boundary}--\n";
462
+
463
+ $ok = mail($email_to, $email_subject, $email_message, $headers);
464
 
465
  return $ok;
466
 
467
  }
468
+ ?>
cloner.functions.php CHANGED
@@ -20,14 +20,16 @@
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')) {
@@ -139,13 +141,13 @@
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'];
@@ -159,7 +161,7 @@
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
 
@@ -187,7 +189,7 @@
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
 
@@ -213,6 +215,12 @@
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";
@@ -237,13 +245,13 @@
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
 
@@ -266,7 +274,7 @@
266
  } else {
267
 
268
 
269
- $msg = "Unable to save $fcron file, please make sure the folder is writeable!";
270
  }
271
  }
272
 
@@ -469,11 +477,103 @@
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";
@@ -481,16 +581,18 @@
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
 
@@ -505,10 +607,15 @@
505
 
506
  if(!$handle->isQueueFinished())
507
  $status['finished'] = "0";
508
-
509
-
 
 
 
 
510
 
511
  echo json_encode($status);
 
512
  exit;
513
 
514
  }
@@ -793,7 +900,7 @@
793
  {
794
  global $_CONFIG;
795
 
796
- $file = $_CONFIG['clonerPath'] . "/$file";
797
 
798
  //First, see if the file exists
799
  if (!is_file($file)) {
@@ -807,75 +914,66 @@
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
  {
@@ -965,9 +1063,9 @@
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'];
@@ -991,7 +1089,6 @@
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
@@ -1000,7 +1097,6 @@
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";
@@ -1022,6 +1118,23 @@
1022
  //## appending files
1023
  $log .= "file - $file";
1024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1025
 
1026
  if (!$_CONFIG['mem']) {
1027
  //### CREATE BACKUP USING TAR LIBRARIES
@@ -1055,7 +1168,7 @@
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);
@@ -1070,21 +1183,21 @@
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
 
@@ -1098,10 +1211,10 @@
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';
@@ -1115,7 +1228,7 @@
1115
  echo json_encode($status);
1116
  exit;
1117
 
1118
- }
1119
 
1120
  return;
1121
  }
@@ -1134,9 +1247,7 @@
1134
  if (!$_CONFIG['enable_db_backup']) {
1135
  $backupDatabase = 0;
1136
  } else {
1137
-
1138
-
1139
- $backupDatabase = $_REQUEST['dbbackup'];
1140
  }
1141
 
1142
  if ($_REQUEST[cron_access]) {
@@ -1173,8 +1284,6 @@
1173
  $f_ext = '.tgz';
1174
  $_CONFIG['tarcompress'] = 'z';
1175
  } else {
1176
-
1177
-
1178
  $f_ext = '.tar';
1179
  $_CONFIG['tarcompress'] = '';
1180
  }
@@ -1204,6 +1313,15 @@
1204
  $filename1 = $_REQUEST['bname'] . $f_ext;
1205
  }
1206
 
 
 
 
 
 
 
 
 
 
1207
  $sql_file = array();
1208
 
1209
  if ($backupDatabase == 1) {
@@ -1231,7 +1349,7 @@
1231
  mysql_query("USE " . $_CONFIG['mysql_database']);
1232
  }
1233
  } else {
1234
- $databaseResult = LM_DATABASE_EXCLUDED;
1235
  }
1236
 
1237
 
@@ -1324,22 +1442,24 @@
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
@@ -1395,6 +1515,9 @@
1395
 
1396
  if ($_CONFIG['backup_refresh']) {
1397
  $f_arr = array($_CONFIG['backups_dir'] . "/index.html");
 
 
 
1398
  }
1399
 
1400
 
@@ -1417,7 +1540,8 @@
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;
@@ -1956,11 +2080,46 @@
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
  ?>
20
  * MA 02110-1301, USA.
21
  */
22
 
23
+ /** ensure this file is being included by a parent file */
24
+ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
25
+
26
+
27
  /*
28
  * Process the logout request
29
  * name: doLogout()
30
  * @param
31
  * @return
32
  */
 
 
33
  function doLogout()
34
  {
35
  if (function_exists('session_unregister')) {
141
  if ($fp = @fopen($config_file, 'w')) {
142
  $cfg = '<?' . 'php' . "\n";
143
 
144
+ $cfg .= '$_CONFIG[\'license_code\']=\'' . $_REQUEST[license_code] . '\';' . "\n";
145
 
146
  $cfg .= '$_CONFIG[\'backup_path\']="' . $_REQUEST[backup_path] . '";' . "\n";
147
 
148
  $cfg .= '$_CONFIG[\'clonerPath\']="' . $_REQUEST[clonerPath] . '";' . "\n";
149
 
150
+ $cfg .= '$_CONFIG[\'jcuser\']=\'' . $_REQUEST[jcuser] . '\';' . "\n";
151
 
152
  if ($_REQUEST['jcpass'] == '') {
153
  $jcpass = $_CONFIG['jcpass'];
161
 
162
  $cfg .= '$_CONFIG[\'mysql_host\']="' . $_REQUEST[mysql_host] . '";' . "\n";
163
 
164
+ $cfg .= '$_CONFIG[\'mysql_user\']=\'' . $_REQUEST[mysql_user] . '\';' . "\n";
165
 
166
  $cfg .= '$_CONFIG[\'mysql_pass\']=\'' . $_REQUEST[mysql_pass] . '\';' . "\n";
167
 
189
 
190
  $cfg .= '$_CONFIG[\'cron_ftp_server\']="' . $_REQUEST[cron_ftp_server] . '";' . "\n";
191
 
192
+ $cfg .= '$_CONFIG[\'cron_ftp_user\']=\'' . $_REQUEST[cron_ftp_user] . '\';' . "\n";
193
 
194
  $cfg .= '$_CONFIG[\'cron_ftp_pass\']=\'' . $_REQUEST[cron_ftp_pass] . '\';' . "\n";
195
 
215
 
216
  $cfg .= '$_CONFIG[\'refresh_mode\']="' . $_REQUEST[refresh_mode] . '";' . "\n";
217
 
218
+ $cfg .= '$_CONFIG[\'recordsPerSession\']="' . $_REQUEST[recordsPerSession] . '";' . "\n";
219
+
220
+ $cfg .= '$_CONFIG[\'excludeFilesSize\']="' . $_REQUEST[excludeFilesSize] . '";' . "\n";
221
+
222
+ $cfg .= '$_CONFIG[\'splitBackupSize\']="' . $_REQUEST[splitBackupSize] . '";' . "\n";
223
+
224
  $cfg .= '$_CONFIG[\'backup_refresh_number\']="' . $_REQUEST[backup_refresh_number] . '";' . "\n";
225
 
226
  $cfg .= '$_CONFIG[\'sql_mem\']="' . $_REQUEST[sql_mem] . '";' . "\n";
245
 
246
  $cfg .= '$_CONFIG[\'cron_amazon_active\']="' . $_REQUEST[cron_amazon_active] . '";' . "\n";
247
 
248
+ $cfg .= '$_CONFIG[\'cron_amazon_awsAccessKey\']=\'' . $_REQUEST[cron_amazon_awsAccessKey] . '\';' . "\n";
249
 
250
+ $cfg .= '$_CONFIG[\'cron_amazon_awsSecretKey\']=\'' . $_REQUEST[cron_amazon_awsSecretKey] . '\';' . "\n";
251
 
252
+ $cfg .= '$_CONFIG[\'cron_amazon_bucket\']=\'' . $_REQUEST[cron_amazon_bucket] . '\';' . "\n";
253
 
254
+ $cfg .= '$_CONFIG[\'cron_amazon_dirname\']=\'' . $_REQUEST[cron_amazon_dirname] . '\';' . "\n";
255
 
256
  $cfg .= '$_CONFIG[\'debug\']="' . $_REQUEST[debug] . '";' . "\n";
257
 
274
  } else {
275
 
276
 
277
+ $msg = "Unable to save ".$fcron." file, please make sure the folder is writeable!";
278
  }
279
  }
280
 
477
  return $lang_arr;
478
  }
479
 
480
+ function goRecurseDatabases(){
481
+ global $_CONFIG;
482
+
483
+ include_once("classes/mysqlBackup.class.php");
484
+
485
+ $return = array();
486
+
487
+ $data['dbHostname'] = $_CONFIG['mysql_host'];
488
+ $data['dbUsername'] = $_CONFIG['mysql_user'];
489
+ $data['dbPassword'] = $_CONFIG['mysql_pass'];
490
+ $data['dbDatabase'] = $_CONFIG['mysql_database'];
491
+ $data['excludedTables'] = "";
492
+ $data['recordsPerSession'] = $_CONFIG['recordsPerSession'];
493
+ $data['dbCompatibility'] = $_REQUEST['dbbackup_comp']; //version compatibility
494
+ $data['dbDropSyntax'] = $_REQUEST['dbbackup_drop']; //Add DROP Syntax
495
+
496
+ $data['TEMP_DUMP_FILE'] = $_CONFIG['temp_dir']."/database-sql.sql";
497
+ $data['TEMP_DBPROCESS_FILE'] = $_CONFIG['temp_dir']."/.database";
498
+
499
+ if($_REQUEST['mode'] == "start"){
500
+ //do the initial table readings
501
+
502
+ //foreach($_REQUEST['excltables'] as $value) //check if any tables are excluded, we will only export their structure
503
+ $data['excludedTables'] = $_REQUEST['excltables'];
504
+
505
+ //foreach($_REQUEST['excltables'] as $value) //check if any other databases are included
506
+ $extradb = $_REQUEST['databases_incl'];
507
+
508
+ $db = new DB();
509
+ $db->init($data, 1);
510
+ $db->writeTempFile();
511
+ $db->disconnect();
512
+
513
+ //building the .database temp file
514
+ if(is_array($extradb))
515
+ foreach($extradb as $database){
516
+ $data['dbDatabase'] = $database;
517
+ $data['TEMP_DUMP_FILE'] = $_CONFIG['temp_dir']."/".$data['dbDatabase']."-sql.sql";
518
+ $db = new DB();
519
+ $db->init($data);
520
+ $db->writeTempFile();
521
+ $db->disconnect();
522
+
523
+ }
524
+
525
+ return;
526
+ }
527
+
528
+ //we start the backup process for the actual database
529
+
530
+ $data['dbDatabase'] = "";
531
+ $dumpfile = "";
532
+ $data['dbCompatibility'] = $_REQUEST['dbbackup_comp']; //version compatibility
533
+ $data['dbDropSyntax'] = $_REQUEST['dbbackup_drop']; //Add DROP Syntax
534
+ $startAtLine = intval($_REQUEST['startAtLine']);
535
+ $startAtRecord = intval($_REQUEST['startAtRecord']);
536
+ $dumpfile = $_REQUEST['dumpfile'];
537
+
538
+ $db = new DB();
539
+ $db->init($data);
540
+
541
+ $records = $db->resetcountRecords();
542
+
543
+ while(($records < $_CONFIG['recordsPerSession']) and (!$return['finished']) and(!$return['newDump']) and(!$return['endDump'])){
544
+
545
+ $return = $db->processIncremental($startAtLine, $startAtRecord, $dumpfile);
546
+
547
+ $records = $db->getcountRecords();
548
+ $startAtLine = $return['startAtLine'];
549
+ $startAtRecord = $return['startAtRecord'];
550
+ $dumpfile = $return['dumpfile'];
551
+
552
+ }
553
+
554
+ /*if($return['newDump'])
555
+ print_r($return);*/
556
+ /*$startAtLine = $return['startAtLine'];
557
+ $startAtRecord = $return['startAtRecord'];
558
+ $dumpfile = $return['dumpfile'];*/
559
+
560
+ $return['dbbackup_comp'] = $_REQUEST['dbbackup_comp'];
561
+ $return['dbbackup_drop'] = $_REQUEST['dbbackup_drop'];
562
+
563
+ if($return['databaseName'] == "###enddump###")
564
+ $return['databaseName'] = "";
565
+
566
+ $db->disconnect();
567
+
568
+ echo json_encode($return);
569
+ exit;
570
+
571
+ }
572
 
573
  function goRecurseFiles(){
574
 
575
  global $_CONFIG;
576
+
577
  include_once("classes/fileRecursion.php");
578
 
579
  $status['finished'] = "1";
581
 
582
  $handle = new fileRecursion();
583
 
584
+ $dataInit['TEMP_PERM'] = $_CONFIG['temp_dir']."/perm.txt";
585
+ $dataInit['TEMP_EXCL'] = $_CONFIG['exfile'];
586
+ $dataInit['TEMP_D_ARR'] = $_CONFIG['temp_dir']."/.dir";
587
+ $dataInit['TEMP_DIR'] = $_CONFIG['clonerPath'];
588
+ $dataInit['START_DIR'] = $_CONFIG['backup_path'];
589
+ $dataInit['EXCLUDE_FILES_SIZE'] = $_CONFIG['excludeFilesSize'];
590
+ $dataInit['TEMP_OVERSIZED_FILE'] = $_CONFIG['temp_dir']."/.oversized_files";
591
 
592
+ $handle->setData($dataInit);
593
 
594
  if($_REQUEST['mode'] == 'start')
595
+ $handle->init($_CONFIG['backup_start_path']);
596
  else
597
  $handle->init();
598
 
607
 
608
  if(!$handle->isQueueFinished())
609
  $status['finished'] = "0";
610
+ else{
611
+ //recurse finished, lets return the excluded files by size
612
+ if(intval($_CONFIG['EXCLUDE_FILES_SIZE']) > -1){
613
+ $status['overlimit'] = $handle->getOverLimitFiles();
614
+ }
615
+ }
616
 
617
  echo json_encode($status);
618
+ $handle->close();
619
  exit;
620
 
621
  }
900
  {
901
  global $_CONFIG;
902
 
903
+ $file = realpath($_CONFIG['clonerPath'] . "/$file");
904
 
905
  //First, see if the file exists
906
  if (!is_file($file)) {
914
 
915
  //Setam Content-Type-urile pentru fisierul in cauza
916
  switch ($file_extension) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
917
  default:
918
  $ctype = "application/force-download";
919
  }
920
 
921
+ smartReadFile($file, $filename);
 
 
 
 
 
922
 
 
 
 
 
 
 
 
 
 
923
  exit;
924
  }
925
 
926
+ function smartReadFile($location, $filename, $mimeType='application/octet-stream')
927
+ { if(!file_exists($location))
928
+ { header ("HTTP/1.0 404 Not Found");
929
+ return;
930
+ }
931
+
932
+ $size=filesize($location);
933
+ $time=date('r',filemtime($location));
934
+
935
+ $fm=@fopen($location,'r');
936
+ if(!$fm)
937
+ { header ("HTTP/1.0 505 Internal server error");
938
+ return;
939
+ }
940
+
941
+ $begin=0;
942
+ $end=$size;
943
+
944
+ if(isset($_SERVER['HTTP_RANGE']))
945
+ { if(preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches))
946
+ { $begin=intval($matches[0]);
947
+ if(!empty($matches[1]))
948
+ $end=intval($matches[1]);
949
+ }
950
+ }
951
+
952
+ if($begin>0||$end<$size)
953
+ header('HTTP/1.0 206 Partial Content');
954
+ else
955
+ header('HTTP/1.0 200 OK');
956
+
957
+ header("Content-Type: $mimeType");
958
+ header('Cache-Control: public, must-revalidate, max-age=0');
959
+ header('Pragma: no-cache');
960
+ header('Accept-Ranges: bytes');
961
+ header('Content-Length:'.($end-$begin));
962
+ header("Content-Range: bytes $begin-$end/$size");
963
+ header("Content-Disposition: inline; filename=$filename");
964
+ header("Content-Transfer-Encoding: binary\n");
965
+ header("Last-Modified: $time");
966
+ header('Connection: close');
967
+
968
+ $cur=$begin;
969
+ fseek($fm,$begin,0);
970
+
971
+ while(!feof($fm)&&$cur<$end&&(connection_status()==0))
972
+ { print fread($fm,min(1024*16,$end-$cur));
973
+ $cur+=1024*16;
974
+ }
975
+ }
976
+
977
 
978
  function confirmBackup($option)
979
  {
1063
 
1064
  $log = "";
1065
 
1066
+ $backup_file = $_CONFIG['backup_store_path']."/".$backup_filename;
1067
 
1068
+ $perm_file = $_CONFIG['temp_dir'] . "/perm.txt";
1069
 
1070
 
1071
  $lines = $_REQUEST['lines'];
1089
 
1090
  $url = "index2.php?option=com_cloner&task=refresh&json=$json&startf=$endf&lines=$lines&backup=$backup_filename&excl_manual=" . $_REQUEST['excl_manual'];
1091
 
 
1092
  if ($endf >= $lines)
1093
  $endf = $lines;
1094
  else
1097
  if ((int)$lines != 0)
1098
  $percent = sprintf("%d", ($endf * 100) / (int)$lines);
1099
 
 
1100
  $log .= "Total process: $percent% out of $lines files<br />\n";
1101
  $log .= "Processing files $startf to $endf for backup file $backup_file!<br />\n";
1102
  $log .= "Current backup size: " . getFileSizeText(get_filesize($backup_file)) . "<br /><br />\n";
1118
  //## appending files
1119
  $log .= "file - $file";
1120
 
1121
+ if(intval($_CONFIG['splitBackupSize']) > 0){
1122
+
1123
+ $fileSize = intval($buffer[2]);
1124
+ $backupSize = get_filesize($backup_file);
1125
+ $limit = $_CONFIG['splitBackupSize']*1024*1024; //MB limit
1126
+
1127
+ //check if the size is bigger than $_CONFIF['splitBackupSize'] and split backup
1128
+ if(($fileSize+$backupSize) > $limit){
1129
+
1130
+ $backup_filename = getNewBackupName($backup_filename);
1131
+ //exit;
1132
+ $backup_file = $_CONFIG['backup_store_path']."/".$backup_filename;
1133
+
1134
+ }
1135
+
1136
+ }
1137
+
1138
 
1139
  if (!$_CONFIG['mem']) {
1140
  //### CREATE BACKUP USING TAR LIBRARIES
1168
  }
1169
 
1170
  //exit;
1171
+ $newFileSize = get_filesize($backup_file);
1172
  $log .= "\n<br />New backup size: " . $newFileSize . "<br />\n";
1173
 
1174
  addXLog($log);
1183
  //# REDIRECTING
1184
  @fclose($fperm);
1185
 
1186
+ $log .= "<br>All done, redirecting... or <a href='$url'>click here </a>";
1187
 
1188
  $log .= "
1189
+ <script language='javascript'>
1190
+ function redirect(){
1191
+ window.location = '" . $url . "';
1192
+ }
1193
 
1194
+ setTimeout(\"redirect()\",parseInt(" . $_CONFIG['refresh_time'] . "));
1195
+ //redirect();
1196
 
1197
+ </script>";
1198
  }
 
 
1199
 
1200
+ } else {
1201
  $log .= "Unable to continue, could not open file $perm_file for reading!";
1202
  }
1203
 
1211
  $status['finished'] = 1;
1212
  }
1213
 
1214
+ if(!$json){
1215
+ echo $log;
1216
  }
1217
+ else{
1218
  $status['backupSize'] = $newFileSize;
1219
  $status['percent'] = $percent;
1220
  $status['option'] = 'com_cloner';
1228
  echo json_encode($status);
1229
  exit;
1230
 
1231
+ }
1232
 
1233
  return;
1234
  }
1247
  if (!$_CONFIG['enable_db_backup']) {
1248
  $backupDatabase = 0;
1249
  } else {
1250
+ $backupDatabase = $_REQUEST['dbbackup'];
 
 
1251
  }
1252
 
1253
  if ($_REQUEST[cron_access]) {
1284
  $f_ext = '.tgz';
1285
  $_CONFIG['tarcompress'] = 'z';
1286
  } else {
 
 
1287
  $f_ext = '.tar';
1288
  $_CONFIG['tarcompress'] = '';
1289
  }
1313
  $filename1 = $_REQUEST['bname'] . $f_ext;
1314
  }
1315
 
1316
+ //check if comments are set
1317
+ if($_REQUEST['backupComments'] != "")
1318
+ writeComments($_REQUEST['backupComments']);
1319
+
1320
+ //we created the backup name, but skip sql at this step, we will do it incrementally
1321
+ if(($_CONFIG['refresh_mode']) and (!$_REQUEST[cron_access]))
1322
+ //we skip the backup at this process,we will do it incrementally
1323
+ $backupDatabase = 0;
1324
+
1325
  $sql_file = array();
1326
 
1327
  if ($backupDatabase == 1) {
1349
  mysql_query("USE " . $_CONFIG['mysql_database']);
1350
  }
1351
  } else {
1352
+ #$databaseResult = LM_DATABASE_EXCLUDED;
1353
  }
1354
 
1355
 
1442
 
1443
  if(($_REQUEST['cron_access']) or (!$_CONFIG['refresh_mode'])){
1444
 
1445
+ $perm_file = $_CONFIG['backups_dir'] . "/perm.txt";
1446
+ @unlink($perm_file);
1447
+ $fperm = fopen($perm_file, "w");
1448
 
1449
+ for ($i = 0; $i < sizeof($excluded); $i++) {
1450
+ $excluded[$i] = str_replace("//", "/", $excluded[$i]);
1451
+ }
1452
 
1453
+ // obtain the list of files by recursing the mambo file store
1454
+ addXLog("Starting the file scanning process");
1455
 
1456
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includeFolder, '', $excluded, $fperm);
 
 
1457
 
1458
+ @fclose($fperm);
1459
+
1460
+ @chmod($perm_file, 0777);
1461
+
1462
+ }
1463
 
1464
 
1465
  // format total archive size
1515
 
1516
  if ($_CONFIG['backup_refresh']) {
1517
  $f_arr = array($_CONFIG['backups_dir'] . "/index.html");
1518
+ $fp=@fopen($_CONFIG['backups_dir'] . "/index.html" , "w");
1519
+ if($fp)
1520
+ fclose($fp);
1521
  }
1522
 
1523
 
1540
 
1541
  if ($_CONFIG['backup_refresh']) {
1542
  // echo "Starting the manual backup process!<br />";
1543
+ if((!$_CONFIG['refresh_mode']) and ($_CONFIG['enable_db_backup']))
1544
+ echo "<h2>Database backup: </h2>" . $databaseResult . "<br /><br />";
1545
 
1546
  HTML_cloner::goRefreshHtml($filename, $perm_lines, $excl_manual);
1547
  return;
2080
  }
2081
  }
2082
 
2083
+ function getNewBackupName($backupFilename){
2084
 
2085
+ $newFilename = $backupFilename;
2086
+
2087
+ $tmp = explode(".",$backupFilename);
2088
+ $extension = $tmp[sizeof($tmp)-1];
2089
+ $inc = $tmp[sizeof($tmp)-2];
2090
+
2091
+ if(strlen($inc)<3){
2092
+ $newinc = $inc+1;
2093
+ $newFilename = str_replace(".$inc.$extension", "", $backupFilename); //ex, replace .1.tar
2094
+ $newFilename = $newFilename .".$newinc.$extension";
2095
+ }else{
2096
+ //it is a first backup, no .0.tar
2097
+ $newFilename = str_replace(".".$extension, "", $backupFilename); //ex, replace .1.tar
2098
+ $newFilename = $newFilename .".1.". $extension;
2099
+ }
2100
+
2101
+ return $newFilename;
2102
+ }
2103
+
2104
+ function writeComments($comments){
2105
+ global $_CONFIG;
2106
+
2107
+ $fp = @fopen($_CONFIG['commentsfile'], "w");
2108
+ if($fp){
2109
+ fwrite($fp, stripcslashes($comments));
2110
+ fclose($fp);
2111
+ }
2112
+ else{
2113
+ addXLog("Unable to write comments to file ".$_CONFIG['commentsfile']);
2114
+ }
2115
+
2116
+
2117
+ }
2118
+
2119
+ function getVersion()
2120
+ {
2121
+ $query = mysql_query("SELECT version()");
2122
+ $row = mysql_fetch_array($query);
2123
+ return $row[0];
2124
+ }
2125
  ?>
common.php CHANGED
@@ -1,22 +1,39 @@
1
  <?php
2
- /**
3
- * XCloner
4
- * Oficial website: http://www.joomlaplug.com/
5
- * -------------------------------------------
6
- * Creator: Liuta Romulus Ovidiu
7
- * License: All Rights Reserved
8
- * Email: admin@joomlaplug.com
9
- * Revision: 1.0
10
- * Date: July 2007
11
- **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  if ((!extension_loaded('zlib')) &&(function_exists('ob_start'))) {
13
  ob_end_clean();
14
  ob_start('ob_gzhandler');
15
- }
16
 
17
  ####################################
18
 
19
  $_CONFIG['multiple_config_dir'] = "configs";
 
 
 
20
 
21
  $_CONFIG['backup_path'] = realpath($_CONFIG['backup_path'])."/";
22
  $_CONFIG['backups_dir'] = realpath($_CONFIG['backup_path'])."/administrator/backups";
@@ -24,8 +41,13 @@ $_CONFIG['backups_dir'] = realpath($_CONFIG['backup_path'])."/administrator/back
24
  $_CONFIG['backup_path'] = str_replace("\\","/", $_CONFIG['backup_path']);
25
  $_CONFIG['backups_dir'] = str_replace("\\","/", $_CONFIG['backups_dir']);
26
 
 
27
  $_CONFIG['exfile'] = $_CONFIG['backups_dir']."/.excl";
28
  $_CONFIG['exfile_tar'] = $_CONFIG['backups_dir']."/.excl_tar";
 
 
 
 
29
  $_CONFIG['script_path'] = str_replace("\\","/",dirname(__FILE__));
30
 
31
  $lang_dir = "language";
@@ -37,7 +59,7 @@ $task = $_REQUEST['task'];
37
  if($_CONFIG['enable_db_backup']){
38
 
39
  ### Connecting to the mysql server
40
- @mysql_connect($_CONFIG['mysql_host'], $_CONFIG['mysql_user'], $_CONFIG['mysql_pass']) or
41
  E_print("Could not connect: " . mysql_error());
42
  @mysql_select_db($_CONFIG['mysql_database']) or E_print("Unable to select database ".$_CONFIG['mysql_database']);
43
  @mysql_query("SET NAMES 'utf8'");
@@ -55,17 +77,20 @@ if (file_exists( "language/".$mosConfig_lang.".php" )) {
55
 
56
  @include_once( "language/english.php" );
57
 
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
 
1
  <?php
2
+ /*
3
+ * common.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
+ /** ensure this file is being included by a parent file */
24
+ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
25
+
26
  if ((!extension_loaded('zlib')) &&(function_exists('ob_start'))) {
27
  ob_end_clean();
28
  ob_start('ob_gzhandler');
29
+ }
30
 
31
  ####################################
32
 
33
  $_CONFIG['multiple_config_dir'] = "configs";
34
+ //$strlen = strlen($_CONFIG['backup_path']);
35
+ //if((substr($_CONFIG['backup_path'], $strlen-1, $strlen) != '/') && (substr($_CONFIG['backup_path'], $strlen-1, $strlen) != '\\'))
36
+ // $_CONFIG['backup_path'] .= "/";
37
 
38
  $_CONFIG['backup_path'] = realpath($_CONFIG['backup_path'])."/";
39
  $_CONFIG['backups_dir'] = realpath($_CONFIG['backup_path'])."/administrator/backups";
41
  $_CONFIG['backup_path'] = str_replace("\\","/", $_CONFIG['backup_path']);
42
  $_CONFIG['backups_dir'] = str_replace("\\","/", $_CONFIG['backups_dir']);
43
 
44
+
45
  $_CONFIG['exfile'] = $_CONFIG['backups_dir']."/.excl";
46
  $_CONFIG['exfile_tar'] = $_CONFIG['backups_dir']."/.excl_tar";
47
+
48
+ $_CONFIG['logfile'] = $_CONFIG['backups_dir']."/xcloner.log";
49
+ $_CONFIG['commentsfile'] = $_CONFIG['backups_dir']."/.comments"; #$_REQUEST['backupComments']
50
+
51
  $_CONFIG['script_path'] = str_replace("\\","/",dirname(__FILE__));
52
 
53
  $lang_dir = "language";
59
  if($_CONFIG['enable_db_backup']){
60
 
61
  ### Connecting to the mysql server
62
+ $link = @mysql_connect($_CONFIG['mysql_host'], $_CONFIG['mysql_user'], $_CONFIG['mysql_pass']) or
63
  E_print("Could not connect: " . mysql_error());
64
  @mysql_select_db($_CONFIG['mysql_database']) or E_print("Unable to select database ".$_CONFIG['mysql_database']);
65
  @mysql_query("SET NAMES 'utf8'");
77
 
78
  @include_once( "language/english.php" );
79
 
80
+ }
81
 
82
  else{
83
+
84
  include_once( "language/english.php" );
85
+
86
  }
87
 
88
  $version = str_replace(".", "", phpversion());
89
+ if (version_compare(PHP_VERSION, '5.2.3') < 0) {
90
  $_CONFIG['refresh_mode']="0";
91
  }
92
+
93
+ if (!$_CONFIG['backup_refresh']) {
94
  $_CONFIG['refresh_mode']="0";
95
  }
96
 
configs/test.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_CONFIG['license_code']="";
3
+ $_CONFIG['backup_path']="/opt/lampp/htdocs/Joomla_1.6.0/";
4
+ $_CONFIG['clonerPath']="/opt/lampp/htdocs/Joomla_1.6.0/administrator/backups";
5
+ $_CONFIG['jcuser']="admin";
6
+ $_CONFIG['jcpass']='21232f297a57a5a743894a0e4a801fc3';
7
+ $_CONFIG['mysql_host']="localhost";
8
+ $_CONFIG['mysql_user']="root";
9
+ $_CONFIG['mysql_pass']='';
10
+ $_CONFIG['mysql_database']="joomla16";
11
+ $_CONFIG['select_folders']="";
12
+ $_CONFIG['select_lang']="english";
13
+ $_CONFIG['secure_ftp']="0";
14
+ $_CONFIG['backup_compress']="0";
15
+ $_CONFIG['cron_logemail']="";
16
+ $_CONFIG['cron_exclude']="";
17
+ $_CONFIG['cron_send']="0";
18
+ $_CONFIG['cron_btype']="0";
19
+ $_CONFIG['cron_bname']="";
20
+ $_CONFIG['cron_ip']="";
21
+ $_CONFIG['cron_ftp_server']="";
22
+ $_CONFIG['cron_ftp_user']="";
23
+ $_CONFIG['cron_ftp_pass']='';
24
+ $_CONFIG['cron_ftp_path']="";
25
+ $_CONFIG['cron_ftp_delb']="";
26
+ $_CONFIG['databases_incl_list']="";
27
+ $_CONFIG['cron_sql_drop']="";
28
+ $_CONFIG['cron_email_address']="";
29
+ $_CONFIG['cron_file_delete']="0";
30
+ $_CONFIG['cron_file_delete_act']="";
31
+ $_CONFIG['mem']="";
32
+ $_CONFIG['backup_refresh']="1";
33
+ $_CONFIG['refresh_time']="1";
34
+ $_CONFIG['refresh_mode']="1";
35
+ $_CONFIG['recordsPerSession']="10000";
36
+ $_CONFIG['backup_refresh_number']="100";
37
+ $_CONFIG['sql_mem']="";
38
+ $_CONFIG['enable_db_backup']="1";
39
+ $_CONFIG['zippath']="";
40
+ $_CONFIG['tarpath']="tar";
41
+ $_CONFIG['sqldump']="mysqldump --quote-names ";
42
+ $_CONFIG['system_dlink']="";
43
+ $_CONFIG['mosConfig_live_site']="localhost";
44
+ $_CONFIG['system_ftptransfer']="0";
45
+ $_CONFIG['system_mdatabases']="0";
46
+ $_CONFIG['add_backups_dir']="0";
47
+ $_CONFIG['cron_amazon_active']="";
48
+ $_CONFIG['cron_amazon_awsAccessKey']="";
49
+ $_CONFIG['cron_amazon_awsSecretKey']="";
50
+ $_CONFIG['cron_amazon_bucket']="";
51
+ $_CONFIG['cron_amazon_dirname']="";
52
+ $_CONFIG['debug']="0";
53
+ ?>
css/main.css CHANGED
@@ -155,16 +155,16 @@ a.pagenav:active {
155
  }
156
  .inputbox {
157
  z-index: -3;
158
- font-size: 11px;
159
  }
160
  .text_area {
161
  border : 1px solid #ccc;
162
  z-index: -3;
163
- font-size: 11px;
164
  }
165
  input, textarea, select {
166
  z-index : -3;
167
- font-size: 11px;
168
  }
169
  .small {
170
  color : #FF9900;
@@ -190,7 +190,7 @@ table.menubar {
190
 
191
  }
192
  td {
193
- font-size: 11px;
194
  }
195
  /* header block */
196
  table.adminheading {
@@ -309,7 +309,8 @@ table.adminlist th {
309
  padding: 6px 4px 2px 4px;
310
  height: 25px;
311
  background-repeat: repeat;
312
- font-size: 11px;
 
313
  color: #000;
314
  }
315
  table.adminlist th.title {
@@ -378,7 +379,6 @@ table.adminform th {
378
  table.adminform td {
379
  padding: 3px;
380
  border: solid 1px #d5d5d5;
381
-
382
  text-align: left;
383
  }
384
  table.adminform td.editor {
@@ -720,4 +720,88 @@ display:block;
720
  .mtext {
721
  font-weight: bold;
722
  font-size: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
  }
155
  }
156
  .inputbox {
157
  z-index: -3;
158
+ font-size: 12px;
159
  }
160
  .text_area {
161
  border : 1px solid #ccc;
162
  z-index: -3;
163
+ font-size: 12px;
164
  }
165
  input, textarea, select {
166
  z-index : -3;
167
+ font-size: 14px;
168
  }
169
  .small {
170
  color : #FF9900;
190
 
191
  }
192
  td {
193
+ font-size: 12px;
194
  }
195
  /* header block */
196
  table.adminheading {
309
  padding: 6px 4px 2px 4px;
310
  height: 25px;
311
  background-repeat: repeat;
312
+ font-size: 13px;
313
+ text-align: left;
314
  color: #000;
315
  }
316
  table.adminlist th.title {
379
  table.adminform td {
380
  padding: 3px;
381
  border: solid 1px #d5d5d5;
 
382
  text-align: left;
383
  }
384
  table.adminform td.editor {
720
  .mtext {
721
  font-weight: bold;
722
  font-size: 16px;
723
+ display:inline;
724
+ }
725
+
726
+ #configtabinside div h3{
727
+ padding: 15px 0 5px 0;
728
+ font-weight: bold;
729
+ }
730
+
731
+ .backup_name {
732
+ font-size:16px;
733
+ }
734
+
735
+ #mysqlProcess{
736
+
737
+ padding-left: 50px;
738
+ }
739
+
740
+ #mysqlBackup{
741
+ padding-bottom: 10px;
742
+ }
743
+
744
+ #recurseFiles{
745
+
746
+ padding-left: 50px;
747
+ }
748
+
749
+ .mainText a{
750
+ font-weight: bold;
751
+ }
752
+
753
+ .mainText li{
754
+ font-weight: bold;
755
+ padding: 5px 0 5px 0;
756
+ list-style: disc inside;
757
+ }
758
+
759
+ .mainText{
760
+ padding: 5px 10px 10px 10px;
761
+ width: auto;
762
+ border: 1px solid #2e90bd;
763
+ }
764
+
765
+ .mainText h2{
766
+ padding-bottom: 5px;
767
+ }
768
+
769
+ .header a{
770
+ color: #000;
771
+ }
772
+
773
+ .adminForm textarea, .adminForm input, .adminForm select, .mainText input{
774
+ color: #000;
775
+ background: #fefefe;
776
+ border: 1px outset #2e90bd;
777
+ margin-left: 1px;
778
+ font-family: Tahoma, Arial;
779
+ }
780
+
781
+ .adminForm a, .adminform a {
782
+ font-family: Tahoma, Arial;
783
+ font-weight: bold;
784
+ }
785
+
786
+ .loginForm table {
787
+ border: 1px dashed #2e90bd;
788
+ font-size:12px;
789
+ }
790
+ .loginForm input{
791
+ color: #000;
792
+ background: #fefefe;
793
+ border: 1px outset #2e90bd;
794
+ margin-left: 1px;
795
+ font-family: Tahoma, Arial;
796
+
797
+ }
798
+ .oversizedFile{
799
+ padding-left: 25px;
800
+ }
801
+
802
+ .sliderContainer{
803
+
804
+ display: inline;
805
+ margin-bottom: 15px;
806
+
807
  }
css/start/images/ui-bg_flat_55_999999_40x100.png ADDED
Binary file
css/start/images/ui-bg_flat_75_aaaaaa_40x100.png ADDED
Binary file
css/start/images/ui-bg_glass_45_0078ae_1x400.png ADDED
Binary file
css/start/images/ui-bg_glass_55_f8da4e_1x400.png ADDED
Binary file
css/start/images/ui-bg_glass_75_79c9ec_1x400.png ADDED
Binary file
css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png ADDED
Binary file
css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png ADDED
Binary file
css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png ADDED
Binary file
css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png ADDED
Binary file
css/start/images/ui-icons_0078ae_256x240.png ADDED
Binary file
css/start/images/ui-icons_056b93_256x240.png ADDED
Binary file
css/start/images/ui-icons_d8e7f3_256x240.png ADDED
Binary file
css/start/images/ui-icons_e0fdff_256x240.png ADDED
Binary file
css/start/images/ui-icons_f5e175_256x240.png ADDED
Binary file
css/start/images/ui-icons_f7a50d_256x240.png ADDED
Binary file
css/start/images/ui-icons_fcd113_256x240.png ADDED
Binary file
css/{jquery-ui.css → start/jquery-ui-1.8.9.custom.css} RENAMED
@@ -1,7 +1,7 @@
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
  *
@@ -39,323 +39,48 @@
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; }
@@ -364,14 +89,14 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
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; }
@@ -555,16 +280,294 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
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}*/; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*
2
+ * jQuery UI CSS Framework 1.8.9
3
  *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
6
  * http://jquery.org/license
7
  *
39
 
40
  /* Overlays */
41
  .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
 
 
 
 
 
 
 
 
 
 
43
 
 
 
44
  /*
45
+ * jQuery UI CSS Framework 1.8.9
46
  *
47
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  * Dual licensed under the MIT or GPL Version 2 licenses.
49
  * http://jquery.org/license
50
  *
51
  * http://docs.jquery.com/UI/Theming/API
52
  *
53
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=2191c0&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=75&borderColorHeader=4297d7&fcHeader=eaf5f7&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=0078ae&bgColorDefault=0078ae&bgTextureDefault=02_glass.png&bgImgOpacityDefault=45&borderColorDefault=77d5f7&fcDefault=ffffff&iconColorDefault=e0fdff&bgColorHover=79c9ec&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=448dae&fcHover=026890&iconColorHover=056b93&bgColorActive=6eac2c&bgTextureActive=12_gloss_wave.png&bgImgOpacityActive=50&borderColorActive=acdd4a&fcActive=ffffff&iconColorActive=f5e175&bgColorHighlight=f8da4e&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcd113&fcHighlight=915608&iconColorHighlight=f7a50d&bgColorError=e14f1c&bgTextureError=12_gloss_wave.png&bgImgOpacityError=45&borderColorError=cd0a0a&fcError=ffffff&iconColorError=fcd113&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=75&opacityOverlay=30&bgColorShadow=999999&bgTextureShadow=01_flat.png&bgImgOpacityShadow=55&opacityShadow=45&thicknessShadow=0px&offsetTopShadow=5px&offsetLeftShadow=5px&cornerRadiusShadow=5px
54
  */
55
 
56
 
57
  /* Component containers
58
  ----------------------------------*/
59
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
60
  .ui-widget .ui-widget { font-size: 1em; }
61
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
62
+ .ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
63
+ .ui-widget-content a { color: #222222; }
64
+ .ui-widget-header { border: 1px solid #4297d7; background: #2191c0 url(images/ui-bg_gloss-wave_75_2191c0_500x100.png) 50% 50% repeat-x; color: #eaf5f7; font-weight: bold; }
65
+ .ui-widget-header a { color: #eaf5f7; }
66
 
67
  /* Interaction states
68
  ----------------------------------*/
69
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #77d5f7; background: #0078ae url(images/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
70
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; }
71
+ .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 #448dae; background: #79c9ec url(images/ui-bg_glass_75_79c9ec_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #026890; }
72
+ .ui-state-hover a, .ui-state-hover a:hover { color: #026890; text-decoration: none; }
73
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #acdd4a; background: #6eac2c url(images/ui-bg_gloss-wave_50_6eac2c_500x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
74
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
75
  .ui-widget :active { outline: none; }
76
 
77
  /* Interaction Cues
78
  ----------------------------------*/
79
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcd113; background: #f8da4e url(images/ui-bg_glass_55_f8da4e_1x400.png) 50% 50% repeat-x; color: #915608; }
80
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #915608; }
81
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #e14f1c url(images/ui-bg_gloss-wave_45_e14f1c_500x100.png) 50% top repeat-x; color: #ffffff; }
82
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
83
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
84
  .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
85
  .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
86
  .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
89
  ----------------------------------*/
90
 
91
  /* states and images */
92
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_0078ae_256x240.png); }
93
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_0078ae_256x240.png); }
94
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
95
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_e0fdff_256x240.png); }
96
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_056b93_256x240.png); }
97
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_f5e175_256x240.png); }
98
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_f7a50d_256x240.png); }
99
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_fcd113_256x240.png); }
100
 
101
  /* positioning */
102
  .ui-icon-carat-1-n { background-position: 0 0; }
280
  ----------------------------------*/
281
 
282
  /* Corner radius */
283
+ .ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; }
284
+ .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
285
+ .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
286
+ .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
287
+ .ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
288
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
289
+ .ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
290
+ .ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
291
+ .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
292
 
293
  /* Overlays */
294
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
295
+ .ui-widget-shadow { margin: 5px 0 0 5px; padding: 0px; background: #999999 url(images/ui-bg_flat_55_999999_40x100.png) 50% 50% repeat-x; opacity: .45;filter:Alpha(Opacity=45); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
296
+ * jQuery UI Resizable 1.8.9
297
+ *
298
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
299
+ * Dual licensed under the MIT or GPL Version 2 licenses.
300
+ * http://jquery.org/license
301
+ *
302
+ * http://docs.jquery.com/UI/Resizable#theming
303
+ */
304
+ .ui-resizable { position: relative;}
305
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
306
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
307
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
308
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
309
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
310
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
311
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
312
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
313
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
314
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
315
+ * jQuery UI Selectable 1.8.9
316
+ *
317
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
318
+ * Dual licensed under the MIT or GPL Version 2 licenses.
319
+ * http://jquery.org/license
320
+ *
321
+ * http://docs.jquery.com/UI/Selectable#theming
322
+ */
323
+ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
324
+ /*
325
+ * jQuery UI Accordion 1.8.9
326
+ *
327
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
328
+ * Dual licensed under the MIT or GPL Version 2 licenses.
329
+ * http://jquery.org/license
330
+ *
331
+ * http://docs.jquery.com/UI/Accordion#theming
332
+ */
333
+ /* IE/Win - Fix animation bug - #4615 */
334
+ .ui-accordion { width: 100%; }
335
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
336
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
337
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
338
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
339
+ .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
340
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
341
+ .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; }
342
+ .ui-accordion .ui-accordion-content-active { display: block; }
343
+ /*
344
+ * jQuery UI Autocomplete 1.8.9
345
+ *
346
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
347
+ * Dual licensed under the MIT or GPL Version 2 licenses.
348
+ * http://jquery.org/license
349
+ *
350
+ * http://docs.jquery.com/UI/Autocomplete#theming
351
+ */
352
+ .ui-autocomplete { position: absolute; cursor: default; }
353
+
354
+ /* workarounds */
355
+ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
356
+
357
+ /*
358
+ * jQuery UI Menu 1.8.9
359
+ *
360
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
361
+ * Dual licensed under the MIT or GPL Version 2 licenses.
362
+ * http://jquery.org/license
363
+ *
364
+ * http://docs.jquery.com/UI/Menu#theming
365
+ */
366
+ .ui-menu {
367
+ list-style:none;
368
+ padding: 2px;
369
+ margin: 0;
370
+ display:block;
371
+ float: left;
372
+ }
373
+ .ui-menu .ui-menu {
374
+ margin-top: -3px;
375
+ }
376
+ .ui-menu .ui-menu-item {
377
+ margin:0;
378
+ padding: 0;
379
+ zoom: 1;
380
+ float: left;
381
+ clear: left;
382
+ width: 100%;
383
+ }
384
+ .ui-menu .ui-menu-item a {
385
+ text-decoration:none;
386
+ display:block;
387
+ padding:.2em .4em;
388
+ line-height:1.5;
389
+ zoom:1;
390
+ }
391
+ .ui-menu .ui-menu-item a.ui-state-hover,
392
+ .ui-menu .ui-menu-item a.ui-state-active {
393
+ font-weight: normal;
394
+ margin: -1px;
395
+ }
396
+ /*
397
+ * jQuery UI Button 1.8.9
398
+ *
399
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
400
+ * Dual licensed under the MIT or GPL Version 2 licenses.
401
+ * http://jquery.org/license
402
+ *
403
+ * http://docs.jquery.com/UI/Button#theming
404
+ */
405
+ .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 */
406
+ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
407
+ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
408
+ .ui-button-icons-only { width: 3.4em; }
409
+ button.ui-button-icons-only { width: 3.7em; }
410
+
411
+ /*button text element */
412
+ .ui-button .ui-button-text { display: block; line-height: 1.4; }
413
+ .ui-button-text-only .ui-button-text { padding: .4em 1em; }
414
+ .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
415
+ .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
416
+ .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
417
+ .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
418
+ /* no icon support for input elements, provide padding by default */
419
+ input.ui-button { padding: .4em 1em; }
420
+
421
+ /*button icon element(s) */
422
+ .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; }
423
+ .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
424
+ .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; }
425
+ .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; }
426
+ .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
427
+
428
+ /*button sets*/
429
+ .ui-buttonset { margin-right: 7px; }
430
+ .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
431
+
432
+ /* workarounds */
433
+ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
434
+ /*
435
+ * jQuery UI Dialog 1.8.9
436
+ *
437
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
438
+ * Dual licensed under the MIT or GPL Version 2 licenses.
439
+ * http://jquery.org/license
440
+ *
441
+ * http://docs.jquery.com/UI/Dialog#theming
442
+ */
443
+ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
444
+ .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
445
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
446
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
447
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
448
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
449
+ .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
450
+ .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; }
451
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
452
+ .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
453
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
454
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
455
+ /*
456
+ * jQuery UI Slider 1.8.9
457
+ *
458
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
459
+ * Dual licensed under the MIT or GPL Version 2 licenses.
460
+ * http://jquery.org/license
461
+ *
462
+ * http://docs.jquery.com/UI/Slider#theming
463
+ */
464
+ .ui-slider { position: relative; text-align: left; }
465
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
466
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
467
+
468
+ .ui-slider-horizontal { height: .8em; }
469
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
470
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
471
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
472
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
473
+
474
+ .ui-slider-vertical { width: .8em; height: 100px; }
475
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
476
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
477
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
478
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
479
+ * jQuery UI Tabs 1.8.9
480
+ *
481
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
482
+ * Dual licensed under the MIT or GPL Version 2 licenses.
483
+ * http://jquery.org/license
484
+ *
485
+ * http://docs.jquery.com/UI/Tabs#theming
486
+ */
487
+ .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") */
488
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
489
+ .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; }
490
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
491
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
492
+ .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; }
493
+ .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... */
494
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
495
+ .ui-tabs .ui-tabs-hide { display: none !important; }
496
+ /*
497
+ * jQuery UI Datepicker 1.8.9
498
+ *
499
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
500
+ * Dual licensed under the MIT or GPL Version 2 licenses.
501
+ * http://jquery.org/license
502
+ *
503
+ * http://docs.jquery.com/UI/Datepicker#theming
504
+ */
505
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
506
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
507
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
508
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
509
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
510
+ .ui-datepicker .ui-datepicker-next { right:2px; }
511
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
512
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
513
+ .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; }
514
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
515
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
516
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
517
+ .ui-datepicker select.ui-datepicker-month,
518
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
519
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
520
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
521
+ .ui-datepicker td { border: 0; padding: 1px; }
522
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
523
+ .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; }
524
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
525
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
526
+
527
+ /* with multiple calendars */
528
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
529
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
530
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
531
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
532
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
533
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
534
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
535
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
536
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
537
+ .ui-datepicker-row-break { clear:both; width:100%; }
538
+
539
+ /* RTL support */
540
+ .ui-datepicker-rtl { direction: rtl; }
541
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
542
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
543
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
544
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
545
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
546
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
547
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
548
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
549
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
550
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
551
+
552
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
553
+ .ui-datepicker-cover {
554
+ display: none; /*sorry for IE5*/
555
+ display/**/: block; /*sorry for IE5*/
556
+ position: absolute; /*must have*/
557
+ z-index: -1; /*must have*/
558
+ filter: mask(); /*must have*/
559
+ top: -4px; /*must have*/
560
+ left: -4px; /*must have*/
561
+ width: 200px; /*must have*/
562
+ height: 200px; /*must have*/
563
+ }/*
564
+ * jQuery UI Progressbar 1.8.9
565
+ *
566
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
567
+ * Dual licensed under the MIT or GPL Version 2 licenses.
568
+ * http://jquery.org/license
569
+ *
570
+ * http://docs.jquery.com/UI/Progressbar#theming
571
+ */
572
+ .ui-progressbar { height:2em; text-align: left; }
573
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
css/tabber.css DELETED
@@ -1,109 +0,0 @@
1
- /* $Id: example.css,v 1.5 2006/03/27 02:44:36 pat Exp $ */
2
-
3
- /*--------------------------------------------------
4
- REQUIRED to hide the non-active tab content.
5
- But do not hide them in the print stylesheet!
6
- --------------------------------------------------*/
7
- .tabberlive .tabbertabhide {
8
- display:none;
9
- }
10
-
11
- /*--------------------------------------------------
12
- .tabber = before the tabber interface is set up
13
- .tabberlive = after the tabber interface is set up
14
- --------------------------------------------------*/
15
- .tabber {
16
- }
17
- .tabberlive {
18
- margin-top:1em;
19
- }
20
-
21
- /*--------------------------------------------------
22
- ul.tabbernav = the tab navigation list
23
- li.tabberactive = the active tab
24
- --------------------------------------------------*/
25
- ul.tabbernav
26
- {
27
- margin:0;
28
- padding: 3px 0;
29
- border-bottom: 1px solid #778;
30
- font: bold 12px Verdana, sans-serif;
31
- }
32
-
33
- ul.tabbernav li
34
- {
35
- list-style: none;
36
- margin: 0;
37
- display: inline;
38
- }
39
-
40
- ul.tabbernav li a
41
- {
42
- padding: 3px 0.5em;
43
- margin-left: 3px;
44
- border: 1px solid #778;
45
- border-bottom: none;
46
- background: #DDE;
47
- text-decoration: none;
48
- }
49
-
50
- ul.tabbernav li a:link { color: #448; }
51
- ul.tabbernav li a:visited { color: #667; }
52
-
53
- ul.tabbernav li a:hover
54
- {
55
- color: #000;
56
- background: #AAE;
57
- border-color: #227;
58
- }
59
-
60
- ul.tabbernav li.tabberactive a
61
- {
62
- background-color: #fff;
63
- border-bottom: 1px solid #fff;
64
- }
65
-
66
- ul.tabbernav li.tabberactive a:hover
67
- {
68
- color: #000;
69
- background: white;
70
- border-bottom: 1px solid white;
71
- }
72
-
73
- /*--------------------------------------------------
74
- .tabbertab = the tab content
75
- Add style only after the tabber interface is set up (.tabberlive)
76
- --------------------------------------------------*/
77
- .tabberlive .tabbertab {
78
- padding:5px;
79
- border:1px solid #aaa;
80
- border-top:0;
81
-
82
- /* If you don't want the tab size changing whenever a tab is changed
83
- you can set a fixed height */
84
-
85
- /* height:200px; */
86
-
87
- /* If you set a fix height set overflow to auto and you will get a
88
- scrollbar when necessary */
89
-
90
- /* overflow:auto; */
91
- }
92
-
93
- /* If desired, hide the heading since a heading is provided by the tab */
94
- .tabberlive .tabbertab h2 {
95
- display:none;
96
- }
97
- .tabberlive .tabbertab h3 {
98
- display:none;
99
- }
100
-
101
- /* Example of using an ID to set different styles for the tabs on the page */
102
- .tabberlive#tab1 {
103
- }
104
- .tabberlive#tab2 {
105
- }
106
- .tabberlive#tab2 .tabbertab {
107
- height:200px;
108
- overflow:auto;
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/logo.gif CHANGED
Binary file
images/logo.png CHANGED
Binary file
images/progressBarLong.gif ADDED
Binary file
install.xcloner.php CHANGED
@@ -11,23 +11,15 @@ function com_install(){
11
 
12
  if( is_callable( array( 'JFactory', 'getDBO' ))) {
13
  $database = JFactory::getDBO();
 
 
14
  }
15
  $mypath = dirname(__FILE__);
16
 
17
- @chmod("components/com_xcloner/cloner.config.php", 0777);
18
- @mkdir("backups", 0777);
19
- @chmod("backups", 0777);
20
- @chmod("components/com_xcloner/configs", 0777);
21
- @chmod("components/com_xcloner/browser", 0755);
22
- @chmod("components/com_xcloner/", 0755);
23
- @chmod("components/com_xcloner/index.php", 0755);
24
- @chmod("components/com_xcloner/index2.php", 0755);
25
- @chmod("components/com_xcloner/cloner.cron.php", 0755);
26
-
27
  error_reporting( E_ALL ^ E_NOTICE );
28
 
29
  //add new admin menu images
30
- $database->setQuery("UPDATE #__components SET admin_menu_img = 'components/com_xcloner/images/xcloner.png' WHERE admin_menu_link = 'option=com_xcloner'");
31
- $database->query();
32
  }
33
  ?>
11
 
12
  if( is_callable( array( 'JFactory', 'getDBO' ))) {
13
  $database = JFactory::getDBO();
14
+ $database->setQuery("UPDATE #__menu SET alias = 'XCloner Backup and Restore' WHERE path = 'xcloner-backup-and-restore'");
15
+ $database->query();
16
  }
17
  $mypath = dirname(__FILE__);
18
 
 
 
 
 
 
 
 
 
 
 
19
  error_reporting( E_ALL ^ E_NOTICE );
20
 
21
  //add new admin menu images
22
+
23
+
24
  }
25
  ?>
javascript/backup.js ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $(document).ready(function() {
2
+
3
+ var globalUrl;
4
+ var step = "r1";
5
+ var count = 0;
6
+ var counter = 0;
7
+ var counter_old = 0;
8
+
9
+ $("#progressbar").progressbar({ value: 0 });
10
+
11
+ $.ajaxSetup({
12
+ "error":function(request, status, error) {
13
+ //reset state here;
14
+ $("#error").show();
15
+ $("#errorText").append(status+" -- "+error);
16
+ $("#errorText").append("<br /><br />JSON url: "+globalUrl);
17
+ }});
18
+
19
+ function getSize(bytes, conv){
20
+
21
+ return (bytes/conv).toFixed(2);
22
+
23
+ }
24
+ function appendIcon(icon){
25
+
26
+ return '<span class="ui-icon ui-icon-'+icon+'" style="float:left;"></span>';
27
+
28
+ }
29
+
30
+ function xclonerRecurseMYSQL(url){
31
+
32
+ globalUrl = url;
33
+ step = "r1";
34
+
35
+ $.getJSON(url, function(json) {
36
+
37
+ if(!json){
38
+ $("#error").show();
39
+ $("#errorText").text(url);
40
+ }
41
+
42
+ if(json.dumpsize && !json.endDump){
43
+ $("#mysqlProcess").append(" ("+getSize(json.dumpsize, 1024*1024)+" MB) <br />");
44
+ }
45
+
46
+ if(json.newDump){
47
+ count++;
48
+ //$("#mysqlProcess").append(appendIcon("arrowthick-1-e"));
49
+ if(json.databaseName!="")
50
+ $("#mysqlProcess").append("<b>["+json.databaseName+"]</b> <span id='db"+count+"'></span> tables ");
51
+ counter = parseInt(json.startAtLine);
52
+
53
+ }else{
54
+ $("#db"+count).text(json.startAtLine - counter);
55
+ }
56
+
57
+ if(!parseInt(json.finished)){
58
+ //get next records
59
+
60
+ $("#db"+count).text(json.startAtLine - counter);
61
+
62
+ recurseUrl = "index2.php?task=recurse_database&nohtml=1&dbbackup_comp="+json.dbbackup_comp+"&dbbackup_drop="+json.dbbackup_drop+"&startAtLine="+json.startAtLine+"&startAtRecord="+json.startAtRecord+"&dumpfile="+json.dumpfile;
63
+ xclonerRecurseMYSQL(recurseUrl);
64
+
65
+ }
66
+ else{
67
+
68
+ $("#fileSystem").show();
69
+ var recurseUrl="index2.php?task=recurse_files&mode=start&nohtml=1";
70
+ xclonerRecurseJSON(recurseUrl);
71
+
72
+ }
73
+
74
+
75
+ });
76
+ }
77
+
78
+ function xclonerRecurseJSON(url){
79
+
80
+ $("#result").hide();
81
+
82
+ globalUrl = url;
83
+ step = "r2";
84
+
85
+ $.getJSON(url, function(json) {
86
+
87
+ if(!json){
88
+ $("#error").show();
89
+ $("#errorText").text(url);
90
+ }
91
+
92
+ if(!parseInt(json.finished)){
93
+
94
+ $("#recurseStatus").text(json.tfiles);
95
+
96
+ var recurseUrl = "index2.php?task=recurse_files&mode="+json.mode+"&nohtml=1";
97
+ xclonerRecurseJSON(recurseUrl);
98
+
99
+ }
100
+ else{
101
+ var size = parseFloat(json.size)/(1024*1024);
102
+ $("#recurseStatus").text(" done! (Estimated size:"+size.toFixed(2)+"MB) in "+json.tfiles+" files");
103
+ $("#result").show();
104
+ returnUrl = "index2.php?option=com_cloner&lines="+json.tfiles+"&task=refresh&backup="+backupFile+"&excl_manual=";
105
+ xclonerGetJSON(returnUrl);
106
+
107
+ }
108
+
109
+
110
+ });
111
+ }
112
+
113
+ function xclonerGetJSON(url){
114
+
115
+ globalUrl = url;
116
+ step = "r3";
117
+
118
+ $.getJSON(url, function(json) {
119
+
120
+ if(!json){
121
+ $("#error").show();
122
+ $("#errorText").append(url);
123
+ }
124
+
125
+ var percent = parseInt(json.percent);
126
+ $("#progressbar").progressbar({ value: percent });
127
+ $("#backupSize").text(json.backupSize);
128
+ $("#nFiles").text(json.startf);
129
+ $("#percent").text(json.percent);
130
+ if(!json.finished){
131
+ 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;
132
+ xclonerGetJSON(url);
133
+ }else{
134
+
135
+ $("#complete").show();
136
+ $("#nFiles").text(json.lines);
137
+ $("#backupFiles").text(json.lines);
138
+ $("#backupSizeComplete").text(json.backupSize);
139
+ $("#backupName").text(json.backup);
140
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
141
+ $( "#dialog-message" ).dialog({
142
+ modal: true,
143
+ width: 600,
144
+ buttons: {
145
+ Close: function() {
146
+ $( this ).dialog( "close" );
147
+ }
148
+ }
149
+ });
150
+
151
+ }
152
+
153
+ });
154
+
155
+ }
156
+
157
+ $("#retry").click(function(){
158
+ $("#error").hide();
159
+ $("#errorText").empty();
160
+ if(step == "r1"){
161
+ xclonerRecurseMYSQL(globalUrl);
162
+ }
163
+ else
164
+ if(step == "r2"){
165
+ xclonerRecurseJSON(globalUrl);
166
+ }
167
+ else if(step == "r3"){
168
+ xclonerGetJSON(globalUrl);
169
+ }
170
+ });
171
+
172
+ });
javascript/jquery-ui-1.8.9.custom.min.js ADDED
@@ -0,0 +1,781 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery UI 1.8.9
3
+ *
4
+ * Copyright 2011, 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(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.9",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}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
12
+ "position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
13
+ if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
14
+ "border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
15
+ d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
16
+ c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
17
+ b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
18
+ ;/*!
19
+ * jQuery UI Widget 1.8.9
20
+ *
21
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
22
+ * Dual licensed under the MIT or GPL Version 2 licenses.
23
+ * http://jquery.org/license
24
+ *
25
+ * http://docs.jquery.com/UI/Widget
26
+ */
27
+ (function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
28
+ a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
29
+ e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
30
+ this._getCreateOptions(),a);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")},
31
+ widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
32
+ enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
33
+ ;/*!
34
+ * jQuery UI Mouse 1.8.9
35
+ *
36
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
37
+ * Dual licensed under the MIT or GPL Version 2 licenses.
38
+ * http://jquery.org/license
39
+ *
40
+ * http://docs.jquery.com/UI/Mouse
41
+ *
42
+ * Depends:
43
+ * jquery.ui.widget.js
44
+ */
45
+ (function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===c.data(b.target,a.widgetName+".preventClickEvent")){c.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
46
+ a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
47
+ this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);
48
+ return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",
49
+ true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
50
+ ;/*
51
+ * jQuery UI Position 1.8.9
52
+ *
53
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
54
+ * Dual licensed under the MIT or GPL Version 2 licenses.
55
+ * http://jquery.org/license
56
+ *
57
+ * http://docs.jquery.com/UI/Position
58
+ */
59
+ (function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
60
+ left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
61
+ k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
62
+ m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
63
+ d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
64
+ a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
65
+ g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
66
+ ;/*
67
+ * jQuery UI Draggable 1.8.9
68
+ *
69
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
70
+ * Dual licensed under the MIT or GPL Version 2 licenses.
71
+ * http://jquery.org/license
72
+ *
73
+ * http://docs.jquery.com/UI/Draggables
74
+ *
75
+ * Depends:
76
+ * jquery.ui.core.js
77
+ * jquery.ui.mouse.js
78
+ * jquery.ui.widget.js
79
+ */
80
+ (function(d){d.widget("ui.draggable",d.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==
81
+ "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(a){var b=
82
+ this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.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-
83
+ this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
84
+ d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
85
+ this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
86
+ this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
87
+ a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
88
+ 0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
89
+ this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
90
+ (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.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 a=this.options;if(a.containment==
91
+ "parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?
92
+ 0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),
93
+ 10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==
94
+ Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
95
+ f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;
96
+ if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/
97
+ b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-
98
+ this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
99
+ this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.9"});
100
+ d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=
101
+ 0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=
102
+ c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,
103
+ true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=
104
+ 0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=
105
+ a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<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(d(this).offset()).appendTo("body")})},
106
+ stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=
107
+ document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-
108
+ c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-
109
+ (a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable",
110
+ "snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=
111
+ c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",
112
+ {top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,
113
+ left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,
114
+ a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,
115
+ b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
116
+ ;/*
117
+ * jQuery UI Droppable 1.8.9
118
+ *
119
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
120
+ * Dual licensed under the MIT or GPL Version 2 licenses.
121
+ * http://jquery.org/license
122
+ *
123
+ * http://docs.jquery.com/UI/Droppables
124
+ *
125
+ * Depends:
126
+ * jquery.ui.core.js
127
+ * jquery.ui.widget.js
128
+ * jquery.ui.mouse.js
129
+ * jquery.ui.draggable.js
130
+ */
131
+ (function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
132
+ a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
133
+ this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
134
+ this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
135
+ d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
136
+ a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.9"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
137
+ switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
138
+ i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
139
+ "none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
140
+ a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
141
+ d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
142
+ ;/*
143
+ * jQuery UI Resizable 1.8.9
144
+ *
145
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
146
+ * Dual licensed under the MIT or GPL Version 2 licenses.
147
+ * http://jquery.org/license
148
+ *
149
+ * http://docs.jquery.com/UI/Resizables
150
+ *
151
+ * Depends:
152
+ * jquery.ui.core.js
153
+ * jquery.ui.mouse.js
154
+ * jquery.ui.widget.js
155
+ */
156
+ (function(e){e.widget("ui.resizable",e.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 b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
157
+ _proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
158
+ 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=
159
+ 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=a.handles||(!e(".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",
160
+ nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
161
+ String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
162
+ this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
163
+ if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
164
+ d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
165
+ this.helper.offset();this.position={left:c,top:f};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:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
166
+ this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
167
+ b);a.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(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
168
+ f={width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
169
+ b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=
170
+ a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,
171
+ k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),
172
+ c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=
173
+ this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
174
+ a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,
175
+ arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,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}}});e.extend(e.ui.resizable,
176
+ {version:"1.8.9"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(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 b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
177
+ function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=
178
+ (q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=
179
+ false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-
180
+ a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",
181
+ b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top",
182
+ "Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,
183
+ f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=
184
+ a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+
185
+ a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&
186
+ e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",
187
+ height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=
188
+ d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
189
+ ;/*
190
+ * jQuery UI Selectable 1.8.9
191
+ *
192
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
193
+ * Dual licensed under the MIT or GPL Version 2 licenses.
194
+ * http://jquery.org/license
195
+ *
196
+ * http://docs.jquery.com/UI/Selectables
197
+ *
198
+ * Depends:
199
+ * jquery.ui.core.js
200
+ * jquery.ui.mouse.js
201
+ * jquery.ui.widget.js
202
+ */
203
+ (function(e){e.widget("ui.selectable",e.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=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
204
+ selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<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,
205
+ c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
206
+ c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
207
+ this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
208
+ a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
209
+ !a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
210
+ e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.9"})})(jQuery);
211
+ ;/*
212
+ * jQuery UI Sortable 1.8.9
213
+ *
214
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
215
+ * Dual licensed under the MIT or GPL Version 2 licenses.
216
+ * http://jquery.org/license
217
+ *
218
+ * http://docs.jquery.com/UI/Sortables
219
+ *
220
+ * Depends:
221
+ * jquery.ui.core.js
222
+ * jquery.ui.mouse.js
223
+ * jquery.ui.widget.js
224
+ */
225
+ (function(d){d.widget("ui.sortable",d.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");
226
+ 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 a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,
227
+ arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
228
+ c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);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");d.extend(this.offset,
229
+ {click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
230
+ if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
231
+ a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
232
+ if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
233
+ this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
234
+ b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
235
+ "px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,
236
+ c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==
237
+ document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-
238
+ 1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){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();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});
239
+ this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&
240
+ a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?
241
+ "width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?
242
+ c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;
243
+ return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=
244
+ d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});
245
+ return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=
246
+ d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=
247
+ this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=
248
+ e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
249
+ if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);
250
+ c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===
251
+ 1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=
252
+ this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):
253
+ b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[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(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==
254
+ ""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
255
+ this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
256
+ 10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.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=
257
+ {width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||
258
+ document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,
259
+ b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=
260
+ document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
261
+ e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-
262
+ this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<
263
+ this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&
264
+ this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=
265
+ this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!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();
266
+ this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,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])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],
267
+ this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",
268
+ g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("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(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||
269
+ this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,
270
+ originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.9"})})(jQuery);
271
+ ;/*
272
+ * jQuery UI Accordion 1.8.9
273
+ *
274
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
275
+ * Dual licensed under the MIT or GPL Version 2 licenses.
276
+ * http://jquery.org/license
277
+ *
278
+ * http://docs.jquery.com/UI/Accordion
279
+ *
280
+ * Depends:
281
+ * jquery.ui.core.js
282
+ * jquery.ui.widget.js
283
+ */
284
+ (function(c){c.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 a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
285
+ a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
286
+ if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
287
+ function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+
288
+ a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.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 a=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");
289
+ this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=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(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
290
+ b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
291
+ a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
292
+ c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
293
+ if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
294
+ if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
295
+ e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
296
+ e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
297
+ tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.9",animations:{slide:function(a,b){a=
298
+ c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);f[i]={value:j[1],
299
+ unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide",
300
+ paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
301
+ ;/*
302
+ * jQuery UI Autocomplete 1.8.9
303
+ *
304
+ * Copyright 2011, 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/Autocomplete
309
+ *
310
+ * Depends:
311
+ * jquery.ui.core.js
312
+ * jquery.ui.widget.js
313
+ * jquery.ui.position.js
314
+ */
315
+ (function(d){d.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 a=this,b=this.element[0].ownerDocument,f;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){f=false;var e=d.ui.keyCode;
316
+ switch(c.keyCode){case e.PAGE_UP:a._move("previousPage",c);break;case e.PAGE_DOWN:a._move("nextPage",c);break;case e.UP:a._move("previous",c);c.preventDefault();break;case e.DOWN:a._move("next",c);c.preventDefault();break;case e.ENTER:case e.NUMPAD_ENTER:if(a.menu.active){f=true;c.preventDefault()}case e.TAB:if(!a.menu.active)return;a.menu.select(c);break;case e.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem=
317
+ null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(f){f=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||
318
+ "body",b)[0]).mousedown(function(c){var e=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(g){g.target!==a.element[0]&&g.target!==e&&!d.ui.contains(e,g.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,e){e=e.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:e})&&/^key/.test(c.originalEvent.type)&&a.element.val(e.value)},selected:function(c,e){var g=e.item.data("item.autocomplete"),
319
+ h=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=h;setTimeout(function(){a.previous=h;a.selectedItem=g},1)}false!==a._trigger("select",c,{item:g})&&a.element.val(g.value);a.term=a.element.val();a.close(c);a.selectedItem=g},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
320
+ this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,f;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,e){e(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source===
321
+ "string"){f=this.options.source;this.source=function(c,e){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:f,data:c,dataType:"json",success:function(g,h,i){i===a.xhr&&e(g);a.xhr=null},error:function(g){g===a.xhr&&e([]);a.xhr=null}})}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;
322
+ this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==
323
+ this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position))},
324
+ _resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var f=this;d.each(b,function(c,e){f._renderItem(a,e)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);
325
+ else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,b){var f=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return f.test(c.label||c.value||c)})}})})(jQuery);
326
+ (function(d){d.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(b){if(d(b.target).closest(".ui-menu-item a").length){b.preventDefault();a.select(b)}});this.refresh()},refresh:function(){var a=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",
327
+ -1).mouseenter(function(b){a.activate(b,d(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var f=b.offset().top-this.element.offset().top,c=this.element.attr("scrollTop"),e=this.element.height();if(f<0)this.element.attr("scrollTop",c+f);else f>=e&&this.element.attr("scrollTop",c+f-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},
328
+ deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},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(a,b,f){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);
329
+ a.length?this.activate(f,a):this.activate(f,this.element.children(b))}else this.activate(f,this.element.children(b))},nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(".ui-menu-item:first"));else{var b=this.active.offset().top,f=this.element.height(),c=this.element.children(".ui-menu-item").filter(function(){var e=d(this).offset().top-b-f+d(this).height();return e<10&&e>-10});c.length||(c=this.element.children(".ui-menu-item:last"));this.activate(a,
330
+ c)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(".ui-menu-item:last"));else{var b=this.active.offset().top,f=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-b+f-d(this).height();return c<10&&c>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
331
+ this.activate(a,result)}else this.activate(a,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(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);
332
+ ;/*
333
+ * jQuery UI Button 1.8.9
334
+ *
335
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
336
+ * Dual licensed under the MIT or GPL Version 2 licenses.
337
+ * http://jquery.org/license
338
+ *
339
+ * http://docs.jquery.com/UI/Button
340
+ *
341
+ * Depends:
342
+ * jquery.ui.core.js
343
+ * jquery.ui.widget.js
344
+ */
345
+ (function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,e=a([]);if(c)e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return e};a.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",
346
+ i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",e="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
347
+ function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(e)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");
348
+ b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var f=b.element[0];h(f).not(f).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");
349
+ g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(f){if(c.disabled)return false;if(f.keyCode==a.ui.keyCode.SPACE||f.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(f){f.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",
350
+ c.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 b=this.element.is(":checked");b&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=
351
+ 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||
352
+ this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
353
+ true):a(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 b=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"),
354
+ c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary;if(d.primary||d.secondary){b.addClass("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){b.addClass(e?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
355
+ this.hasTitle||b.attr("title",c)}}else b.addClass("ui-button-text-only")}}});a.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(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.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 a(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()},
356
+ destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
357
+ ;/*
358
+ * jQuery UI Dialog 1.8.9
359
+ *
360
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
361
+ * Dual licensed under the MIT or GPL Version 2 licenses.
362
+ * http://jquery.org/license
363
+ *
364
+ * http://docs.jquery.com/UI/Dialog
365
+ *
366
+ * Depends:
367
+ * jquery.ui.core.js
368
+ * jquery.ui.widget.js
369
+ * jquery.ui.button.js
370
+ * jquery.ui.draggable.js
371
+ * jquery.ui.mouse.js
372
+ * jquery.ui.position.js
373
+ * jquery.ui.resizable.js
374
+ */
375
+ (function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.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(a){var b=c(this).css(a).offset().top;b<0&&
376
+ c(this).css("top",a.top-b)}},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 a=this,b=a.options,d=b.title||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",
377
+ -1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
378
+ "button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=
379
+ b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&
380
+ a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index");
381
+ isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);
382
+ d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}});
383
+ c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f,
384
+ h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('<button type="button"></button>').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=
385
+ d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize,
386
+ position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f,
387
+ h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===
388
+ 1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in
389
+ l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");
390
+ break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||"&#160;"));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e=
391
+ this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&&
392
+ this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.9",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===
393
+ 0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
394
+ height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
395
+ b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
396
+ function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
397
+ ;/*
398
+ * jQuery UI Slider 1.8.9
399
+ *
400
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
401
+ * Dual licensed under the MIT or GPL Version 2 licenses.
402
+ * http://jquery.org/license
403
+ *
404
+ * http://docs.jquery.com/UI/Slider
405
+ *
406
+ * Depends:
407
+ * jquery.ui.core.js
408
+ * jquery.ui.mouse.js
409
+ * jquery.ui.widget.js
410
+ */
411
+ (function(d){d.widget("ui.slider",d.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 b=this,a=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");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
412
+ this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
413
+ if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".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(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();
414
+ else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
415
+ false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
416
+ b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(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");
417
+ this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b,
418
+ g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},
419
+ _mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;
420
+ if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=
421
+ this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],
422
+ value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
423
+ this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):this.value();
424
+ else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){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();
425
+ 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(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
426
+ return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
427
+ _refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);
428
+ if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,
429
+ 1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.9"})})(jQuery);
430
+ ;/*
431
+ * jQuery UI Tabs 1.8.9
432
+ *
433
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
434
+ * Dual licensed under the MIT or GPL Version 2 licenses.
435
+ * http://jquery.org/license
436
+ *
437
+ * http://docs.jquery.com/UI/Tabs
438
+ *
439
+ * Depends:
440
+ * jquery.ui.core.js
441
+ * jquery.ui.widget.js
442
+ */
443
+ (function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.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(b,e){if(b=="selected")this.options.collapsible&&
444
+ e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
445
+ d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
446
+ (q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
447
+ 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(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
448
+ this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
449
+ if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
450
+ this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
451
+ g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
452
+ function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
453
+ this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
454
+ -1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
455
+ d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=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 e=
456
+ d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(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")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
457
+ e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
458
+ j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
459
+ if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
460
+ this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
461
+ load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
462
+ "cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.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},
463
+ url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.9"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
464
+ a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
465
+ ;/*
466
+ * jQuery UI Datepicker 1.8.9
467
+ *
468
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
469
+ * Dual licensed under the MIT or GPL Version 2 licenses.
470
+ * http://jquery.org/license
471
+ *
472
+ * http://docs.jquery.com/UI/Datepicker
473
+ *
474
+ * Depends:
475
+ * jquery.ui.core.js
476
+ */
477
+ (function(d,G){function K(){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=
478
+ "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",
479
+ "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",
480
+ 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};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function E(a,b){d.extend(a,b);for(var c in b)if(b[c]==
481
+ null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.9"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();
482
+ f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){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:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
483
+ _connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&
484
+ b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==
485
+ ""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,
486
+ c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),
487
+ true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});
488
+ b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.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=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
489
+ this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
490
+ this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,
491
+ function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:
492
+ f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},
493
+ e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);
494
+ this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?
495
+ d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||
496
+ a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,
497
+ e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,
498
+ "constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},
499
+ _showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=
500
+ d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,
501
+ c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&
502
+ d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[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",
503
+ function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=
504
+ -1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,
505
+ "isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},
506
+ _checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-
507
+ g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?
508
+ b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
509
+ _checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):
510
+ 0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=
511
+ false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=
512
+ d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);
513
+ else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},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 b=
514
+ a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,
515
+ g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){var v=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&v?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,v,H){p=o(p)?H:v;for(v=0;v<p.length;v++)if(b.substr(s,p[v].length).toLowerCase()==p[v].toLowerCase()){s+=p[v].length;return v+1}throw"Unknown name at position "+
516
+ s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(k)if(a.charAt(z)=="'"&&!o("'"))k=false;else r();else switch(a.charAt(z)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var w=new Date(m("@"));c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case "!":w=new Date((m("!")-this._ticksTo1970)/1E4);c=w.getFullYear();j=w.getMonth()+
517
+ 1;l=w.getDate();break;case "'":if(o("'"))r();else k=true;break;default:r()}if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},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",
518
+ RFC_1036:"D, d M y",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,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&
519
+ a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",
520
+ b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+=
521
+ "0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=
522
+ f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=
523
+ (h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,
524
+ l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=
525
+ a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":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 b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),
526
+ b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=
527
+ this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
528
+ (c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+
529
+ (c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,
530
+ "closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=
531
+ this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var M="",D=0;D<i[1];D++){var N=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-
532
+ 1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,C>0||D>0,z,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=
533
+ (t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=
534
+ p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,J=B&&!H||!F[0]||k&&q<k||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==N.getTime()&&g==a.selectedMonth&&a._keyEvent||L.getTime()==q.getTime()&&L.getTime()==N.getTime()?" "+this._dayOverClass:"")+(J?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!v?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":
535
+ ""))+'"'+((!B||v)&&F[2]?' title="'+F[2]+'"':"")+(J?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!v?"&#xa0;":J?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=
536
+ P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',
537
+ o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&
538
+ l)?"&#xa0;":""));a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+
539
+ a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";if(d.browser.mozilla)k+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=
540
+ a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,
541
+ "onChangeMonthYear");if(b)b.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,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
542
+ c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
543
+ "dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
544
+ function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));
545
+ return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.9";window["DP_jQuery_"+y]=d})(jQuery);
546
+ ;/*
547
+ * jQuery UI Progressbar 1.8.9
548
+ *
549
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
550
+ * Dual licensed under the MIT or GPL Version 2 licenses.
551
+ * http://jquery.org/license
552
+ *
553
+ * http://docs.jquery.com/UI/Progressbar
554
+ *
555
+ * Depends:
556
+ * jquery.ui.core.js
557
+ * jquery.ui.widget.js
558
+ */
559
+ (function(b,d){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");
560
+ this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
561
+ this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.9"})})(jQuery);
562
+ ;/*
563
+ * jQuery UI Effects 1.8.9
564
+ *
565
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
566
+ * Dual licensed under the MIT or GPL Version 2 licenses.
567
+ * http://jquery.org/license
568
+ *
569
+ * http://docs.jquery.com/UI/Effects/
570
+ */
571
+ jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
572
+ 16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
573
+ a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
574
+ a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
575
+ "borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
576
+ 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,
577
+ 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]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
578
+ d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0];
579
+ h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,
580
+ a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.9",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,
581
+ a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
582
+ border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);
583
+ return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);
584
+ else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),
585
+ b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,
586
+ a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,
587
+ a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==
588
+ e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=
589
+ g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
590
+ h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,
591
+ a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
592
+ ;/*
593
+ * jQuery UI Effects Blind 1.8.9
594
+ *
595
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
596
+ * Dual licensed under the MIT or GPL Version 2 licenses.
597
+ * http://jquery.org/license
598
+ *
599
+ * http://docs.jquery.com/UI/Effects/Blind
600
+ *
601
+ * Depends:
602
+ * jquery.effects.core.js
603
+ */
604
+ (function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
605
+ g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
606
+ ;/*
607
+ * jQuery UI Effects Bounce 1.8.9
608
+ *
609
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
610
+ * Dual licensed under the MIT or GPL Version 2 licenses.
611
+ * http://jquery.org/license
612
+ *
613
+ * http://docs.jquery.com/UI/Effects/Bounce
614
+ *
615
+ * Depends:
616
+ * jquery.effects.core.js
617
+ */
618
+ (function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
619
+ 3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
620
+ b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
621
+ ;/*
622
+ * jQuery UI Effects Clip 1.8.9
623
+ *
624
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
625
+ * Dual licensed under the MIT or GPL Version 2 licenses.
626
+ * http://jquery.org/license
627
+ *
628
+ * http://docs.jquery.com/UI/Effects/Clip
629
+ *
630
+ * Depends:
631
+ * jquery.effects.core.js
632
+ */
633
+ (function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
634
+ c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
635
+ ;/*
636
+ * jQuery UI Effects Drop 1.8.9
637
+ *
638
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
639
+ * Dual licensed under the MIT or GPL Version 2 licenses.
640
+ * http://jquery.org/license
641
+ *
642
+ * http://docs.jquery.com/UI/Effects/Drop
643
+ *
644
+ * Depends:
645
+ * jquery.effects.core.js
646
+ */
647
+ (function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
648
+ "show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
649
+ ;/*
650
+ * jQuery UI Effects Explode 1.8.9
651
+ *
652
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
653
+ * Dual licensed under the MIT or GPL Version 2 licenses.
654
+ * http://jquery.org/license
655
+ *
656
+ * http://docs.jquery.com/UI/Effects/Explode
657
+ *
658
+ * Depends:
659
+ * jquery.effects.core.js
660
+ */
661
+ (function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
662
+ 0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
663
+ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
664
+ ;/*
665
+ * jQuery UI Effects Fade 1.8.9
666
+ *
667
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
668
+ * Dual licensed under the MIT or GPL Version 2 licenses.
669
+ * http://jquery.org/license
670
+ *
671
+ * http://docs.jquery.com/UI/Effects/Fade
672
+ *
673
+ * Depends:
674
+ * jquery.effects.core.js
675
+ */
676
+ (function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
677
+ ;/*
678
+ * jQuery UI Effects Fold 1.8.9
679
+ *
680
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
681
+ * Dual licensed under the MIT or GPL Version 2 licenses.
682
+ * http://jquery.org/license
683
+ *
684
+ * http://docs.jquery.com/UI/Effects/Fold
685
+ *
686
+ * Depends:
687
+ * jquery.effects.core.js
688
+ */
689
+ (function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
690
+ 10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
691
+ ;/*
692
+ * jQuery UI Effects Highlight 1.8.9
693
+ *
694
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
695
+ * Dual licensed under the MIT or GPL Version 2 licenses.
696
+ * http://jquery.org/license
697
+ *
698
+ * http://docs.jquery.com/UI/Effects/Highlight
699
+ *
700
+ * Depends:
701
+ * jquery.effects.core.js
702
+ */
703
+ (function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
704
+ this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
705
+ ;/*
706
+ * jQuery UI Effects Pulsate 1.8.9
707
+ *
708
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
709
+ * Dual licensed under the MIT or GPL Version 2 licenses.
710
+ * http://jquery.org/license
711
+ *
712
+ * http://docs.jquery.com/UI/Effects/Pulsate
713
+ *
714
+ * Depends:
715
+ * jquery.effects.core.js
716
+ */
717
+ (function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
718
+ a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
719
+ ;/*
720
+ * jQuery UI Effects Scale 1.8.9
721
+ *
722
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
723
+ * Dual licensed under the MIT or GPL Version 2 licenses.
724
+ * http://jquery.org/license
725
+ *
726
+ * http://docs.jquery.com/UI/Effects/Scale
727
+ *
728
+ * Depends:
729
+ * jquery.effects.core.js
730
+ */
731
+ (function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
732
+ b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
733
+ 1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
734
+ p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
735
+ if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
736
+ a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
737
+ child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
738
+ n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
739
+ ;/*
740
+ * jQuery UI Effects Shake 1.8.9
741
+ *
742
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
743
+ * Dual licensed under the MIT or GPL Version 2 licenses.
744
+ * http://jquery.org/license
745
+ *
746
+ * http://docs.jquery.com/UI/Effects/Shake
747
+ *
748
+ * Depends:
749
+ * jquery.effects.core.js
750
+ */
751
+ (function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
752
+ (h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
753
+ ;/*
754
+ * jQuery UI Effects Slide 1.8.9
755
+ *
756
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
757
+ * Dual licensed under the MIT or GPL Version 2 licenses.
758
+ * http://jquery.org/license
759
+ *
760
+ * http://docs.jquery.com/UI/Effects/Slide
761
+ *
762
+ * Depends:
763
+ * jquery.effects.core.js
764
+ */
765
+ (function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
766
+ var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
767
+ ;/*
768
+ * jQuery UI Effects Transfer 1.8.9
769
+ *
770
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
771
+ * Dual licensed under the MIT or GPL Version 2 licenses.
772
+ * http://jquery.org/license
773
+ *
774
+ * http://docs.jquery.com/UI/Effects/Transfer
775
+ *
776
+ * Depends:
777
+ * jquery.effects.core.js
778
+ */
779
+ (function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
780
+ b.dequeue()})})}})(jQuery);
781
+ ;
javascript/jquery-ui.min.js DELETED
@@ -1,404 +0,0 @@
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 CHANGED
@@ -21,3 +21,40 @@ function cLink_load(){
21
  setTimeout('autoClick();', time);
22
  setInterval('countdown()', 1000);
23
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  setTimeout('autoClick();', time);
22
  setInterval('countdown()', 1000);
23
  }
24
+
25
+ function checkAll( n, fldName ) {
26
+ if (!fldName) {
27
+ fldName = 'cb';
28
+ }
29
+ var f = document.adminForm;
30
+ var c = f.toggle.checked;
31
+ var n2 = 0;
32
+ for (i=0; i < n; i++) {
33
+ cb = eval( 'f.' + fldName + '' + i );
34
+ if (cb) {
35
+ cb.checked = c;
36
+ n2++;
37
+ }
38
+ }
39
+ if (c) {
40
+ document.adminForm.boxchecked.value = n2;
41
+ } else {
42
+ document.adminForm.boxchecked.value = 0;
43
+ }
44
+ }
45
+
46
+ function checkJAll(n, toggle, cb){
47
+
48
+ if( $( "#"+toggle).is(":checked") )
49
+ var checkall = true;
50
+ else
51
+ var checkal = false;
52
+
53
+ for (var i=0; i < n; i++) {
54
+ if(!checkall)
55
+ $( "#"+cb+i ).removeAttr("checked").button("refresh");
56
+ else
57
+ $( "#"+cb+i ).attr("checked", true).button("refresh");
58
+
59
+ }
60
+ }
javascript/tabber.js DELETED
@@ -1,512 +0,0 @@
1
- function checkAll( n, fldName ) {
2
- if (!fldName) {
3
- fldName = 'cb';
4
- }
5
- var f = document.adminForm;
6
- var c = f.toggle.checked;
7
- var n2 = 0;
8
- for (i=0; i < n; i++) {
9
- cb = eval( 'f.' + fldName + '' + i );
10
- if (cb) {
11
- cb.checked = c;
12
- n2++;
13
- }
14
- }
15
- if (c) {
16
- document.adminForm.boxchecked.value = n2;
17
- } else {
18
- document.adminForm.boxchecked.value = 0;
19
- }
20
- }
21
-
22
- function tabberObj(argsObj)
23
- {
24
- var arg; /* name of an argument to override */
25
-
26
- /* Element for the main tabber div. If you supply this in argsObj,
27
- then the init() method will be called.
28
- */
29
- this.div = null;
30
-
31
- /* Class of the main tabber div */
32
- this.classMain = "tabber";
33
-
34
- /* Rename classMain to classMainLive after tabifying
35
- (so a different style can be applied)
36
- */
37
- this.classMainLive = "tabberlive";
38
-
39
- /* Class of each DIV that contains a tab */
40
- this.classTab = "tabbertab";
41
-
42
- /* Class to indicate which tab should be active on startup */
43
- this.classTabDefault = "tabbertabdefault";
44
-
45
- /* Class for the navigation UL */
46
- this.classNav = "tabbernav";
47
-
48
- /* When a tab is to be hidden, instead of setting display='none', we
49
- set the class of the div to classTabHide. In your screen
50
- stylesheet you should set classTabHide to display:none. In your
51
- print stylesheet you should set display:block to ensure that all
52
- the information is printed.
53
- */
54
- this.classTabHide = "tabbertabhide";
55
-
56
- /* Class to set the navigation LI when the tab is active, so you can
57
- use a different style on the active tab.
58
- */
59
- this.classNavActive = "tabberactive";
60
-
61
- /* Elements that might contain the title for the tab, only used if a
62
- title is not specified in the TITLE attribute of DIV classTab.
63
- */
64
- this.titleElements = ['h2','h3','h4','h5','h6'];
65
-
66
- /* Should we strip out the HTML from the innerHTML of the title elements?
67
- This should usually be true.
68
- */
69
- this.titleElementsStripHTML = true;
70
-
71
- /* If the user specified the tab names using a TITLE attribute on
72
- the DIV, then the browser will display a tooltip whenever the
73
- mouse is over the DIV. To prevent this tooltip, we can remove the
74
- TITLE attribute after getting the tab name.
75
- */
76
- this.removeTitle = true;
77
-
78
- /* If you want to add an id to each link set this to true */
79
- this.addLinkId = false;
80
-
81
- /* If addIds==true, then you can set a format for the ids.
82
- <tabberid> will be replaced with the id of the main tabber div.
83
- <tabnumberzero> will be replaced with the tab number
84
- (tab numbers starting at zero)
85
- <tabnumberone> will be replaced with the tab number
86
- (tab numbers starting at one)
87
- <tabtitle> will be replaced by the tab title
88
- (with all non-alphanumeric characters removed)
89
- */
90
- this.linkIdFormat = '<tabberid>nav<tabnumberone>';
91
-
92
- /* You can override the defaults listed above by passing in an object:
93
- var mytab = new tabber({property:value,property:value});
94
- */
95
- for (arg in argsObj) { this[arg] = argsObj[arg]; }
96
-
97
- /* Create regular expressions for the class names; Note: if you
98
- change the class names after a new object is created you must
99
- also change these regular expressions.
100
- */
101
- this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi');
102
- this.REclassMainLive = new RegExp('\\b' + this.classMainLive + '\\b', 'gi');
103
- this.REclassTab = new RegExp('\\b' + this.classTab + '\\b', 'gi');
104
- this.REclassTabDefault = new RegExp('\\b' + this.classTabDefault + '\\b', 'gi');
105
- this.REclassTabHide = new RegExp('\\b' + this.classTabHide + '\\b', 'gi');
106
-
107
- /* Array of objects holding info about each tab */
108
- this.tabs = new Array();
109
-
110
- /* If the main tabber div was specified, call init() now */
111
- if (this.div) {
112
-
113
- this.init(this.div);
114
-
115
- /* We don't need the main div anymore, and to prevent a memory leak
116
- in IE, we must remove the circular reference between the div
117
- and the tabber object. */
118
- this.div = null;
119
- }
120
- }
121
-
122
-
123
- /*--------------------------------------------------
124
- Methods for tabberObj
125
- --------------------------------------------------*/
126
-
127
-
128
- tabberObj.prototype.init = function(e)
129
- {
130
- /* Set up the tabber interface.
131
-
132
- e = element (the main containing div)
133
-
134
- Example:
135
- init(document.getElementById('mytabberdiv'))
136
- */
137
-
138
- var
139
- childNodes, /* child nodes of the tabber div */
140
- i, i2, /* loop indices */
141
- t, /* object to store info about a single tab */
142
- defaultTab=0, /* which tab to select by default */
143
- DOM_ul, /* tabbernav list */
144
- DOM_li, /* tabbernav list item */
145
- DOM_a, /* tabbernav link */
146
- aId, /* A unique id for DOM_a */
147
- headingElement; /* searching for text to use in the tab */
148
-
149
- /* Verify that the browser supports DOM scripting */
150
- if (!document.getElementsByTagName) { return false; }
151
-
152
- /* If the main DIV has an ID then save it. */
153
- if (e.id) {
154
- this.id = e.id;
155
- }
156
-
157
- /* Clear the tabs array (but it should normally be empty) */
158
- this.tabs.length = 0;
159
-
160
- /* Loop through an array of all the child nodes within our tabber element. */
161
- childNodes = e.childNodes;
162
- for(i=0; i < childNodes.length; i++) {
163
-
164
- /* Find the nodes where class="tabbertab" */
165
- if(childNodes[i].className &&
166
- childNodes[i].className.match(this.REclassTab)) {
167
-
168
- /* Create a new object to save info about this tab */
169
- t = new Object();
170
-
171
- /* Save a pointer to the div for this tab */
172
- t.div = childNodes[i];
173
-
174
- /* Add the new object to the array of tabs */
175
- this.tabs[this.tabs.length] = t;
176
-
177
- /* If the class name contains classTabDefault,
178
- then select this tab by default.
179
- */
180
- if (childNodes[i].className.match(this.REclassTabDefault)) {
181
- defaultTab = this.tabs.length-1;
182
- }
183
- }
184
- }
185
-
186
- /* Create a new UL list to hold the tab headings */
187
- DOM_ul = document.createElement("ul");
188
- DOM_ul.className = this.classNav;
189
-
190
- /* Loop through each tab we found */
191
- for (i=0; i < this.tabs.length; i++) {
192
-
193
- t = this.tabs[i];
194
-
195
- /* Get the label to use for this tab:
196
- From the title attribute on the DIV,
197
- Or from one of the this.titleElements[] elements,
198
- Or use an automatically generated number.
199
- */
200
- t.headingText = t.div.title;
201
-
202
- /* Remove the title attribute to prevent a tooltip from appearing */
203
- if (this.removeTitle) { t.div.title = ''; }
204
-
205
- if (!t.headingText) {
206
-
207
- /* Title was not defined in the title of the DIV,
208
- So try to get the title from an element within the DIV.
209
- Go through the list of elements in this.titleElements
210
- (typically heading elements ['h2','h3','h4'])
211
- */
212
- for (i2=0; i2<this.titleElements.length; i2++) {
213
- headingElement = t.div.getElementsByTagName(this.titleElements[i2])[0];
214
- if (headingElement) {
215
- t.headingText = headingElement.innerHTML;
216
- if (this.titleElementsStripHTML) {
217
- t.headingText.replace(/<br>/gi," ");
218
- t.headingText = t.headingText.replace(/<[^>]+>/g,"");
219
- }
220
- break;
221
- }
222
- }
223
- }
224
-
225
- if (!t.headingText) {
226
- /* Title was not found (or is blank) so automatically generate a
227
- number for the tab.
228
- */
229
- t.headingText = i + 1;
230
- }
231
-
232
- /* Create a list element for the tab */
233
- DOM_li = document.createElement("li");
234
-
235
- /* Save a reference to this list item so we can later change it to
236
- the "active" class */
237
- t.li = DOM_li;
238
-
239
- /* Create a link to activate the tab */
240
- DOM_a = document.createElement("a");
241
- DOM_a.appendChild(document.createTextNode(t.headingText));
242
- DOM_a.href = "javascript:void(null);";
243
- DOM_a.title = t.headingText;
244
- DOM_a.onclick = this.navClick;
245
-
246
- /* Add some properties to the link so we can identify which tab
247
- was clicked. Later the navClick method will need this.
248
- */
249
- DOM_a.tabber = this;
250
- DOM_a.tabberIndex = i;
251
-
252
- /* Do we need to add an id to DOM_a? */
253
- if (this.addLinkId && this.linkIdFormat) {
254
-
255
- /* Determine the id name */
256
- aId = this.linkIdFormat;
257
- aId = aId.replace(/<tabberid>/gi, this.id);
258
- aId = aId.replace(/<tabnumberzero>/gi, i);
259
- aId = aId.replace(/<tabnumberone>/gi, i+1);
260
- aId = aId.replace(/<tabtitle>/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, ''));
261
-
262
- DOM_a.id = aId;
263
- }
264
-
265
- /* Add the link to the list element */
266
- DOM_li.appendChild(DOM_a);
267
-
268
- /* Add the list element to the list */
269
- DOM_ul.appendChild(DOM_li);
270
- }
271
-
272
- /* Add the UL list to the beginning of the tabber div */
273
- e.insertBefore(DOM_ul, e.firstChild);
274
-
275
- /* Make the tabber div "live" so different CSS can be applied */
276
- e.className = e.className.replace(this.REclassMain, this.classMainLive);
277
-
278
- /* Activate the default tab, and do not call the onclick handler */
279
- this.tabShow(defaultTab);
280
-
281
- /* If the user specified an onLoad function, call it now. */
282
- if (typeof this.onLoad == 'function') {
283
- this.onLoad({tabber:this});
284
- }
285
-
286
- return this;
287
- };
288
-
289
-
290
- tabberObj.prototype.navClick = function(event)
291
- {
292
- /* This method should only be called by the onClick event of an <A>
293
- element, in which case we will determine which tab was clicked by
294
- examining a property that we previously attached to the <A>
295
- element.
296
-
297
- Since this was triggered from an onClick event, the variable
298
- "this" refers to the <A> element that triggered the onClick
299
- event (and not to the tabberObj).
300
-
301
- When tabberObj was initialized, we added some extra properties
302
- to the <A> element, for the purpose of retrieving them now. Get
303
- the tabberObj object, plus the tab number that was clicked.
304
- */
305
-
306
- var
307
- rVal, /* Return value from the user onclick function */
308
- a, /* element that triggered the onclick event */
309
- self, /* the tabber object */
310
- tabberIndex, /* index of the tab that triggered the event */
311
- onClickArgs; /* args to send the onclick function */
312
-
313
- a = this;
314
- if (!a.tabber) { return false; }
315
-
316
- self = a.tabber;
317
- tabberIndex = a.tabberIndex;
318
-
319
- /* Remove focus from the link because it looks ugly.
320
- I don't know if this is a good idea...
321
- */
322
- a.blur();
323
-
324
- /* If the user specified an onClick function, call it now.
325
- If the function returns false then do not continue.
326
- */
327
- if (typeof self.onClick == 'function') {
328
-
329
- onClickArgs = {'tabber':self, 'index':tabberIndex, 'event':event};
330
-
331
- /* IE uses a different way to access the event object */
332
- if (!event) { onClickArgs.event = window.event; }
333
-
334
- rVal = self.onClick(onClickArgs);
335
- if (rVal === false) { return false; }
336
- }
337
-
338
- self.tabShow(tabberIndex);
339
-
340
- return false;
341
- };
342
-
343
-
344
- tabberObj.prototype.tabHideAll = function()
345
- {
346
- var i; /* counter */
347
-
348
- /* Hide all tabs and make all navigation links inactive */
349
- for (i = 0; i < this.tabs.length; i++) {
350
- this.tabHide(i);
351
- }
352
- };
353
-
354
-
355
- tabberObj.prototype.tabHide = function(tabberIndex)
356
- {
357
- var div;
358
-
359
- if (!this.tabs[tabberIndex]) { return false; }
360
-
361
- /* Hide a single tab and make its navigation link inactive */
362
- div = this.tabs[tabberIndex].div;
363
-
364
- /* Hide the tab contents by adding classTabHide to the div */
365
- if (!div.className.match(this.REclassTabHide)) {
366
- div.className += ' ' + this.classTabHide;
367
- }
368
- this.navClearActive(tabberIndex);
369
-
370
- return this;
371
- };
372
-
373
-
374
- tabberObj.prototype.tabShow = function(tabberIndex)
375
- {
376
- /* Show the tabberIndex tab and hide all the other tabs */
377
-
378
- var div;
379
-
380
- if (!this.tabs[tabberIndex]) { return false; }
381
-
382
- /* Hide all the tabs first */
383
- this.tabHideAll();
384
-
385
- /* Get the div that holds this tab */
386
- div = this.tabs[tabberIndex].div;
387
-
388
- /* Remove classTabHide from the div */
389
- div.className = div.className.replace(this.REclassTabHide, '');
390
-
391
- /* Mark this tab navigation link as "active" */
392
- this.navSetActive(tabberIndex);
393
-
394
- /* If the user specified an onTabDisplay function, call it now. */
395
- if (typeof this.onTabDisplay == 'function') {
396
- this.onTabDisplay({'tabber':this, 'index':tabberIndex});
397
- }
398
-
399
- return this;
400
- };
401
-
402
- tabberObj.prototype.navSetActive = function(tabberIndex)
403
- {
404
- /* Note: this method does *not* enforce the rule
405
- that only one nav item can be active at a time.
406
- */
407
-
408
- /* Set classNavActive for the navigation list item */
409
- this.tabs[tabberIndex].li.className = this.classNavActive;
410
-
411
- return this;
412
- };
413
-
414
-
415
- tabberObj.prototype.navClearActive = function(tabberIndex)
416
- {
417
- /* Note: this method does *not* enforce the rule
418
- that one nav should always be active.
419
- */
420
-
421
- /* Remove classNavActive from the navigation list item */
422
- this.tabs[tabberIndex].li.className = '';
423
-
424
- return this;
425
- };
426
-
427
-
428
- /*==================================================*/
429
-
430
-
431
- function tabberAutomatic(tabberArgs)
432
- {
433
- /* This function finds all DIV elements in the document where
434
- class=tabber.classMain, then converts them to use the tabber
435
- interface.
436
-
437
- tabberArgs = an object to send to "new tabber()"
438
- */
439
- var
440
- tempObj, /* Temporary tabber object */
441
- divs, /* Array of all divs on the page */
442
- i; /* Loop index */
443
-
444
- if (!tabberArgs) { tabberArgs = {}; }
445
-
446
- /* Create a tabber object so we can get the value of classMain */
447
- tempObj = new tabberObj(tabberArgs);
448
-
449
- /* Find all DIV elements in the document that have class=tabber */
450
-
451
- /* First get an array of all DIV elements and loop through them */
452
- divs = document.getElementsByTagName("div");
453
- for (i=0; i < divs.length; i++) {
454
-
455
- /* Is this DIV the correct class? */
456
- if (divs[i].className &&
457
- divs[i].className.match(tempObj.REclassMain)) {
458
-
459
- /* Now tabify the DIV */
460
- tabberArgs.div = divs[i];
461
- divs[i].tabber = new tabberObj(tabberArgs);
462
- }
463
- }
464
-
465
- return this;
466
- }
467
-
468
-
469
- /*==================================================*/
470
-
471
-
472
- function tabberAutomaticOnLoad(tabberArgs)
473
- {
474
- /* This function adds tabberAutomatic to the window.onload event,
475
- so it will run after the document has finished loading.
476
- */
477
- var oldOnLoad;
478
-
479
- if (!tabberArgs) { tabberArgs = {}; }
480
-
481
- /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */
482
-
483
- oldOnLoad = window.onload;
484
- if (typeof window.onload != 'function') {
485
- window.onload = function() {
486
- tabberAutomatic(tabberArgs);
487
- };
488
- } else {
489
- window.onload = function() {
490
- oldOnLoad();
491
- tabberAutomatic(tabberArgs);
492
- };
493
- }
494
- }
495
-
496
-
497
- /*==================================================*/
498
-
499
-
500
- /* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */
501
-
502
- if (typeof tabberOptions == 'undefined') {
503
-
504
- tabberAutomaticOnLoad();
505
-
506
- } else {
507
-
508
- if (!tabberOptions['manualStartup']) {
509
- tabberAutomaticOnLoad(tabberOptions);
510
- }
511
-
512
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
language/deutsch.php CHANGED
File without changes
language/dutch.php CHANGED
File without changes
language/english.php CHANGED
@@ -14,7 +14,7 @@ define("LM_FRONT_FTP_USER_SUB","<small>example john</small>");
14
  define("LM_FRONT_FTP_PASS","<b>Ftp password:</b>");
15
  define("LM_FRONT_FTP_PASS_SUB","<small>example johnpass</small>");
16
  define("LM_FRONT_FTP_DIR","<b>Ftp directory:</b>");
17
- define("LM_FRONT_FTP_DIR_SUB","<small>Please provide the ftp directory of where you would like to install Joomla, example public_html/Joomla/ or htdocs/Joomla/ and make sure it has write permissions for everybody, usually 777</small>");
18
  define("LM_TRANSFER_FTP_INCT","Incremental transfer: ");
19
  define("LM_TRANSFER_FTP_INCT_SUB","will attempt to transfer the files over ftp in an incremental mode to avoid any blank pages or timeouts ");
20
  define("LM_FRONT_BOTTOM","Didn't worked for you? Please tell us what happened -> <a href='http://www.xcloner.com/contact/'>Contact page</a><br />
@@ -26,7 +26,7 @@ define("LM_NOPAKCAGE_ERROR","There is no package selected, aborting...!");
26
 
27
  //Amazon S3
28
  define("LM_AMAZON_S3", "Amazon S3 Storage");
29
- define("LM_AMAZON_S3_ACTIVATE", "Active:");
30
  define("LM_AMAZON_S3_AWSACCESSKEY", "AWS Access Key:");
31
  define("LM_AMAZON_S3_AWSSECRETKEY", "AWS Secret Key:");
32
  define("LM_AMAZON_S3_BUCKET", "Bucket name:");
@@ -63,8 +63,8 @@ define("LM_CONFIG_MYSQLU_SUB","");
63
  define("LM_CONFIG_MYSQLP_SUB","");
64
  define("LM_CONFIG_MYSQLD_SUB","");
65
 
66
- define("LM_TAB_AUTH","Authentification");
67
- define("LM_CONFIG_AUTH","User Authentification Area");
68
  define("LM_CONFIG_AUTH_USER","Login Username:");
69
  define("LM_CONFIG_AUTH_PASS","Login Password:");
70
  define("LM_CONFIG_AUTH_USER_SUB","this will be your default login user to XCloner");
@@ -72,7 +72,7 @@ define("LM_CONFIG_AUTH_PASS_SUB", "your default login password, leave blank if y
72
 
73
  define("LM_YES","Yes");
74
  define("LM_NO", "No");
75
- define("LM_ACTIVE","Active:");
76
  define("LM_TAR_PATH","Tar path or command:");
77
  define("LM_TAR_PATH_SUB","(required if archive type is Tar and Active box checked)");
78
  define("LM_ZIP_PATH","Zip path or command:");
@@ -84,10 +84,12 @@ define("LM_MYSQLDUMP_PATH","Mysqldump path or command: (required if Active box
84
  define("LM_CONFIG_MANUAL","Backup Manual Process");
85
  define("LM_CONFIG_MANUAL_BACKUP","Manual backup:");
86
  define("LM_CONFIG_MANUAL_BACKUP_SUB","This option is indicated if you have php time execution limitations on your server, this will require javascript activated on your browser");
87
- define("LM_CONFIG_MANUAL_FILES","Files to process per manual session:");
88
- define("LM_CONFIG_MANUAL_REFRESH","Time between sessions refresh:");
 
89
  define("LM_CONFIG_SYSTEM_MDATABASES","Backup Multiple Databases:");
90
  define("LM_CONFIG_SYSTEM_MDATABASES_SUB","this option controls wheteher XCloner may backup multiple databases");
 
91
 
92
  define("LM_CONFIG_CRON_LOCAL","Local server*");
93
  define("LM_CONFIG_CRON_REMOTE","Remote ftp account");
@@ -112,7 +114,7 @@ define("LM_CRON_IP","Cron Allowed IP's:");
112
  define("LM_CRON_IP_SUB","<small>by default, only the local server will have access to the cron job, but you may enter also other IP's one per line</small>");
113
  define("LM_CRON_DELETE_FILES","Delete Older Backups");
114
  define("LM_CRON_DELETE_FILES_SUB","Delete backups older than: ");
115
- define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Active:");
116
  define("LM_CRON_SEMAIL","Email cron log to: ");
117
  define("LM_CRON_SEMAIL_SUB","If an email address is set, after running a cron job, the cron log will be emailed to this address; multiple addresses can be added separated by ;");
118
  define("LM_CRON_MCRON","Configuration Name:");
@@ -120,6 +122,8 @@ 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");
@@ -166,9 +170,11 @@ define("LM_TAB_CRON","Cron");
166
  define("LM_TAB_INFO","Info");
167
  define("LM_TAB_G_DATABASE","Database Options");
168
  define("LM_TAB_G_FILES","Files Options");
 
169
  define("LM_G_EXCLUDE_COMMENT","<br>Please enter here the excluded folders, each one per line!
170
  <br><b>you may want to disable the cache feature when doing a backup, or if not exlude the cache folder from the backup</b>");
171
-
 
172
 
173
  // --- MESSAGES --//
174
  // front end
@@ -197,9 +203,9 @@ define("LM_MSG_BACK_14","<font color='red'>There was a problem in generating the
197
 
198
 
199
 
200
- define("LM_CRON_TOP","Setting up cron backup:");
201
- define("LM_CRON_SUB","<b>Using the cron function you can setup an automated backup generator for your Joomla website!</b>
202
- To set it up you need to add in your control panel crontab the following command:");
203
  define("LM_CRON_HELP","Notes:
204
  - if you php location is diferent than /usr/bin/php please use that one, format /$"."php_path/php
205
 
@@ -210,8 +216,7 @@ For more info on how to setup a cron for
210
  - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>click here</a>
211
  - General Linux crontab info <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>click here</a>
212
 
213
- If you need help setting it up or have problems please consult our forums <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a>
214
- or email us at <a href='mailto:info@xcloner.com'>info@xcloner.com</a>");
215
  define("LM_CRON_SETTINGS","Cron settings");
216
  define("LM_CRON_MODE","Backup store mode:");
217
  define("LM_CRON_MODE_INFO"," <br />
@@ -221,19 +226,19 @@ define("LM_CRON_MODE_INFO"," <br />
221
  ");
222
  define("LM_CRON_TYPE_INFO","<small><br /> please choose your backup type you would like to create</small>");
223
  define("LM_CRON_MYSQL_DETAILS","Mysql Options");
224
- define("LM_CRON_MYSQL_DROP","Add Mysql Drop:");
225
  define("LM_CRON_TYPE","Backup type:");
226
  define("LM_CRON_FTP_DETAILS","Ftp store mode details:");
227
  define("LM_CRON_FTP_SERVER","Ftp server:");
228
  define("LM_CRON_FTP_USER","Ftp username:");
229
  define("LM_CRON_FTP_PASS","Ftp password:");
230
  define("LM_CRON_FTP_PATH","Ftp path:");
231
- define("LM_CRON_FTP_DELB","Delete backup after transfer:");
232
  define("LM_CRON_EMAIL_DETAILS","Email mode details:");
233
  define("LM_CRON_EMAIL_ACCOUNT","Email account:");
234
  define("LM_CRON_COMPRESS","Compress backup files:");
235
- define("LM_RESTORE_TOP","Restoring your backups info:");
236
- define("LM_CREDIT_TOP","About XCloner:");
237
  define("LM_CLONE_FORM_TOP","<h2>Provide your ftp details below:</h2>");
238
 
239
  // --- Info Tab ---//
@@ -261,7 +266,7 @@ define("LM_CONFIG_INFO_TIME","<small>This controls the maximum time your script
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>");
@@ -280,7 +285,7 @@ define("LM_TRANSFER_FTP_USER_SUB","example 'john'");
280
  define("LM_TRANSFER_FTP_PASS","Ftp password:");
281
  define("LM_TRANSFER_FTP_PASS_SUB","example 'johnpass'");
282
  define("LM_TRANSFER_FTP_DIR","Ftp directory:");
283
- define("LM_TRANSFER_FTP_DIR_SUB","Please provide the ftp directory of where you would like to move the backup , example public_html/ or htdocs/ and make sure it has write permissions for everybody, usually 777");
284
 
285
 
286
  // --- GENERATE BACKUP---//
@@ -301,7 +306,7 @@ define("LM_COL_DATE" , "Date of Backup");
301
  define("LM_COL_FOLDER" , "<b>Excluded Folders and/or files</b>");
302
 
303
  define("LM_DELETE_FILE_SUCCESS", "Files Deleted");
304
- define("LM_DOWNLOAD_TITLE", "Download this Backup Set");
305
 
306
 
307
  define("LM_ARCHIVE_NAME" , "Archive Name");
@@ -313,7 +318,7 @@ define("LM_DATABASE_ARCHIVE" , "Database Backup");
313
 
314
  define("LM_CONFIRM_INSTRUCTIONS" , "<b>Please select the folders you wish to exclude from archive</b> <br />
315
  - by default all folders are included, if you wish to exlude a folder and it's subfolders just check the box next to it");
316
- define("LM_CONFIRM_DATABASE" , "Backup database and include in this backup set");
317
 
318
 
319
  define("LM_DATABASE_EXCLUDED", "Excluded");
@@ -330,11 +335,11 @@ define("LM_RENAME","Rename clone ");
330
  define("LM_RENAME_TO"," to ");
331
  // --- CLONER RESTORE--- //
332
 
333
- define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations INFO!</h2>
334
  <pre>
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
 
@@ -356,7 +361,7 @@ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations I
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
@@ -381,19 +386,27 @@ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations I
381
  // --- ABOUT CLONER---//
382
 
383
  define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2>
384
- <pre>XCloner is a tool that wil help you manage your Joomla website backups, generate/restore/move so your website will be always secured!
385
-
386
  Features:
387
- -cron script to generate backup
388
- -multiple backup options
389
- -restore tool to move the website rapidly to other locations
390
- -multiple locations of where you could store the backup safelly
 
 
 
 
 
 
 
 
391
 
392
  For reports and suggestions please contact us at info@xcloner.com or visit us on <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
393
- </pre>
394
  <br/><br/>
395
 
396
- XCloner.com &copy; 2004-2010 | <a href=\"http://www.xcloner.com\">www.xcloner.com</a>
397
  <br/><p/><br/>
398
  ");
399
 
14
  define("LM_FRONT_FTP_PASS","<b>Ftp password:</b>");
15
  define("LM_FRONT_FTP_PASS_SUB","<small>example johnpass</small>");
16
  define("LM_FRONT_FTP_DIR","<b>Ftp directory:</b>");
17
+ define("LM_FRONT_FTP_DIR_SUB","<small>Please provide the ftp directory of where you would like to install Joomla, example public_html/Joomla/ or htdocs/Joomla/ and make sure it has write permissions for everybody</small>");
18
  define("LM_TRANSFER_FTP_INCT","Incremental transfer: ");
19
  define("LM_TRANSFER_FTP_INCT_SUB","will attempt to transfer the files over ftp in an incremental mode to avoid any blank pages or timeouts ");
20
  define("LM_FRONT_BOTTOM","Didn't worked for you? Please tell us what happened -> <a href='http://www.xcloner.com/contact/'>Contact page</a><br />
26
 
27
  //Amazon S3
28
  define("LM_AMAZON_S3", "Amazon S3 Storage");
29
+ define("LM_AMAZON_S3_ACTIVATE", "Activate");
30
  define("LM_AMAZON_S3_AWSACCESSKEY", "AWS Access Key:");
31
  define("LM_AMAZON_S3_AWSSECRETKEY", "AWS Secret Key:");
32
  define("LM_AMAZON_S3_BUCKET", "Bucket name:");
63
  define("LM_CONFIG_MYSQLP_SUB","");
64
  define("LM_CONFIG_MYSQLD_SUB","");
65
 
66
+ define("LM_TAB_AUTH","Authentication");
67
+ define("LM_CONFIG_AUTH","User Authentication Area");
68
  define("LM_CONFIG_AUTH_USER","Login Username:");
69
  define("LM_CONFIG_AUTH_PASS","Login Password:");
70
  define("LM_CONFIG_AUTH_USER_SUB","this will be your default login user to XCloner");
72
 
73
  define("LM_YES","Yes");
74
  define("LM_NO", "No");
75
+ define("LM_ACTIVE","Active");
76
  define("LM_TAR_PATH","Tar path or command:");
77
  define("LM_TAR_PATH_SUB","(required if archive type is Tar and Active box checked)");
78
  define("LM_ZIP_PATH","Zip path or command:");
84
  define("LM_CONFIG_MANUAL","Backup Manual Process");
85
  define("LM_CONFIG_MANUAL_BACKUP","Manual backup:");
86
  define("LM_CONFIG_MANUAL_BACKUP_SUB","This option is indicated if you have php time execution limitations on your server, this will require javascript activated on your browser");
87
+ define("LM_CONFIG_MANUAL_FILES","Files to process per request:");
88
+ define("LM_CONFIG_DB_RECORDS", "Database records per request");
89
+ define("LM_CONFIG_MANUAL_REFRESH","Time between requests:");
90
  define("LM_CONFIG_SYSTEM_MDATABASES","Backup Multiple Databases:");
91
  define("LM_CONFIG_SYSTEM_MDATABASES_SUB","this option controls wheteher XCloner may backup multiple databases");
92
+ define("LM_CONFIG_EXCLUDE_FILES_SIZE","Exclude files larger than:");
93
 
94
  define("LM_CONFIG_CRON_LOCAL","Local server*");
95
  define("LM_CONFIG_CRON_REMOTE","Remote ftp account");
114
  define("LM_CRON_IP_SUB","<small>by default, only the local server will have access to the cron job, but you may enter also other IP's one per line</small>");
115
  define("LM_CRON_DELETE_FILES","Delete Older Backups");
116
  define("LM_CRON_DELETE_FILES_SUB","Delete backups older than: ");
117
+ define("LM_CRON_DELETE_FILES_SUB_ACTIVE"," Activate");
118
  define("LM_CRON_SEMAIL","Email cron log to: ");
119
  define("LM_CRON_SEMAIL_SUB","If an email address is set, after running a cron job, the cron log will be emailed to this address; multiple addresses can be added separated by ;");
120
  define("LM_CRON_MCRON","Configuration Name:");
122
  define("LM_CRON_MCRON_R","please provide a simple name for your new cron configuration");
123
  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");
124
  define("LM_CRON_SETTINGS_M","Multiple CronJobs Configuration");
125
+ define("LM_CONFIG_SPLIT_BACKUP_SIZE", "Split Backup Archive if size larger than:");
126
+
127
  // --- MENU ---//
128
  define("LM_MENU_OPEN_ALL", "open all");
129
  define("LM_MENU_CLOSE_ALL", "close all");
170
  define("LM_TAB_INFO","Info");
171
  define("LM_TAB_G_DATABASE","Database Options");
172
  define("LM_TAB_G_FILES","Files Options");
173
+ define("LM_TAB_G_COMMENTS","Backup Comments");
174
  define("LM_G_EXCLUDE_COMMENT","<br>Please enter here the excluded folders, each one per line!
175
  <br><b>you may want to disable the cache feature when doing a backup, or if not exlude the cache folder from the backup</b>");
176
+ define("LM_TAB_G_COMMENTS_H2", "Enter below any additional comments to archive:");
177
+ define("LM_TAB_G_COMMENTS_NOTE","Please note, the comments are store inside the archive, file <b>administrator/backups/.comments</b>");
178
 
179
  // --- MESSAGES --//
180
  // front end
203
 
204
 
205
 
206
+ define("LM_CRON_TOP","Cron Command Setup");
207
+ define("LM_CRON_SUB","<b>Using the cron function you can setup an automated backup generator for your website!</b>
208
+ <br />To set it up, you need to add in your control panel crontab one of the following commands:");
209
  define("LM_CRON_HELP","Notes:
210
  - if you php location is diferent than /usr/bin/php please use that one, format /$"."php_path/php
211
 
216
  - Interworx <a href='http://www.sagonet.com/interworx/tutorials/siteworx/cron.php' target='_blank'>click here</a>
217
  - General Linux crontab info <a href='http://www.computerhope.com/unix/ucrontab.htm#01' target='_blank'>click here</a>
218
 
219
+ If you need help setting up your cron job, please visit our forums <a href='http://www.xcloner.com/support/forums/'>http://www.xcloner.com/support/forums/</a>");
 
220
  define("LM_CRON_SETTINGS","Cron settings");
221
  define("LM_CRON_MODE","Backup store mode:");
222
  define("LM_CRON_MODE_INFO"," <br />
226
  ");
227
  define("LM_CRON_TYPE_INFO","<small><br /> please choose your backup type you would like to create</small>");
228
  define("LM_CRON_MYSQL_DETAILS","Mysql Options");
229
+ define("LM_CRON_MYSQL_DROP","Add Mysql Drop");
230
  define("LM_CRON_TYPE","Backup type:");
231
  define("LM_CRON_FTP_DETAILS","Ftp store mode details:");
232
  define("LM_CRON_FTP_SERVER","Ftp server:");
233
  define("LM_CRON_FTP_USER","Ftp username:");
234
  define("LM_CRON_FTP_PASS","Ftp password:");
235
  define("LM_CRON_FTP_PATH","Ftp path:");
236
+ define("LM_CRON_FTP_DELB","Delete backup after transfer");
237
  define("LM_CRON_EMAIL_DETAILS","Email mode details:");
238
  define("LM_CRON_EMAIL_ACCOUNT","Email account:");
239
  define("LM_CRON_COMPRESS","Compress backup files:");
240
+ define("LM_RESTORE_TOP","Restoring your backups info");
241
+ define("LM_CREDIT_TOP","About XCloner");
242
  define("LM_CLONE_FORM_TOP","<h2>Provide your ftp details below:</h2>");
243
 
244
  // --- Info Tab ---//
266
  define("LM_CONFIG_INFO_MEMORY","<small>This controls the maximum memory the script may allocate for it's processes</small>");
267
  define("LM_CONFIG_INFO_BASEDIR","<small>This controls the paths your script is allowed to access, no value means it can access any path </small>");
268
  define("LM_CONFIG_INFO_SAFEMODE","<small>safe mode will need to be set to Off in order for XCloner to work properly </small>");
269
+ define("LM_CONFIG_INFO_VERSION","<small>PHP >=5.2.3 is required to enjoy all features</small>");
270
  define("LM_CONFIG_INFO_TAR","<small>If the script is unable to determine the tar path automatically, you might need to uncheck the 'Active' checkbox near TAR line in General Tab</small>");
271
  define("LM_CONFIG_INFO_ZIP","<small>If the script is unable to determine the zip path automatically, you might need to uncheck the 'Active' checkbox near ZIP line in General Tab</small>");
272
  define("LM_CONFIG_INFO_MSQL","<small>If the script is unable to determine the mysqldump path automatically, you might need to uncheck the 'Active' checkbox near MYSQLDUMP line in General Tabn</small>");
285
  define("LM_TRANSFER_FTP_PASS","Ftp password:");
286
  define("LM_TRANSFER_FTP_PASS_SUB","example 'johnpass'");
287
  define("LM_TRANSFER_FTP_DIR","Ftp directory:");
288
+ define("LM_TRANSFER_FTP_DIR_SUB","Please provide the ftp directory of where you would like to move the backup , example public_html/ or htdocs/ and make sure it has write permissions for everybody");
289
 
290
 
291
  // --- GENERATE BACKUP---//
306
  define("LM_COL_FOLDER" , "<b>Excluded Folders and/or files</b>");
307
 
308
  define("LM_DELETE_FILE_SUCCESS", "Files Deleted");
309
+ define("LM_DOWNLOAD_TITLE", "Download");
310
 
311
 
312
  define("LM_ARCHIVE_NAME" , "Archive Name");
318
 
319
  define("LM_CONFIRM_INSTRUCTIONS" , "<b>Please select the folders you wish to exclude from archive</b> <br />
320
  - by default all folders are included, if you wish to exlude a folder and it's subfolders just check the box next to it");
321
+ define("LM_CONFIRM_DATABASE" , "Backup Database");
322
 
323
 
324
  define("LM_DATABASE_EXCLUDED", "Excluded");
335
  define("LM_RENAME_TO"," to ");
336
  // --- CLONER RESTORE--- //
337
 
338
+ define("LM_CLONER_RESTORE","<h2>How to restore a backup on different locations INFO!</h2><br />
339
  <pre>
340
  Restoring your backups has never been more easier!
341
  With the help of our cloning function from the <a href='index2.php?option=com_cloner&task=view'>View Backups</a> screen
342
+ you will be able to move your website backup anywhere on the Internet.
343
 
344
  Here is what you have to do:
345
 
361
  <b>Step 2 - the XCloner.php restore screen:</b>
362
 
363
  <b>XCloner.php - the restore script</b>
364
+ - at this step you have in place the backup you created and the Restore script
365
  - enter you new mysql details, this includes your new mysql hostname, user and pass, and a new database
366
  different from the original one
367
  - enter you new location Url and pass
386
  // --- ABOUT CLONER---//
387
 
388
  define("LM_CLONER_ABOUT","<h2>XCloner Backup</h2>
389
+ XCloner is a tool that wil help you manage your website backups, Generate/Restore/Move so your website will be always secured!
390
+ <br /><br />
391
  Features:
392
+ <ul>
393
+ <li>cron script to generate automatic backups</li>
394
+ <li>multiple backup options</li>
395
+ <li>restore tool to move the website rapidly to other locations</li>
396
+ <li>store the backup locally, on remotely</li>
397
+ <li>AJAX/JSON backup interface</li>
398
+ <li>standalone code, can backup any PHP/Mysql website</li>
399
+ <li>incremental database and files backup</li>
400
+ <li>incremental file system scanning</li>
401
+ <li>amazon S3 support</li>
402
+ </ul>
403
+ <br />
404
 
405
  For reports and suggestions please contact us at info@xcloner.com or visit us on <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
406
+
407
  <br/><br/>
408
 
409
+ XCloner.com &copy; 2004-2011 | <a href=\"http://www.xcloner.com\">www.xcloner.com</a>
410
  <br/><p/><br/>
411
  ");
412
 
language/index.html CHANGED
File without changes
language/spanish.php CHANGED
File without changes
license.txt CHANGED
@@ -1,2 +1,340 @@
1
- The software source code has not been encrypt, however JoomlaPlug.com reserves the rights to the code ownership,
2
- and will only be providing support to Premium users who purchased a JoomlaCloner License
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
340
+
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === XCloner - Backup and Restore===
2
  Contributors: xcloner
3
  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.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
 
@@ -26,15 +26,11 @@ XCloner Generate, Move and Restore process:
26
 
27
  Features:
28
 
29
- * Backup and Restore any PHP/Mysql application
30
-
31
- * Create custom backups
32
-
33
- * Generate automatic backups based on cronjobs
34
-
35
- * Restore your backups anywhere
36
-
37
- * Share your custom backups with your clients
38
 
39
 
40
  == Installation ==
@@ -44,14 +40,9 @@ Features:
44
  3. Create directory administrator/backups and make it writeable under your Wordpress site root
45
  4. Access it from the Plugins->XCloner menu
46
 
47
- IMPORTANT:
48
-
49
- If the plugin was downloaded from the xcloner.com website, follow this install:
50
-
51
- 1. Upload the package files to your Wordpress ROOT directory
52
- 2. Activate the plugin
53
- 3. Create directory administrator/backups and make it writeable under your Wordpress site root
54
- 4. Access it from the Plugins->XCloner menu
55
 
56
  == Frequently Asked Questions ==
57
 
@@ -67,13 +58,24 @@ If the inside Clone option fails for some reason, you need to:
67
  == Screenshots ==
68
 
69
  1. Login screen
70
- 2. Config area
71
- 3. Config options
72
- 4. Generate Backup -> database options
73
- 5. Generate Backup -> files options
 
 
 
74
 
75
  == Changelog ==
76
 
 
 
 
 
 
 
 
 
77
  = 2.2.1 =
78
  * Added JSON AJAX interface to the Generate Backup process
79
  * Added incremental filesystem scan
@@ -81,15 +83,12 @@ If the inside Clone option fails for some reason, you need to:
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
1
  === XCloner - Backup and Restore===
2
  Contributors: xcloner
3
  Donate link: http://www.xcloner.com/
4
+ Tags: backup, restore, admin, plugin, database, full backup, cloner, xcloner, theme, files, upload, wordpress backup, backup plugin, database backup, database restore, site move, transfer, blog transfer, BuddyPress
5
  Requires at least: 2.0.2
6
+ Tested up to: 3.1
7
+ Stable tag: 3.0
8
 
9
  XCloner is a full backup and restore plugin for Wordpress, it will backup and restore both files and database. www.xcloner.com
10
 
26
 
27
  Features:
28
 
29
+ * Backup and Restore any PHP/Mysql application
30
+ * Create custom backups
31
+ * Generate automatic backups based on cronjobs
32
+ * Restore your backups anywhere
33
+ * Share your custom backups with your clients
 
 
 
 
34
 
35
 
36
  == Installation ==
40
  3. Create directory administrator/backups and make it writeable under your Wordpress site root
41
  4. Access it from the Plugins->XCloner menu
42
 
43
+ UPGRADE:
44
+
45
+ If you plan on upgrading your XCloner installation, to keep it's original setting, please keep a copy after your wp-content/plugins/xcloner-backup-and-restore/cloner.config.php file, and re-upload it after the upgrade.
 
 
 
 
 
46
 
47
  == Frequently Asked Questions ==
48
 
58
  == Screenshots ==
59
 
60
  1. Login screen
61
+ 2. Welcome screen
62
+ 3. Config options General tab
63
+ 4. COnfig options System tab
64
+ 5. View Backups
65
+ 6. Generate Backup -> database options
66
+ 7. Generate Backup -> files options
67
+ 8. Restore screen
68
 
69
  == Changelog ==
70
 
71
+ = 3.0 =
72
+ * incremental database backup
73
+ * incremental file system scan
74
+ * backup size limit and option to split it into additional archives, default 2GB
75
+ * exclude files larger than a certain size option
76
+ * incremental files restore
77
+ * JQuery Start interface
78
+
79
  = 2.2.1 =
80
  * Added JSON AJAX interface to the Generate Backup process
81
  * Added incremental filesystem scan
83
  * php >=5.2.0 version check
84
 
85
  = 2.1.2 =
86
+ * Added Amazon S3 cron storage support
87
 
88
  = 2.1 =
89
+ * Initial release
90
 
91
  == Upgrade Notice ==
92
 
93
+ = 3.0 =
94
+ Please check the changelog, there are several improvements, including better interface, better incremental backup process, as well as several restore addons and speed improvements
 
 
 
recursive.php DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
- $startdir = "D:/server/wamp/www/";
3
- $dir = $startdir;
4
- $last_file = "..";
5
- $recursive_limit = 400;
6
-
7
-
8
- $f_arr = array();
9
- $d_arr = array() ;
10
- #$dir = "E:/server/www/Joomla/xcloner/images";
11
-
12
- while($i++ < 100){
13
-
14
- $count = 0;
15
- $k = 0;
16
- $return = "";
17
- $last = recursive($dir, $last_file);
18
- echo "<br /><b>Lastdir:</b> $last<br />" ;
19
-
20
- if(dirname($last) == dirname($startdir)){
21
-
22
- $f_arr = array_unique($f_arr);
23
- $d_arr = array_unique($d_arr);
24
- sort($f_arr);
25
- sort($d_arr);
26
- echo "<b>Recurse finished! Files: ".sizeof($f_arr)." ; Directories: ".sizeof($d_arr)."</b>";
27
- #print_r($f_arr);
28
- break;
29
- }
30
-
31
- #echo $last_return;
32
- if((!is_dir($last))||($last_return == 1))
33
- {
34
- $dir = dirname($last);
35
- $last_file = basename ($last);
36
- }
37
- else{
38
- $dir = $last;
39
- $last_file = '..';
40
-
41
- }
42
-
43
-
44
-
45
- }
46
-
47
- function recursive( $dir , $last_file = '..')
48
- { global $count, $return, $k, $startdir, $last_return, $recursive_limit, $f_arr, $d_arr;
49
-
50
- #echo "<br /><b>Opening $dir with last file $last_file</b><br />";
51
- $last_return = 0;
52
-
53
- if (is_dir($dir)) {
54
- if ($dh = opendir($dir)) {
55
- while (($file = readdir($dh)) !== false ) {
56
-
57
- #echo $file."--".$last_file."<br />";
58
-
59
- if (($file != $last_file)&&($k == 0))
60
- continue;
61
- elseif(($file == $last_file)&&($file != '..')){
62
- $k = 1;
63
- continue;
64
- }else{
65
-
66
- $k =1 ;
67
- }
68
- #echo "<b>".$file."</b>";
69
-
70
- if( $file != "." && $file != ".." )
71
- {
72
- $cfile = "$dir/$file";
73
-
74
- if($count == $recursive_limit){
75
-
76
- if($return == "")
77
- $return = $cfile;
78
-
79
- $last_return = 2;
80
-
81
- if(is_dir($cfile))
82
- $d_arr[] = $cfile;
83
- else
84
- $f_arr[] = $cfile;
85
-
86
- echo "return here with $cfile";return $return ;
87
- }
88
-
89
- ++$count;
90
-
91
- if( is_dir( $dir ."/". $file ) )
92
- {
93
- echo "<b>Entering Directory: $cfile</b><br/>";
94
- $d_arr[] = $cfile;
95
- recursive( $cfile );
96
-
97
- }
98
- else
99
- {
100
-
101
- echo "file: $cfile<br/>";
102
-
103
- $f_arr[] = $cfile;
104
-
105
- }
106
- }
107
- }
108
- closedir($dh);
109
- }
110
- }
111
-
112
- $last_return = 1;
113
- return $dir;
114
-
115
- }
116
-
117
-
118
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
restore/TAR.php CHANGED
@@ -383,14 +383,14 @@ class archive_tar
383
  function addString($p_filename, $p_string)
384
  {
385
  $v_result = true;
386
-
387
  if (!$this->_isArchive()) {
388
  if (!$this->_openWrite()) {
389
  return false;
390
  }
391
  $this->_close();
392
  }
393
-
394
  if (!$this->_openAppend())
395
  return false;
396
 
@@ -530,12 +530,12 @@ class archive_tar
530
  function setAttribute()
531
  {
532
  $v_result = true;
533
-
534
  // ----- Get the number of variable list of arguments
535
  if (($v_size = func_num_args()) == 0) {
536
  return true;
537
  }
538
-
539
  // ----- Get the arguments
540
  $v_att_list = &func_get_args();
541
 
@@ -1393,13 +1393,236 @@ class archive_tar
1393
  // }}}
1394
 
1395
  // {{{ _extractList()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1396
  function _extractList($p_path, &$p_list_detail, $p_mode,
1397
- $p_file_list, $p_remove_path)
1398
  {
1399
  $v_result=true;
1400
  $v_nb = 0;
1401
  $v_extract_all = true;
1402
  $v_listing = false;
 
1403
 
1404
  $p_path = $this->_translateWinPath($p_path, false);
1405
  if ($p_path == '' || (substr($p_path, 0, 1) != '/'
@@ -1435,6 +1658,7 @@ class archive_tar
1435
 
1436
  while (strlen($v_binary_data = $this->_readBlock()) != 0)
1437
  {
 
1438
  $v_extract_file = FALSE;
1439
  $v_extraction_stopped = 0;
1440
 
@@ -1445,6 +1669,11 @@ class archive_tar
1445
  continue;
1446
  }
1447
 
 
 
 
 
 
1448
  // ----- Look for long filename
1449
  if ($v_header['typeflag'] == 'L') {
1450
  if (!$this->_readLongHeader($v_header))
@@ -1612,12 +1841,46 @@ class archive_tar
1612
  }
1613
  // }}}
1614
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1615
  // {{{ _openAppend()
1616
  function _openAppend()
1617
  {
1618
  if (filesize($this->_tarname) == 0)
1619
  return $this->_openWrite();
1620
-
1621
  if ($this->_compress) {
1622
  $this->_close();
1623
 
@@ -1632,7 +1895,7 @@ class archive_tar
1632
  $v_temp_tar = @gzopen($this->_tarname.".tmp", "rb");
1633
  elseif ($this->_compress_type == 'bz2')
1634
  $v_temp_tar = @bzopen($this->_tarname.".tmp", "rb");
1635
-
1636
  if ($v_temp_tar == 0) {
1637
  $this->_error('Unable to open file \''.$this->_tarname
1638
  .'.tmp\' in binary read mode');
@@ -1686,14 +1949,14 @@ class archive_tar
1686
  $v_size = filesize($this->_tarname);
1687
 
1688
  // We might have zero, one or two end blocks.
1689
- // The standard is two, but we should try to handle
1690
  // other cases.
1691
  fseek($this->_file, $v_size - 1024);
1692
  if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1693
  fseek($this->_file, $v_size - 1024);
1694
  }
1695
  elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1696
- fseek($this->_file, $v_size - 512);
1697
  }
1698
  }
1699
 
@@ -1706,7 +1969,7 @@ class archive_tar
1706
  {
1707
  if (!$this->_openAppend())
1708
  return false;
1709
-
1710
  if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir))
1711
  $this->_writeFooter();
1712
 
@@ -1752,7 +2015,7 @@ class archive_tar
1752
  // {{{ _pathReduction()
1753
 
1754
  /**
1755
- * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
1756
  * rand emove double slashes.
1757
  *
1758
  * @param string $p_dir path to reduce
383
  function addString($p_filename, $p_string)
384
  {
385
  $v_result = true;
386
+
387
  if (!$this->_isArchive()) {
388
  if (!$this->_openWrite()) {
389
  return false;
390
  }
391
  $this->_close();
392
  }
393
+
394
  if (!$this->_openAppend())
395
  return false;
396
 
530
  function setAttribute()
531
  {
532
  $v_result = true;
533
+
534
  // ----- Get the number of variable list of arguments
535
  if (($v_size = func_num_args()) == 0) {
536
  return true;
537
  }
538
+
539
  // ----- Get the arguments
540
  $v_att_list = &func_get_args();
541
 
1393
  // }}}
1394
 
1395
  // {{{ _extractList()
1396
+ function _extractList_vbdata($p_path, &$p_list_detail, $p_mode,
1397
+ $p_file_list, $p_remove_path, $v_binary_data)
1398
+ {
1399
+ $v_result=true;
1400
+ $v_nb = 0;
1401
+ $v_extract_all = true;
1402
+ $v_listing = false;
1403
+
1404
+ $p_path = $this->_translateWinPath($p_path, false);
1405
+ if ($p_path == '' || (substr($p_path, 0, 1) != '/'
1406
+ && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))) {
1407
+ $p_path = "./".$p_path;
1408
+ }
1409
+ $p_remove_path = $this->_translateWinPath($p_remove_path);
1410
+
1411
+ // ----- Look for path to remove format (should end by /)
1412
+ if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/'))
1413
+ $p_remove_path .= '/';
1414
+ $p_remove_path_size = strlen($p_remove_path);
1415
+
1416
+ switch ($p_mode) {
1417
+ case "complete" :
1418
+ $v_extract_all = TRUE;
1419
+ $v_listing = FALSE;
1420
+ break;
1421
+ case "partial" :
1422
+ $v_extract_all = FALSE;
1423
+ $v_listing = FALSE;
1424
+ break;
1425
+ case "list" :
1426
+ $v_extract_all = FALSE;
1427
+ $v_listing = TRUE;
1428
+ break;
1429
+ default :
1430
+ $this->_error('Invalid extract mode ('.$p_mode.')');
1431
+ return false;
1432
+ }
1433
+
1434
+ clearstatcache();
1435
+
1436
+ //while (strlen($v_binary_data = $this->_readBlock()) != 0)
1437
+ {
1438
+ $v_extract_file = FALSE;
1439
+ $v_extraction_stopped = 0;
1440
+
1441
+ if (!$this->_readHeader($v_binary_data, $v_header))
1442
+ return false;
1443
+
1444
+ if ($v_header['filename'] == '') {
1445
+ continue;
1446
+ }
1447
+
1448
+ // ----- Look for long filename
1449
+ if ($v_header['typeflag'] == 'L') {
1450
+ if (!$this->_readLongHeader($v_header))
1451
+ return false;
1452
+ }
1453
+
1454
+ #if ((!$v_extract_all) && (is_array($p_file_list)))
1455
+ #{
1456
+ // ----- By default no unzip if the file is not found
1457
+ $v_extract_file = true;
1458
+
1459
+ /*for ($i=0; $i<sizeof($p_file_list); $i++) {
1460
+ // ----- Look if it is a directory
1461
+ if (substr($p_file_list[$i], -1) == '/') {
1462
+ // ----- Look if the directory is in the filename path
1463
+ if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
1464
+ && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
1465
+ == $p_file_list[$i])) {
1466
+ $v_extract_file = TRUE;
1467
+ break;
1468
+ }
1469
+ }
1470
+
1471
+ // ----- It is a file, so compare the file names
1472
+ elseif ($p_file_list[$i] == $v_header['filename']) {
1473
+ $v_extract_file = TRUE;
1474
+ break;
1475
+ }
1476
+ }
1477
+ } else {
1478
+ $v_extract_file = TRUE;
1479
+ }*/
1480
+
1481
+ // ----- Look if this file need to be extracted
1482
+ if (($v_extract_file) && (!$v_listing))
1483
+ {
1484
+ if (($p_remove_path != '')
1485
+ && (substr($v_header['filename'], 0, $p_remove_path_size)
1486
+ == $p_remove_path))
1487
+ $v_header['filename'] = substr($v_header['filename'],
1488
+ $p_remove_path_size);
1489
+ if (($p_path != './') && ($p_path != '/')) {
1490
+ while (substr($p_path, -1) == '/')
1491
+ $p_path = substr($p_path, 0, strlen($p_path)-1);
1492
+
1493
+ if (substr($v_header['filename'], 0, 1) == '/')
1494
+ $v_header['filename'] = $p_path.$v_header['filename'];
1495
+ else
1496
+ $v_header['filename'] = $p_path.'/'.$v_header['filename'];
1497
+ }
1498
+ if (file_exists($v_header['filename'])) {
1499
+ if ( (@is_dir($v_header['filename']))
1500
+ && ($v_header['typeflag'] == '')) {
1501
+ $this->_error('File '.$v_header['filename']
1502
+ .' already exists as a directory');
1503
+ return false;
1504
+ }
1505
+ if ( ($this->_isArchive($v_header['filename']))
1506
+ && ($v_header['typeflag'] == "5")) {
1507
+ $this->_error('Directory '.$v_header['filename']
1508
+ .' already exists as a file');
1509
+ return false;
1510
+ }
1511
+ if (!is_writeable($v_header['filename'])) {
1512
+ $this->_error('File '.$v_header['filename']
1513
+ .' already exists and is write protected');
1514
+ return false;
1515
+ }
1516
+ if (filemtime($v_header['filename']) > $v_header['mtime']) {
1517
+ // To be completed : An error or silent no replace ?
1518
+ }
1519
+ }
1520
+
1521
+ // ----- Check the directory availability and create it if necessary
1522
+ elseif (($v_result
1523
+ = $this->_dirCheck(($v_header['typeflag'] == "5"
1524
+ ?$v_header['filename']
1525
+ :dirname($v_header['filename'])))) != 1) {
1526
+ $this->_error('Unable to create path for '.$v_header['filename']);
1527
+ return false;
1528
+ }
1529
+
1530
+ if ($v_extract_file) {
1531
+ if ($v_header['typeflag'] == "5") {
1532
+ if (!@file_exists($v_header['filename'])) {
1533
+ if (!@mkdir($v_header['filename'], 0777)) {
1534
+ $this->_error('Unable to create directory {'
1535
+ .$v_header['filename'].'}');
1536
+ return false;
1537
+ }
1538
+ }
1539
+ } elseif ($v_header['typeflag'] == "2") {
1540
+ if (!@symlink($v_header['link'], $v_header['filename'])) {
1541
+ $this->_error('Unable to extract symbolic link {'
1542
+ .$v_header['filename'].'}');
1543
+ return false;
1544
+ }
1545
+ } else {
1546
+ if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
1547
+ $this->_error('Error while opening {'.$v_header['filename']
1548
+ .'} in write binary mode');
1549
+ return false;
1550
+ } else {
1551
+ $n = floor($v_header['size']/512);
1552
+ for ($i=0; $i<$n; $i++) {
1553
+ $v_content = $this->_readBlock();
1554
+ fwrite($v_dest_file, $v_content, 512);
1555
+ }
1556
+ if (($v_header['size'] % 512) != 0) {
1557
+ $v_content = $this->_readBlock();
1558
+ fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
1559
+ }
1560
+
1561
+ @fclose($v_dest_file);
1562
+
1563
+ // ----- Change the file mode, mtime
1564
+ @touch($v_header['filename'], $v_header['mtime']);
1565
+ if ($v_header['mode'] & 0111) {
1566
+ // make file executable, obey umask
1567
+ $mode = fileperms($v_header['filename']) | (~umask() & 0111);
1568
+ @chmod($v_header['filename'], $mode);
1569
+ }
1570
+ }
1571
+
1572
+ // ----- Check the file size
1573
+ clearstatcache();
1574
+ if (filesize($v_header['filename']) != $v_header['size']) {
1575
+ $this->_error('Extracted file '.$v_header['filename']
1576
+ .' does not have the correct file size \''
1577
+ .filesize($v_header['filename'])
1578
+ .'\' ('.$v_header['size']
1579
+ .' expected). Archive may be corrupted.');
1580
+ return false;
1581
+ }
1582
+ }
1583
+ } else {
1584
+ $this->_jumpBlock(ceil(($v_header['size']/512)));
1585
+ }
1586
+ } else {
1587
+ $this->_jumpBlock(ceil(($v_header['size']/512)));
1588
+ }
1589
+
1590
+ /* TBC : Seems to be unused ...
1591
+ if ($this->_compress)
1592
+ $v_end_of_file = @gzeof($this->_file);
1593
+ else
1594
+ $v_end_of_file = @feof($this->_file);
1595
+ */
1596
+
1597
+ if ($v_listing || $v_extract_file || $v_extraction_stopped) {
1598
+ // ----- Log extracted files
1599
+ if (($v_file_dir = dirname($v_header['filename']))
1600
+ == $v_header['filename'])
1601
+ $v_file_dir = '';
1602
+ if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == ''))
1603
+ $v_file_dir = '/';
1604
+
1605
+ $p_list_detail[$v_nb++] = $v_header;
1606
+ if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
1607
+ return true;
1608
+ }
1609
+ }
1610
+ }
1611
+
1612
+ return true;
1613
+ }
1614
+ // }}}
1615
+
1616
+
1617
+ // {{{ _extractList()
1618
  function _extractList($p_path, &$p_list_detail, $p_mode,
1619
+ $p_file_list, $p_remove_path, $limit=0)
1620
  {
1621
  $v_result=true;
1622
  $v_nb = 0;
1623
  $v_extract_all = true;
1624
  $v_listing = false;
1625
+ $inc = 0;
1626
 
1627
  $p_path = $this->_translateWinPath($p_path, false);
1628
  if ($p_path == '' || (substr($p_path, 0, 1) != '/'
1658
 
1659
  while (strlen($v_binary_data = $this->_readBlock()) != 0)
1660
  {
1661
+
1662
  $v_extract_file = FALSE;
1663
  $v_extraction_stopped = 0;
1664
 
1669
  continue;
1670
  }
1671
 
1672
+ //Ovi's code
1673
+ if(($inc >= $limit) and ($limit !=0))
1674
+ return ftell($this->_file);
1675
+ $inc++;
1676
+
1677
  // ----- Look for long filename
1678
  if ($v_header['typeflag'] == 'L') {
1679
  if (!$this->_readLongHeader($v_header))
1841
  }
1842
  // }}}
1843
 
1844
+ //extract file by sending v_header and setting seek position
1845
+ function extractFile($tar, &$v_header)
1846
+ {
1847
+ $v_result_str = "";
1848
+ $p_filename = $v_header['filename'];
1849
+
1850
+ // ----- Look for long filename
1851
+ if ($v_header['typeflag'] == 'L') {
1852
+ if (!$tar->_readLongHeader($v_header))
1853
+ return NULL;
1854
+ }
1855
+
1856
+ if ($v_header['typeflag'] == "5") {
1857
+ $tar->_error('Unable to extract in string a directory '
1858
+ .'entry {'.$v_header['filename'].'}');
1859
+ return NULL;
1860
+ } else {
1861
+ $n = floor($v_header['size']/512);
1862
+ for ($i=0; $i<$n; $i++) {
1863
+ $v_result_str .= $tar->_readBlock();
1864
+ }
1865
+ if (($v_header['size'] % 512) != 0) {
1866
+ $v_content = $tar->_readBlock();
1867
+ $v_result_str .= substr($v_content, 0,
1868
+ ($v_header['size'] % 512));
1869
+ }
1870
+ return $v_result_str;
1871
+ }
1872
+
1873
+
1874
+ return NULL;
1875
+ }
1876
+
1877
+
1878
  // {{{ _openAppend()
1879
  function _openAppend()
1880
  {
1881
  if (filesize($this->_tarname) == 0)
1882
  return $this->_openWrite();
1883
+
1884
  if ($this->_compress) {
1885
  $this->_close();
1886
 
1895
  $v_temp_tar = @gzopen($this->_tarname.".tmp", "rb");
1896
  elseif ($this->_compress_type == 'bz2')
1897
  $v_temp_tar = @bzopen($this->_tarname.".tmp", "rb");
1898
+
1899
  if ($v_temp_tar == 0) {
1900
  $this->_error('Unable to open file \''.$this->_tarname
1901
  .'.tmp\' in binary read mode');
1949
  $v_size = filesize($this->_tarname);
1950
 
1951
  // We might have zero, one or two end blocks.
1952
+ // The standard is two, but we should try to handle
1953
  // other cases.
1954
  fseek($this->_file, $v_size - 1024);
1955
  if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1956
  fseek($this->_file, $v_size - 1024);
1957
  }
1958
  elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
1959
+ fseek($this->_file, $v_size - 512);
1960
  }
1961
  }
1962
 
1969
  {
1970
  if (!$this->_openAppend())
1971
  return false;
1972
+
1973
  if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir))
1974
  $this->_writeFooter();
1975
 
2015
  // {{{ _pathReduction()
2016
 
2017
  /**
2018
+ * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
2019
  * rand emove double slashes.
2020
  *
2021
  * @param string $p_dir path to reduce
restore/XCloner.php CHANGED
@@ -1,2222 +1,1362 @@
1
- <?php
2
-
3
- /**
4
- * XCloner
5
- * Oficial website: http://www.joomlaplug.com/
6
- * -------------------------------------------
7
- * Creator: Liuta Romulus Ovidiu
8
- * License: All Rights Reserved
9
- * Email: admin@joomlaplug.com
10
- * Revision: 1.0
11
- * Date: July 2007
12
- **/
13
-
14
- @set_time_limit(3600);
15
-
16
- @ini_set("error_reporting", E_ALL^E_NOTICE);
17
-
18
- ###################### Do not edit Below #############################
19
-
20
- $g_pcltar_lib_dir = "./";
21
-
22
- require "TAR.php";
23
-
24
- $_CONFIG['my_version'] = "1.9.0";
25
-
26
- $_CONFIG['script_name'] = "XCloner.php";
27
-
28
- $_CONFIG['sql_usefile'] = "";
29
-
30
-
31
- if(isset($_REQUEST['sql_setfile']))
32
-
33
- $_CONFIG['sql_usefile'] = $_REQUEST['sql_setfile'];
34
-
35
-
36
- if(trim($_CONFIG['sql_usefile']) == "")
37
-
38
- $_CONFIG['sql_usefile'] = "database-sql.sql";
39
-
40
-
41
- if(isset($_REQUEST['strrep'])){
42
-
43
- setcookie ("strrep_c", "", time() - 3600);
44
-
45
- setcookie("strrep_c", str_replace("\r\n","*-*",stripslashes($_REQUEST['strrep'])), time()+3600); /* expire in 1 hour */
46
-
47
- }
48
-
49
- else{
50
-
51
- $_REQUEST['strrep'] = str_replace("*-*", "\r\n", $_COOKIE['strrep_c']);
52
-
53
- }
54
-
55
-
56
- if ($handle = opendir('./')) {
57
-
58
-
59
-
60
- /* This is the correct way to loop over the directory. */
61
-
62
- while (false !== ($file = readdir($handle))){
63
-
64
- $ext = substr($file,strlen($file)-4,strlen($file));
65
-
66
- if(($file!='XCloner.php')&&($file!='..')&&($file!='.')&&(($ext=='.zip')||($ext=='.tgz')||($ext=='.tar')))
67
-
68
- {
69
-
70
- $_CONFIG[versions][] = $file;
71
-
72
- }
73
-
74
- }
75
-
76
- closedir($handle);
77
-
78
- }
79
-
80
- else{
81
-
82
- echo "Unable to open my directory for reading and listing!";exit;
83
-
84
- }
85
-
86
-
87
-
88
-
89
-
90
- ######################################################################
91
-
92
-
93
-
94
- $_CONFIG['output_path'] = $_REQUEST['output_path'];
95
-
96
- $_CONFIG['output_url'] = $_REQUEST['output_url_pref']."://".$_REQUEST['output_url'];
97
-
98
- $_CONFIG['tmp'] = $_REQUEST['output_path'];
99
-
100
- if($_REQUEST['files_skip'] == 1)
101
-
102
- $_REQUEST['do_database'] = 1;
103
-
104
-
105
-
106
- $filepath =$_SERVER["SCRIPT_FILENAME"];
107
-
108
- $pathinfo = pathinfo($filepath);
109
-
110
-
111
-
112
- $startscript = $pathinfo['dirname'];
113
-
114
-
115
-
116
- #$owneruid=fileowner($startscript);
117
-
118
- #$ownerinfo=posix_getpwuid($owneruid);
119
-
120
-
121
-
122
-
123
-
124
- #$groupid = filegroup ($startscript);
125
-
126
- #$groupinfo = posix_getgrgid($groupid);
127
-
128
-
129
-
130
-
131
-
132
- $_CONFIG[group] = $groupinfo[name];
133
-
134
- $_CONFIG[owner] =$ownerinfo[name];
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
- ###################### FRONT AREA ###################################
143
-
144
- ?>
145
-
146
-
147
-
148
- <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
149
-
150
- <html>
151
-
152
- <head>
153
-
154
- <title>XCloner - Your Clone Restore Utility</title>
155
- <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
156
-
157
- <style type="text/css" media="screen">
158
-
159
- @import url( http://www.joomlaplug.com/jcloner/style.css );
160
-
161
- .error {
162
-
163
- color: red;
164
-
165
- font-size: 15px;
166
-
167
- }
168
-
169
- </style>
170
-
171
- </head>
172
-
173
- <body>
174
-
175
-
176
-
177
- <table align='center' width='700' bgcolor='#eeeeee' style='padding: 0 5px 0 5px;'>
178
-
179
- <tr><td align='center'><h2><font color=red>XCloner</font> Automatic Restore!</h2></td></tr>
180
-
181
- <tr><td align='left'>
182
-
183
- <form action='' method='GET' name='form'>
184
-
185
- <?php
186
-
187
-
188
-
189
- switch ($_REQUEST[task]) {
190
-
191
-
192
-
193
- case 'step2':
194
-
195
- step2();
196
-
197
- break;
198
-
199
- case 'step1':
200
-
201
- step1();
202
-
203
- break;
204
-
205
- case 'getinfo':
206
-
207
- getPHPINFO();
208
-
209
- break;
210
-
211
- case 'info':
212
-
213
- echo phpinfo();
214
-
215
- break;
216
-
217
- default :
218
-
219
- start();
220
-
221
- break;
222
-
223
- }
224
-
225
-
226
-
227
-
228
-
229
- ?>
230
-
231
- </form>
232
-
233
- </td></tr>
234
-
235
- <tr><td>
236
-
237
- <small>XCloner Restore Version <b><?php echo $_CONFIG['my_version']?></b>
238
-
239
- <br />For support and questions please visit us at <a href='http://www.xcloner.com' title='XCloner.com - Website Backup Application'>XCloner.com - Website Backup Made Easy</a>
240
-
241
- </small>
242
-
243
- </td></tr>
244
-
245
- </table>
246
-
247
- </body>
248
-
249
- </html>
250
-
251
-
252
-
253
-
254
-
255
- <?php
256
-
257
- #####################################################################
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
- ##################### FUNCTIONS #####################################
266
-
267
-
268
-
269
- function step2($file=""){
270
-
271
- global $_CONFIG,$filepath ;
272
-
273
- $DBcreated = $_REQUEST[DBcreated];
274
-
275
- if ($DBcreated=='on'){
276
-
277
-
278
- $DBhostname = $_REQUEST['mysql_server'];
279
-
280
- $DBuserName = $_REQUEST['mysql_username'];
281
-
282
- $DBpassword = $_REQUEST['mysql_pass'];
283
-
284
- $DBname = $_REQUEST['mysql_db'];
285
-
286
-
287
- $db = @mysql_connect($DBhostname, $DBuserName, $DBpassword) or die("<br />The database details provided are incorrect and/or empty. Unable to connect to mysql server");
288
-
289
- @mysql_query("CREATE database $DBname;");
290
-
291
- if (!@mysql_select_db($DBname)) {
292
-
293
- die("<br /><span class='error'>Could not connect to $DBname database! Please make sure the database exists and that you assigned the mysql user to it...</span>");
294
-
295
- }
296
-
297
- if($_REQUEST['charset_of_file']!="")
298
- mysql_query("SET NAMES ".$_REQUEST['charset_of_file']."");
299
- else
300
- mysql_query("SET NAMES utf8;");
301
-
302
-
303
-
304
- }
305
-
306
-
307
-
308
- if($_REQUEST['do_database'] != 1){
309
-
310
- ############ DATABASE ONLY RESTRICTION##################################################
311
-
312
-
313
-
314
- ########################### START FTP MODE #################################
315
- if($_REQUEST[transfer_mode]==2){
316
-
317
- $_CONFIG[output_path] = $_CONFIG[output_path]."/archive_tmp/";
318
-
319
- @mkdir($_CONFIG[output_path]);
320
-
321
-
322
-
323
- // set up basic connection
324
-
325
- $conn_id = @ftp_connect($_REQUEST[ftp_server], $_REQUEST[ftp_port]) or die("<span class='error'>Could not connect to $_REQUEST[ftp_server] on port $_REQUEST[ftp_port]! Ftp connection has failed!</span>");
326
-
327
-
328
-
329
- // login with username and password
330
-
331
- $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]) or die("<span class='error'>Could not login to ftp server for user $_REQUEST[ftp_user] and provided pass! Ftp connection has failed!</span>");
332
-
333
-
334
-
335
- // check connection
336
-
337
- if ((!$conn_id) || (!$login_result)) {
338
-
339
- echo "<b style='color:red'>FTP connection has failed!</b>";
340
-
341
- echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server].":".$_REQUEST[ftp_port]." for user ".$_REQUEST[ftp_user]."</b>";
342
-
343
- return;
344
-
345
- } else {
346
-
347
- echo "<br />Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user], starting transfer...<br />";
348
-
349
- }
350
-
351
- $ftp_dir_original = ftp_pwd($conn_id);
352
-
353
- @ftp_mkdir($conn_id,$_REQUEST[ftp_path]);
354
-
355
- // try to change the directory to somedir
356
- if (@ftp_chdir($conn_id, $_REQUEST[ftp_path])) {
357
-
358
- echo "Current directory is now: <b>" . ftp_pwd($conn_id) . "</b>\n";
359
-
360
- } else {
361
-
362
- echo "<b style='color:red'>Couldn't change directory to <b>$_REQUEST[ftp_path]</b>, please verify that the ftp location exists or use the \"Install files directly\" option!</b><br />\n";
363
-
364
- return;
365
-
366
- }
367
- @ftp_chdir($conn_id, $ftp_dir_original);
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
- }
376
-
377
- ########################## END FTP MODE ######################################
378
-
379
- ##### START extract ######
380
- if($_REQUEST['refresh'] < 1){
381
-
382
- $ext = substr($file, strlen($file)-4, strlen($file));
383
-
384
- if($_REQUEST['file_utilities'] != '1'){
385
-
386
- $tar_object = new Archive_Tar($file);
387
-
388
- $tar_object->extract($_CONFIG['output_path']);
389
- #$tar_object->extractList("backups/perm.txt", $_CONFIG['output_path']);
390
-
391
- }else{
392
-
393
- if($ext == '.tgz') $compress = 'z';
394
- else $compress = '';
395
-
396
- shell_exec("tar -x".$compress."pf $file -C $_CONFIG[output_path]");
397
-
398
- }
399
-
400
- }
401
- ##### END extract ######
402
-
403
-
404
- $new_arr = array();
405
-
406
-
407
-
408
- #@chmod($_CONFIG[output_path], 0777);
409
-
410
-
411
-
412
- $tran_file = $_CONFIG[output_path]."/transfer.txt";
413
-
414
-
415
-
416
- if($_REQUEST[transfer_mode]==2){
417
-
418
-
419
-
420
- # initialise list arrays, directories and files separately and array counters for them
421
-
422
- $excludedFolders = array();
423
-
424
- $d_arr = array(); $d = 0;
425
-
426
- $ds_arr = array();
427
-
428
- $f_arr = array(); $f = 0;
429
-
430
- $s_arr = array(); $s = 0;
431
-
432
-
433
-
434
- $d_arr[$d] = $_CONFIG[output_path];
435
-
436
-
437
-
438
- if($_REQUEST['refresh'] < 1){
439
-
440
- # obtain the list of files by recursing the mambo file store
441
-
442
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders , '', $_CONFIG[output_path]);
443
-
444
-
445
-
446
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $d_arr , '', $_CONFIG[output_path]);
447
-
448
-
449
-
450
- sort($d_arr);
451
-
452
- sort($f_arr);
453
-
454
- $new_arr = array_merge($d_arr, $f_arr);
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
- if($_REQUEST[transfer_mode]==2)
463
-
464
- if($fp = fopen($tran_file, "w")){
465
-
466
-
467
-
468
- foreach($new_arr as $file){
469
-
470
-
471
-
472
- fwrite($fp, $file."\n");
473
-
474
-
475
-
476
- }
477
-
478
-
479
-
480
- fclose($fp);
481
-
482
-
483
-
484
- }else{
485
-
486
-
487
-
488
- echo "Unable to write to directory ".$_CONFIG[output_path]."! Please check that this directory is writeable!"; return;
489
-
490
-
491
-
492
- }
493
-
494
-
495
-
496
- else{};
497
-
498
-
499
-
500
-
501
-
502
- }else{
503
-
504
-
505
-
506
- $content = "";
507
-
508
-
509
-
510
- $new_arr = file($tran_file);
511
-
512
-
513
-
514
- }
515
-
516
-
517
-
518
-
519
-
520
- if(sizeof($new_arr) != 0 )
521
-
522
- $percn = sprintf("%.2f",($_REQUEST[next] * 100)/sizeof($new_arr));
523
-
524
-
525
-
526
- if($percn > sizeof($new_arr))
527
-
528
- $percn = sizeof($new_arr);
529
-
530
-
531
-
532
- }
533
-
534
-
535
-
536
-
537
-
538
- if($_REQUEST['refresh'] == 1){
539
-
540
-
541
-
542
- echo "<h3>Transfering $percn% of ".sizeof($new_arr)." files through ftp</h3>";
543
-
544
-
545
-
546
- echo "<textarea cols=70 rows=30 name='ftp_list'></textarea>";
547
-
548
-
549
-
550
- }
551
-
552
- elseif($_REQUEST['refresh'] == 2)
553
-
554
-
555
-
556
- echo "Files transfer finished!";
557
-
558
-
559
-
560
- $i = (int)$_REQUEST[next];
561
-
562
- $j = 0;
563
-
564
-
565
-
566
- ### MOVING THE FILES THROUGH FTP
567
-
568
-
569
-
570
- #foreach($new_arr as $key=>$file)
571
-
572
-
573
-
574
- for($key=$i;$key<=sizeof($new_arr);$key++){
575
-
576
-
577
-
578
- $file = str_replace(array("\r","\n"), array("",""), $new_arr[$key]) ;
579
-
580
-
581
-
582
- if($_REQUEST['manual_ftp'] == 1)
583
-
584
- if($j == 100){
585
-
586
-
587
-
588
- #echo "Transfering files from line: ". (int)$_REQUEST[next];
589
-
590
-
591
-
592
-
593
-
594
- $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
595
-
596
-
597
-
598
- $rurl = "XCloner.php?".$qstr[0]."&refresh=1&next=".($_REQUEST[next]+100);
599
-
600
- ftp_close($conn_id);
601
-
602
-
603
-
604
- echo "<script> document.location='".$rurl."'</script>";
605
-
606
-
607
-
608
- exit;
609
-
610
- }
611
-
612
-
613
-
614
- $j++;
615
-
616
-
617
-
618
- $sfile = str_replace($_CONFIG[output_path],"",$file);
619
-
620
- $fsource = $_CONFIG[output_path]."/".$sfile;
621
-
622
-
623
-
624
- if(($sfile != "")&&($sfile!="/"))
625
-
626
- if($_REQUEST[transfer_mode]==2){
627
-
628
-
629
-
630
- $upload = 1;
631
-
632
-
633
-
634
-
635
-
636
- $ftarget = $_REQUEST[ftp_path]."/".$sfile;
637
-
638
-
639
-
640
- if(is_dir($fsource)){
641
-
642
-
643
-
644
- $upload1 = @ftp_mkdir($conn_id,$ftarget);
645
-
646
-
647
-
648
- }
649
-
650
- else{
651
-
652
- $upload = ftp_put($conn_id, $ftarget, $fsource, FTP_BINARY);
653
-
654
-
655
-
656
- }
657
-
658
-
659
-
660
- #echo "$i <br >";
661
-
662
- if(!$upload){
663
-
664
- echo "<br /><font color=red>Transfer fail for $fsource to $ftarget</font> <br />File already exists and/or doesn't have writing permissions!<br/>";
665
-
666
- }
667
-
668
- else{
669
-
670
- if($_REQUEST['manual_ftp'] == 1){
671
-
672
- $ftarget .= '\n';
673
-
674
- echo "<script>document.form.ftp_list.value = document.form.ftp_list.value + '".$ftarget."'; </script>";
675
-
676
- #echo "$ftarget <br />\n";
677
-
678
- }
679
-
680
- }
681
-
682
-
683
-
684
- }
685
-
686
- }
687
-
688
-
689
-
690
- if($_REQUEST['refresh'] == 1){
691
-
692
-
693
-
694
- $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
695
-
696
-
697
-
698
- $rurl = "XCloner.php?".$qstr[0]."&refresh=2&next=".($_REQUEST[next]+102);
699
-
700
-
701
-
702
- echo "<script> document.location='".$rurl."'</script>";
703
-
704
-
705
-
706
- exit;
707
-
708
-
709
-
710
- }
711
-
712
-
713
-
714
- ############### RESTORING HTACCESS AND CONFIGURATION PERM#####################################
715
-
716
-
717
- if($_REQUEST[transfer_mode]==2){
718
-
719
- $cmd = "CHMOD 0777 ".$_REQUEST[ftp_path]."/"."wp-config.php";
720
-
721
- @ftp_site($conn_id, $cmd);
722
-
723
- }
724
-
725
- else{
726
-
727
- @chmod($_REQUEST[output_path]."/"."wp-config.php", 0777);
728
-
729
- }
730
-
731
-
732
-
733
-
734
- #### CUSTOM PERMISSIONS #####
735
- if($_REQUEST['preserve_perm']){
736
-
737
-
738
- $perm_data = "";
739
-
740
- $perm_file = $_CONFIG[output_path]."/administrator/backups/perm.txt";
741
-
742
- $per = 1;
743
-
744
-
745
- @chmod($perm_file,0777);
746
-
747
- $fp = fopen($perm_file,'r');
748
-
749
-
750
- if($fp){
751
-
752
- while(!feof($fp))
753
-
754
- $perm_data .= fread($fp, 1024);
755
-
756
- fclose($fp);
757
-
758
- }
759
-
760
- else{
761
-
762
- echo "Could not set permissions! Permissions file $perm_file not found!<br />";
763
-
764
- $per = 0;
765
-
766
- }
767
-
768
-
769
- $data = explode("\n",$perm_data);
770
-
771
- foreach($data as $value){
772
-
773
- $dir = explode("|", $value);
774
-
775
- if($dir[1]=="")
776
-
777
- $dir[1] = '0755';
778
-
779
- if(strstr($dir[0],"wp-config.php"))
780
-
781
- $dir[1] = '0777';
782
-
783
-
784
-
785
- if($_REQUEST[transfer_mode]==2){
786
-
787
- $cmd = "CHMOD ".$dir[1]." ".$_REQUEST[ftp_path]."/".$dir[0];
788
-
789
-
790
-
791
- @ftp_site($conn_id, $cmd);
792
-
793
- }
794
-
795
- else{
796
-
797
- @chmod($_CONFIG[output_path]."/".$dir[0], octdec($dir[1]));
798
-
799
- }
800
-
801
- }
802
-
803
- if($per){
804
-
805
- echo "<h2>Permissions restored to their initial value...</h2>";
806
-
807
- }
808
-
809
- }
810
- #### END CUSTOM PERMISSIONS #####
811
-
812
-
813
- $_CONFIG[output_path] = str_replace("/archive_tmp/","",$_CONFIG[output_path]);
814
-
815
-
816
- if($_REQUEST[transfer_mode]==2)
817
-
818
- {
819
-
820
- // close the FTP stream
821
-
822
- @ftp_close($conn_id);
823
-
824
- recursive_remove_directory($_CONFIG[output_path]."/archive_tmp/");
825
-
826
- @unlink($_CONFIG[output_path]."/archive_tmp/");
827
-
828
- echo "<h2>Files succesfully copied to ".$_REQUEST[ftp_path]." on $_REQUEST[ftp_server] using FTP</h2>";
829
-
830
- }
831
-
832
- else{
833
-
834
- echo "<h2>Files succesfully copied to ".$_CONFIG[output_path]."</h2>";
835
-
836
- }
837
-
838
-
839
- ######### END DATABASE ONLY RESTRICT #########################################
840
-
841
- }
842
-
843
-
844
- ##### RESTORE CONFIGURATION #####
845
-
846
- if(($_REQUEST['do_database'] != 1) || ($_REQUEST['files_skip'] == 1)){
847
-
848
- $config_file = $_CONFIG[output_path]."/wp-config.php";
849
-
850
- @chmod($config_file,0777);
851
-
852
- @unlink($_CONFIG[output_path]."/administrator/backups/perm.txt");
853
-
854
- if(($_CONFIG['sql_usefile'] == "database-sql.sql") && (!isset($_REQUEST['fpos'])))
855
-
856
- if(write_config($config_file)){
857
-
858
- echo "<H2>Configuration updated!";
859
- echo "<iframe src='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."/wp-login.php' width=1 height=1></iframe>";
860
- echo "</H2>";
861
-
862
- }
863
-
864
- else{
865
- echo "<span class='error'>Unable to write to configuration file $config_file... Aborting...</span>";return;
866
-
867
- }
868
-
869
- }
870
-
871
-
872
-
873
- ############ ATTEMPT DATABASE INSERT #####################################
874
-
875
-
876
-
877
- if($DBcreated!='on'){
878
-
879
- echo "<h2>Database import skipped!</h2>";
880
-
881
- echo "<a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...</b></a><br />";
882
-
883
- return ;
884
-
885
- }
886
-
887
- if (($DBcreated=='on')&&($_REQUEST['do_database'] == 1)){
888
-
889
-
890
- $sqlfile = $_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile'];
891
-
892
- if(!file_exists($sqlfile)){
893
-
894
- echo "<span class='error'>Unable to read the database backup file $sqlfile , database was not imported!</span>";
895
-
896
- }
897
-
898
- else{
899
-
900
- if($_REQUEST['manual_sql'])
901
-
902
- $errors = populate_db_manual( $db, $sqlfile);
903
-
904
- else
905
-
906
- $errors = populate_db( $db, $sqlfile);
907
-
908
-
909
-
910
- if(sizeof($errors)>0){
911
-
912
- echo "There were some errors while importing the database:<br />";
913
-
914
- echo "<textarea cols=60 rows=30>".implode("\n",$errors)."</textarea>";
915
-
916
- exit;
917
-
918
- }else{
919
-
920
- @unlink($_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile']);
921
-
922
- }
923
-
924
- echo "<h2>Database populated...</h2>";
925
-
926
-
927
- }
928
-
929
- }
930
-
931
- ###################################################################################
932
-
933
- if($_REQUEST['do_database'] != 1) {
934
-
935
- $vars = "";
936
-
937
-
938
-
939
- foreach($_REQUEST as $key=>$value)
940
-
941
- $vars .= $key.'='.@urlencode($value).'&';
942
-
943
-
944
-
945
- $href = "XCloner.php?".$vars."do_database=1";
946
-
947
-
948
-
949
- echo "<br /><a href='$href'>Please click here to continue with database import...</a>";
950
-
951
-
952
-
953
- return ;
954
-
955
- }
956
-
957
- else{
958
-
959
-
960
-
961
- echo "<br /><a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...<br /></a><br />";
962
-
963
-
964
-
965
- return ;
966
-
967
-
968
-
969
- }
970
-
971
-
972
-
973
- }
974
-
975
-
976
-
977
- function write_config($file){
978
-
979
- if(@$fp = fopen($file, "r")){
980
-
981
- $config_data = "";
982
-
983
- while(!feof($fp))
984
-
985
- $config_data .= fread($fp, 1024);
986
-
987
- fclose($fp);
988
-
989
- }
990
-
991
- if ($_REQUEST[DBcreated] == 'on'){
992
-
993
-
994
- $config_data = str_replace("define('DB_HOST', '", "define('DB_HOST', '".$_REQUEST[mysql_server]."');#", $config_data);
995
- $config_data = str_replace("define('DB_USER', '", "define('DB_USER', '".$_REQUEST[mysql_username]."');#", $config_data);
996
- $config_data = str_replace("define('DB_PASSWORD', '", "define('DB_PASSWORD', '".$_REQUEST[mysql_pass]."');#", $config_data);
997
- $config_data = str_replace("define('DB_NAME', '", "define('DB_NAME', '".$_REQUEST[mysql_db]."');#", $config_data);
998
- $liveurl = $_REQUEST[output_url_pref]."://".$_REQUEST[output_url];
999
- $config_data = str_replace("define('DB_HOST", "define('WP_SITEURL','".$liveurl."');\ndefine('WP_HOME','".$liveurl."');\ndefine('RELOCATE',true);\ndefine('DB_HOST", $config_data);
1000
-
1001
- $config_data = str_replace("define('WP_SITEURL', '", "define('WP_SITEURL', '".$liveurl."');#", $config_data);
1002
- $config_data = str_replace("define('WP_HOME', '", "define('WP_HOME', '".$liveurl."');#", $config_data);
1003
-
1004
- }
1005
-
1006
- if($_REQUEST['transfer_mode'] == 2){
1007
-
1008
- $config_data = str_replace('$'.'ftp_host =',"$"."ftp_host ='".$_REQUEST[ftp_server]."';#", $config_data);
1009
-
1010
- $config_data = str_replace('$'.'ftp_port =',"$"."ftp_port ='".$_REQUEST[ftp_port]."';#", $config_data);
1011
-
1012
- $config_data = str_replace('$'.'ftp_user =',"$"."ftp_user ='".$_REQUEST[ftp_user]."';#", $config_data);
1013
-
1014
- $config_data = str_replace('$'.'ftp_pass =',"$"."ftp_pass ='".$_REQUEST[ftp_pass]."';#", $config_data);
1015
-
1016
- $config_data = str_replace('$'.'ftp_root =',"$"."ftp_root ='".$_REQUEST[ftp_path]."';#", $config_data);
1017
-
1018
- }else{
1019
-
1020
- $config_data = str_replace('$'.'ftp_enable =',"$"."ftp_enable ='0';#", $config_data);
1021
-
1022
- }
1023
-
1024
- $_REQUEST[output_url] = str_replace("/###","",$_REQUEST[output_url]."###");
1025
-
1026
- $_REQUEST[output_url] = str_replace("###","",$_REQUEST[output_url]);
1027
-
1028
-
1029
-
1030
- $config_data = str_replace('$'.'live_site =',"$"."live_site ='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."';#", $config_data);
1031
-
1032
- $config_data = str_replace('$'.'absolute_path =',"$"."absolute_path ='".$_REQUEST[output_path]."';#", $config_data);
1033
-
1034
-
1035
- if ($fp = fopen($file, "w")) {
1036
-
1037
- fwrite( $fp, $config_data);
1038
-
1039
- fclose( $fp );
1040
-
1041
- } else {
1042
-
1043
- return false;
1044
-
1045
- } // if
1046
-
1047
- return true;
1048
-
1049
- }
1050
-
1051
- function step1(){
1052
-
1053
- global $_CONFIG;
1054
-
1055
-
1056
- $ftarget = $_CONFIG[output_path]."/".$_REQUEST[ver];
1057
-
1058
-
1059
- if($_REQUEST['refresh'] < 1)
1060
-
1061
- if(!is_writable($_CONFIG[output_path])){
1062
-
1063
- echo "<span class='error'>Directory ".$_CONFIG[output_path]." is not writeable or does not exists! Could not continue...</span>";
1064
-
1065
- return ;
1066
-
1067
- }
1068
-
1069
-
1070
-
1071
- $ftarget = $_REQUEST[ver];
1072
-
1073
-
1074
- if(!file_exists($ftarget))
1075
-
1076
- {echo "<span class='error'>Could not continue, unable to read the clone backup file! Please make sure you copied the backup in the same directory as XCloner.php </span>";exit;}
1077
-
1078
- step2($ftarget);
1079
-
1080
- return;
1081
-
1082
- }
1083
-
1084
-
1085
-
1086
- function start() {
1087
-
1088
- global $_CONFIG,$pathinfo;
1089
-
1090
-
1091
-
1092
- $pdir = str_replace($_CONFIG['script_name'], "", $_SERVER["SCRIPT_FILENAME"]);
1093
-
1094
- $purl = $_SERVER['HTTP_HOST'].str_replace("/".$_CONFIG['script_name'],"", $_SERVER['SCRIPT_NAME']);
1095
-
1096
- ?>
1097
-
1098
-
1099
-
1100
-
1101
-
1102
- <input type=hidden name='task' value='step1'>
1103
-
1104
- <table width='100%'>
1105
-
1106
-
1107
-
1108
- <tr bgcolor='#dddddd'><td>
1109
-
1110
- <b>Path configuration: <a href='XCloner.php?task=getinfo' onclick="window.open('XCloner.php?task=getinfo', 'getInfo', 'toolbar,width=550,height=400'); return false;">check PhpInfo</a></b>
1111
- <br />
1112
- <b style='color:red'>Security Note:</b> after restore <b>delete the XCloner.php</b> script from your server
1113
- </td></tr>
1114
-
1115
- <tr>
1116
-
1117
- <td>
1118
-
1119
- Install directory:<br />
1120
-
1121
- <input type=text size=70 name='output_path' value='<?php echo str_replace("\\", "/", $pdir);?>'>
1122
-
1123
- <br ><small>please enter the full server path to the install directory, must have writing permissions</small>
1124
-
1125
- </td>
1126
-
1127
- </tr>
1128
-
1129
- <tr>
1130
-
1131
- <td>
1132
-
1133
- Install Url:<br />
1134
-
1135
- <select name='output_url_pref'>
1136
-
1137
- <option selected value='http'>http://</option>
1138
-
1139
- <option value='https'>https://</option>
1140
-
1141
- </select>
1142
-
1143
- <input type=text size=60 name='output_url' value='<?php echo $purl?>'>
1144
-
1145
- <br ><small>please enter the url of where Joomla will be accessible from, can be remote also if you use the ftp function below to other host</small>
1146
-
1147
- </td>
1148
-
1149
- </tr>
1150
-
1151
-
1152
-
1153
- <tr><td>
1154
-
1155
- <b>Choose clone archive to install:</b>
1156
-
1157
- </td></tr>
1158
-
1159
- <tr>
1160
-
1161
- <td>
1162
-
1163
- <?php
1164
-
1165
- echo version_list('ver');
1166
-
1167
- ?>
1168
-
1169
- </td>
1170
-
1171
- </tr>
1172
-
1173
- <tr bgcolor='#dddddd'><td>
1174
-
1175
- <b>Mysql configuration: </b> <br />
1176
-
1177
- <input type=checkbox checked name='DBcreated'> <font color='red'>import mysql database</font>
1178
-
1179
- <br />
1180
-
1181
- <input type='checkbox' value='1' name='manual_sql' > incremental sql import (<small> recommended for large databases</small>)
1182
-
1183
- <br />
1184
- Character set of the file:
1185
- <select name="charset_of_file">
1186
-
1187
- <option value="" selected="selected">Default</option>
1188
- <option value="big5" title="Big5 Traditional Chinese">big5</option>
1189
- <option value="binary" title="Binary pseudo charset">binary</option>
1190
- <option value="cp1250" title="Windows Central European">cp1250</option>
1191
- <option value="cp932" title="SJIS for Windows Japanese">cp932</option>
1192
- <option value="euckr" title="EUC-KR Korean">euckr</option>
1193
-
1194
- <option value="gb2312" title="GB2312 Simplified Chinese">gb2312</option>
1195
- <option value="gbk" title="GBK Simplified Chinese">gbk</option>
1196
- <option value="latin1" title="cp1252 West European">latin1</option>
1197
- <option value="latin2" title="ISO 8859-2 Central European">latin2</option>
1198
- <option value="sjis" title="Shift-JIS Japanese">sjis</option>
1199
- <option value="tis620" title="TIS620 Thai">tis620</option>
1200
-
1201
- <option value="ucs2" title="UCS-2 Unicode">ucs2</option>
1202
- <option value="ujis" title="EUC-JP Japanese">ujis</option>
1203
- <option value="utf8" title="UTF-8 Unicode" >utf8</option>
1204
- </select>
1205
-
1206
- </td></tr>
1207
-
1208
- <!--<tr bgcolor='#dddddd'>
1209
-
1210
- <td>
1211
-
1212
- <input type=checkbox name='use_mysqldump' value='1'> import with mysql server utility, path:
1213
-
1214
- <input type=text size=40 name='mysqldump_path' value='mysql'> (<small>advanced users only</small>)
1215
-
1216
- </td>
1217
-
1218
- </tr>
1219
-
1220
- -->
1221
-
1222
- <tr><td>
1223
-
1224
-
1225
-
1226
- <table width='100%'>
1227
-
1228
-
1229
-
1230
- <tr>
1231
-
1232
- <td width='120'>Mysql server:</td>
1233
-
1234
- <td><input type=text size=40 name='mysql_server' value='localhost'></td>
1235
-
1236
- <tr>
1237
-
1238
- <td>Mysql username:</td>
1239
-
1240
- <td><input type=text size=40 name='mysql_username' value=''></td>
1241
-
1242
- </tr>
1243
-
1244
- <tr>
1245
-
1246
- <td>Mysql password:</td>
1247
-
1248
- <td><input type=text size=40 name='mysql_pass' value=''></td>
1249
-
1250
- </tr>
1251
-
1252
- <tr>
1253
-
1254
- <td>Mysql database:</td>
1255
-
1256
- <td><input type=text size=40 name='mysql_db' value=''></td>
1257
-
1258
- </tr>
1259
-
1260
-
1261
-
1262
- <?php
1263
-
1264
- $dir = "administrator/backups/";
1265
-
1266
- $sql_files =array();
1267
-
1268
-
1269
-
1270
- if(@is_dir($dir)){
1271
-
1272
-
1273
-
1274
- if ($handle = @opendir($dir)) {
1275
-
1276
-
1277
-
1278
- /* This is the correct way to loop over the directory. */
1279
-
1280
- while (false !== ($file = @readdir($handle))) {
1281
-
1282
-
1283
-
1284
- if(strstr($file, ".sql"))
1285
-
1286
-
1287
-
1288
- $sql_files[] = $file;
1289
-
1290
-
1291
-
1292
- }
1293
-
1294
-
1295
-
1296
- @closedir($handle);
1297
-
1298
- }
1299
-
1300
-
1301
-
1302
-
1303
-
1304
- if(sizeof($sql_files) > 0) {
1305
-
1306
-
1307
-
1308
- $list = "";
1309
-
1310
- for($i=0;$i<sizeof($sql_files);$i++){
1311
-
1312
-
1313
-
1314
- $list .= "<option value='$sql_files[$i]'>$sql_files[$i]</option>";
1315
-
1316
-
1317
-
1318
- }
1319
-
1320
- echo "<tr>
1321
-
1322
- <td>Import Mysql file:</td>
1323
-
1324
- <td><select name='sql_setfile'><option value='database-sql.sql'>Default</option>$list</select></td>
1325
-
1326
- </tr>";
1327
-
1328
-
1329
-
1330
- }
1331
-
1332
-
1333
-
1334
- }
1335
-
1336
- ?>
1337
-
1338
-
1339
-
1340
- </table>
1341
-
1342
-
1343
-
1344
- </td>
1345
-
1346
- </tr>
1347
-
1348
-
1349
-
1350
-
1351
-
1352
- <tr bgcolor='#dddddd'><td>
1353
-
1354
- <b>Files transfer and configuration:</b><br />
1355
-
1356
- <input type=checkbox name='files_skip' value='1' > <font color='red'>Skip files restore, will attempt to restore only database</font><br />
1357
-
1358
- <input type=checkbox name='preserve_perm' value='1'> restore original files permissions<br />
1359
-
1360
- <input type=checkbox name='file_utilities' value='1' > Restore by using the server utilities unzip/tar
1361
-
1362
- </td></tr>
1363
-
1364
-
1365
-
1366
- <tr><td colspan=2>
1367
-
1368
- <table width='100%'>
1369
-
1370
- <tr>
1371
-
1372
- <td width='50%' valign='top'>
1373
-
1374
-
1375
-
1376
- <table width='100%'>
1377
-
1378
- <tr><td colspan='2'>
1379
-
1380
- Install files throught ftp: <input type='checkbox' value='1' name='manual_ftp' checked> - incremental transfer
1381
-
1382
- </td></tr>
1383
-
1384
- <tr>
1385
-
1386
- <td colspan='2'><input type=radio name=transfer_mode value=2 checked>
1387
-
1388
- <br />
1389
-
1390
- <small>this will attempt to transfer all files through ftp, so the owner keep it's permissions, can be used to send files to other hosts also, <font color=red>*recommended</font></small>
1391
-
1392
- </td>
1393
-
1394
- </tr>
1395
-
1396
-
1397
-
1398
- <tr>
1399
-
1400
- <td nowrap>Ftp server:</td>
1401
-
1402
- <td><input type=text size=30 name='ftp_server' value='localhost'><br />
1403
-
1404
- port: <input type=text size=5 name='ftp_port' value='21'></td>
1405
-
1406
- </tr>
1407
-
1408
- <tr>
1409
-
1410
- <td>Ftp user:</td>
1411
-
1412
- <td><input type=text size=30 name='ftp_user'></td>
1413
-
1414
- </tr>
1415
-
1416
- <tr>
1417
-
1418
- <td>Ftp pass:</td>
1419
-
1420
- <td><input type=text size=30 name='ftp_pass'></td>
1421
-
1422
- </tr>
1423
-
1424
- <tr>
1425
-
1426
- <td>Ftp path:</td>
1427
-
1428
- <td><input type=text size=30 name='ftp_path'>
1429
-
1430
- <br><small>ftp root path of where Joomla will be installed</small>
1431
-
1432
- </td>
1433
-
1434
- </tr>
1435
-
1436
- </table>
1437
-
1438
-
1439
-
1440
- </td>
1441
-
1442
- <td width='50%' valign=top>
1443
-
1444
-
1445
-
1446
- <table width='100%'>
1447
-
1448
- <tr><td>
1449
-
1450
- Install files directly:
1451
-
1452
- </td></tr>
1453
-
1454
- <tr>
1455
-
1456
- <td><input type=radio name=transfer_mode value=1>
1457
-
1458
- <br />
1459
-
1460
- <small>transfering the files directly will cause some permissions problem in some cases, but it's faster than the other option </small>
1461
-
1462
- </td>
1463
-
1464
- </tr>
1465
-
1466
- </table>
1467
-
1468
-
1469
-
1470
- </td>
1471
-
1472
- </tr>
1473
-
1474
-
1475
-
1476
-
1477
-
1478
- </table>
1479
-
1480
- </td></tr>
1481
-
1482
- <tr><td>
1483
-
1484
-
1485
-
1486
- </td></tr>
1487
-
1488
-
1489
-
1490
- <tr><td colspan='2'>
1491
-
1492
-
1493
-
1494
- <input type=submit name=submit value='Start install' >
1495
-
1496
- <br /><small>*after hitting submit please wait for the package to get unarchived and transfered through ftp if it is the case!</small>
1497
-
1498
-
1499
-
1500
- <br /><b>NOTE:*** IMPORTANT - if you plan to apply this script to a live site - upgrade or fresh install over existing files please
1501
-
1502
- make sure you first make a backup of them! </b>
1503
-
1504
- </td></tr>
1505
-
1506
-
1507
-
1508
- </table>
1509
-
1510
-
1511
-
1512
- <?php
1513
-
1514
-
1515
-
1516
- }
1517
-
1518
-
1519
-
1520
- function getPHPINFO(){
1521
-
1522
-
1523
-
1524
- ?>
1525
-
1526
- <table width='100%'>
1527
-
1528
- <tr bgcolor='#dddddd'><td>
1529
-
1530
- <b>Php Configuration: <a target='_blank' href='XCloner.php?task=info'> phpinfo()</a></b>
1531
-
1532
- </td></tr>
1533
-
1534
-
1535
-
1536
- <tr><td>
1537
-
1538
- <table bgcolor='#dddddd' width='65%' style='font-size:10px; text-align:center;' border='1'>
1539
-
1540
-
1541
-
1542
- <tr>
1543
-
1544
- <td><b style='color:red'>PHP Setting</b></td>
1545
-
1546
- <td><b style='color:orange'>Current Value</b></td>
1547
-
1548
- <td><b style='color:green'>Recomemnded</b></td>
1549
-
1550
- </tr>
1551
-
1552
-
1553
-
1554
- <tr>
1555
-
1556
- <td><b>Open_Basedir:</b> </td>
1557
-
1558
- <td>
1559
-
1560
- <?php echo (@ini_get('open_basedir') ? @ini_get('open_basedir') : 'No value')?>
1561
-
1562
- </td>
1563
-
1564
- <td><b>No Value</b></td>
1565
-
1566
- </tr>
1567
-
1568
-
1569
-
1570
- <tr>
1571
-
1572
- <td><b>Max Execution Time:</b> </td>
1573
-
1574
- <td>
1575
-
1576
- <?php echo (@ini_get('max_execution_time') ? @ini_get('max_execution_time') : 'No value')?>
1577
-
1578
- </td>
1579
-
1580
- <td><b>>30</b></td>
1581
-
1582
- </tr>
1583
-
1584
-
1585
-
1586
- <tr>
1587
-
1588
- <td><b>Safe mode:</b> </td>
1589
-
1590
- <td>
1591
-
1592
- <?php echo (@ini_get('safe_mode') ? @ini_get('safe_mode') : 'Off')?>
1593
-
1594
- </td>
1595
-
1596
- <td><b>Off</b></td>
1597
-
1598
- </tr>
1599
-
1600
-
1601
-
1602
- </table>
1603
-
1604
- </td></tr>
1605
-
1606
-
1607
-
1608
- </table>
1609
-
1610
- <?php
1611
- }
1612
-
1613
-
1614
- ###END
1615
-
1616
-
1617
- ###Starting the manual sql backup
1618
-
1619
- function populate_db_manual( $db, $sqlfile='administrator/backups/database-sql.sql'){
1620
-
1621
- global $qstr;
1622
-
1623
- $extra_que = $qstr[0];
1624
-
1625
- $file = $sqlfile;
1626
-
1627
- define ('DATA_CHUNK_LENGTH',16384); // How many chars are read per time
1628
-
1629
- define ('MAX_QUERY_LINES',300); // How many lines may be considered to be one query (except text lines)
1630
-
1631
- $lines = "";
1632
-
1633
- $error = "";
1634
-
1635
- $error_status = 0;
1636
-
1637
- if((isset($_REQUEST['chunk']))&&((int)$_REQUEST['chunk'] != 0))
1638
-
1639
- $chunk = $_REQUEST['chunk'];
1640
-
1641
- else
1642
-
1643
- $chunk = DATA_CHUNK_LENGTH;
1644
-
1645
- if($_REQUEST['correct_query'] != 1){
1646
-
1647
- $start_pos = (int)$_REQUEST['fpos'];
1648
-
1649
- $fpos = read_file($file, MAX_QUERY_LINES, $start_pos, $chunk, $lines);
1650
-
1651
- }else{
1652
-
1653
- $lines[0] = stripslashes($_REQUEST['error_msg']);
1654
-
1655
- $fpos = $_REQUEST['start_posf'] ;
1656
-
1657
- }
1658
-
1659
- foreach($lines as $line)
1660
-
1661
- if(trim($line) != ''){
1662
-
1663
- $query = $line;
1664
-
1665
- $line = $line .";\n";
1666
-
1667
- #$tmp = explode("DEFAULT CHARSET",$line);
1668
-
1669
- $line_tmp = $line;
1670
-
1671
- $start_pos = $start_pos + strlen($line);
1672
-
1673
- if(isset($_REQUEST['strrep']))
1674
-
1675
- {
1676
-
1677
- $strrep = explode("\r\n", stripslashes($_REQUEST['strrep']));
1678
-
1679
- foreach($strrep as $value)
1680
-
1681
- if(trim($value)!= ""){
1682
-
1683
-
1684
- $tmp = explode("|", $value);
1685
-
1686
-
1687
- $line_tmp = str_replace(trim($tmp[0]),trim($tmp[1]),$line_tmp);
1688
-
1689
- $query = str_replace(trim($tmp[0]),trim($tmp[1]),$query);
1690
-
1691
- }
1692
-
1693
- }
1694
-
1695
- if(!mysql_query($line_tmp)){
1696
-
1697
- if($_REQUEST['correct_query'] != 1)
1698
-
1699
- $fpos = $start_pos ;
1700
-
1701
- $form_url = rurl($fpos, $chunk);
1702
-
1703
- echo "</form><form name='' action='".$form_url."' method='POST'>
1704
-
1705
- <input type='hidden' name='correct_query' value = '1'>
1706
-
1707
- <input type='hidden' name='start_pos' value='".$start_pos."'>
1708
-
1709
- <input type='hidden' name='start_posf' value='".$fpos."'>
1710
-
1711
- <input type='hidden' name='glen' value='".$qlen."'>
1712
-
1713
- <center>";
1714
-
1715
- echo sprintf("<b>###MYSQL error</b>\n<br /><font color='red'>".mysql_error()."</font><br />\n<b>###On Query:</b><br />\n<br /><textarea cols=70 rows=15 name='error_msg'>%s</textarea><br />", $query);
1716
-
1717
- echo "<b>Search and replace in query:</b><br /><textarea cols=70 rows=5 name='strrep'>".stripslashes($_REQUEST[strrep])."</textarea><br />
1718
-
1719
- <small>
1720
-
1721
- enter a string, one per line, which you would like to replace in the query above, example <i>string_to_search|text_to_replace_with</i>
1722
-
1723
- </small>";
1724
-
1725
- echo "<br /> <input type=submit name=submit value='Correct Query &gt;&gt;'>";
1726
-
1727
- echo "</center></form>";
1728
-
1729
- $error_status = 1;
1730
-
1731
- break;
1732
-
1733
- }
1734
-
1735
- }
1736
-
1737
-
1738
- $percent = sprintf("%.2f", (100*$fpos)/ filesize($file));
1739
-
1740
- if($fpos!='-1'){
1741
-
1742
- echo "<h3>Processed $percent% from sql backup!</h3>";
1743
-
1744
- $red_url = rurl($fpos, $chunk);
1745
-
1746
- if($error_status == 1 ){
1747
-
1748
- echo "<h3><a href='".$red_url."'>To skip this query, click here to Continue</a></h3>";
1749
-
1750
- exit;
1751
-
1752
- }else{
1753
-
1754
- echo "<h3><a href='".$red_url."'>Continue here</a></h3>";
1755
-
1756
- echo "<script>window.location='".$red_url."'</script>";
1757
-
1758
- exit;
1759
-
1760
- }
1761
-
1762
- } else {
1763
-
1764
- echo "<h3>The sql import is finished!</h3>";
1765
-
1766
- }
1767
-
1768
- return;
1769
-
1770
- }
1771
-
1772
- ########END
1773
-
1774
-
1775
-
1776
- ### STARTING THE AUTOMATIC BACKUP
1777
-
1778
- function populate_db( $db, $sqlfile='administrator/backups/database-sql.sql') {
1779
-
1780
- global $errors, $_CONFIG;
1781
-
1782
-
1783
-
1784
- if($_REQUEST['use_mysqldump'] == 1){
1785
-
1786
-
1787
-
1788
- echo shell_exec($_REQUEST['mysqldump_path']." -u ".$_REQUEST[mysql_username]." -p".$_REQUEST[mysql_pass]." -h ".$_REQUEST[mysql_server]." ".$_REQUEST[mysql_db]." < ".$sqlfile);
1789
-
1790
- return;
1791
-
1792
-
1793
-
1794
- }
1795
-
1796
-
1797
-
1798
- $mqr = @get_magic_quotes_runtime();
1799
-
1800
- @set_magic_quotes_runtime(0);
1801
-
1802
- @chmod($sqlfile,0777);
1803
-
1804
- $query = fread( fopen( $sqlfile, 'r' ), filesize( $sqlfile ) );
1805
-
1806
- @set_magic_quotes_runtime($mqr);
1807
-
1808
- $pieces = split_sql($query);
1809
-
1810
-
1811
-
1812
- for ($i=0; $i<count($pieces); $i++) {
1813
-
1814
- $pieces[$i] = trim($pieces[$i]);
1815
-
1816
- $tmp = explode("DEFAULT CHARSET",$pieces[$i]);
1817
-
1818
- $pieces[$i] = $tmp[0].";";
1819
-
1820
- if(!empty($pieces[$i]) && $pieces[$i] != "#") {
1821
-
1822
- if (!mysql_query($pieces[$i], $db)) {
1823
-
1824
- $errors[] = "\n\n##Mysql Query: \n########\n".
1825
-
1826
- $pieces[$i].
1827
-
1828
- "\n########\n##Error message: ".
1829
-
1830
- mysql_error();
1831
-
1832
-
1833
-
1834
- }
1835
-
1836
- }
1837
-
1838
-
1839
-
1840
- }
1841
-
1842
- return $errors;
1843
-
1844
- }
1845
-
1846
-
1847
-
1848
-
1849
-
1850
- function rurl($fpos, $chunk){
1851
-
1852
- $get_query = "&";
1853
-
1854
- foreach($_GET as $key=>$value){
1855
-
1856
- if(($key != 'fpos')&&($key != 'chunk')&&($key != 'strrep_c')&&($key != 'strrep'))
1857
-
1858
- $get_query .= $key."=".$value."&";
1859
-
1860
- }
1861
-
1862
- $url = $_SERVER['PHP_SELF']."?fpos=".$fpos."&chunk=".$chunk.$get_query;
1863
-
1864
- return $url;
1865
-
1866
- }
1867
-
1868
- function read_file($file, $lines, $start_pos, &$chunk, &$text)
1869
-
1870
- {
1871
-
1872
- $cline = 0;
1873
-
1874
- $fp = fopen($file, "r");
1875
-
1876
- fseek($fp, $start_pos);
1877
-
1878
- while((!feof($fp)) &&($cline <= $lines)){
1879
-
1880
- $btemp = fgets($fp, $chunk);
1881
-
1882
- $buffer .= $btemp;
1883
-
1884
- if(strstr($btemp, ";\n"))
1885
-
1886
- $cline++;
1887
-
1888
- $fpos = ftell($fp);
1889
-
1890
- }
1891
-
1892
- $buffer = str_replace(";\r", ";\n", $buffer);
1893
-
1894
- $text = explode(";\n", $buffer);
1895
-
1896
- $fpos = $fpos - strlen($text[sizeof($text)-1]);
1897
-
1898
- if(sizeof($text) == 1)
1899
-
1900
- $chunk = DATA_CHUNK_LENGTH+$chunk;
1901
-
1902
- else
1903
-
1904
- $chunk = DATA_CHUNK_LENGTH;
1905
-
1906
- if(feof($fp))
1907
-
1908
- $fpos = '-1';
1909
-
1910
- fclose ($fp);
1911
-
1912
- return $fpos; // array_reverse is optional: you can also just return the $text array which consists of the file's lines.
1913
-
1914
- }
1915
-
1916
-
1917
-
1918
- /**
1919
-
1920
- * @param string
1921
-
1922
- */
1923
-
1924
- function split_sql($sql) {
1925
-
1926
-
1927
-
1928
- $ret = array();
1929
-
1930
- $sql = str_replace("\n) ", "\n) ;\n#\n#", $sql);
1931
-
1932
- $sql = str_replace("\n--\n","\n#\n",$sql);
1933
-
1934
- $sql = str_replace("\n-- ","\n# ",$sql);
1935
-
1936
- $sql = str_replace("\n/*","\n#/*",$sql);
1937
-
1938
- $sql = ereg_replace("#\n", "#;\n", $sql);
1939
-
1940
-
1941
- // Processing the SQL file content
1942
-
1943
- $file_content = explode("\n",$sql);
1944
-
1945
- $query = "";
1946
-
1947
- // Parsing the SQL file content
1948
-
1949
- foreach($file_content as $key=>$sql_line)
1950
-
1951
- {
1952
-
1953
-
1954
-
1955
- if(substr($sql_line, 0, 2) == "--")
1956
-
1957
- $sql_line = "#".substr($sql_line, 2, strlen($sql_line));
1958
-
1959
-
1960
-
1961
- if(trim($sql_line) != "" )
1962
-
1963
- {
1964
-
1965
- $query .= $sql_line;
1966
-
1967
- // Checking whether the line is a valid statement
1968
-
1969
- if(preg_match("/(.*);/", $sql_line))
1970
-
1971
- {
1972
-
1973
- $query = substr($query, 0, strlen($query)-1);
1974
-
1975
- //Executing the parsed string, returns the error code in failure
1976
-
1977
- $ret[] = $query;
1978
-
1979
- $query = "";
1980
-
1981
- }
1982
-
1983
- }
1984
-
1985
- } //End of foreach
1986
-
1987
- return($ret);
1988
-
1989
- }
1990
-
1991
-
1992
-
1993
- function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $mosConfig_absolute_path) {
1994
-
1995
-
1996
-
1997
- $currentfullpath = $mosConfig_absolute_path.$path;
1998
-
1999
- # Open possibly available directory
2000
-
2001
- if( is_dir( $currentfullpath ) ) {
2002
-
2003
- if( $handle = opendir( $currentfullpath ) ) {
2004
-
2005
- while( false !== ( $file = readdir( $handle ) ) ) {
2006
-
2007
- # Make sure we don't push parental directories or dotfiles (unix) into the arrays
2008
-
2009
- if( $file != "." && $file != ".." ) {
2010
-
2011
- if( is_dir( $currentfullpath . "/" . $file ) ) {
2012
-
2013
- # Create array for directories
2014
-
2015
- $d_arr[++$d] = $currentfullpath . "/" . $file;
2016
-
2017
- recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $mosConfig_absolute_path);
2018
-
2019
- } else {
2020
-
2021
- if ( in_array($currentfullpath, $includedFolders) ) {
2022
-
2023
- # Create array for files
2024
-
2025
- $s_arr[$f] = filesize($currentfullpath.'/'.$file);
2026
-
2027
- $f_arr[$f++] = str_replace($mosConfig_absolute_path.'/', '', $currentfullpath.'/').$file;
2028
-
2029
- $s += filesize($currentfullpath.'/'.$file);
2030
-
2031
- }
2032
-
2033
- }
2034
-
2035
- }
2036
-
2037
- }
2038
-
2039
- }
2040
-
2041
- # Wrap things up if we're in a directory
2042
-
2043
- if( is_dir( $handle ) )
2044
-
2045
- closedir( $handle );
2046
-
2047
- }
2048
-
2049
- }
2050
-
2051
-
2052
-
2053
-
2054
-
2055
- function version_list($fname) {
2056
-
2057
- global $_CONFIG;
2058
-
2059
-
2060
-
2061
- $return = "<select name='$fname'><option value=''>Choose local clone archive</option>";
2062
-
2063
-
2064
-
2065
- if(is_array($_CONFIG[versions])){
2066
-
2067
- foreach($_CONFIG[versions] as $key=>$value){
2068
-
2069
- $size = sprintf("%.2fM", filesize($value)/(1024*1024));
2070
-
2071
- $return .= "<option selected value='$value'>$value($size)</option>";
2072
-
2073
-
2074
-
2075
- }
2076
-
2077
- }
2078
-
2079
- $return .= "</select>";
2080
-
2081
-
2082
-
2083
- return $return;
2084
-
2085
- }
2086
-
2087
-
2088
- function recursive_remove_directory($directory, $empty=FALSE)
2089
-
2090
- {
2091
-
2092
- // if the path has a slash at the end we remove it here
2093
-
2094
- if(substr($directory,-1) == '/')
2095
-
2096
- {
2097
-
2098
- $directory = substr($directory,0,-1);
2099
-
2100
- }
2101
-
2102
-
2103
-
2104
- // if the path is not valid or is not a directory ...
2105
-
2106
- if(!file_exists($directory) || !is_dir($directory))
2107
-
2108
- {
2109
-
2110
- // ... we return false and exit the function
2111
-
2112
- return FALSE;
2113
-
2114
-
2115
-
2116
- // ... if the path is not readable
2117
-
2118
- }elseif(!is_readable($directory))
2119
-
2120
- {
2121
-
2122
- // ... we return false and exit the function
2123
-
2124
- return FALSE;
2125
-
2126
-
2127
-
2128
- // ... else if the path is readable
2129
-
2130
- }else{
2131
-
2132
-
2133
-
2134
- // we open the directory
2135
-
2136
- $handle = opendir($directory);
2137
-
2138
-
2139
-
2140
- // and scan through the items inside
2141
-
2142
- while (FALSE !== ($item = readdir($handle)))
2143
-
2144
- {
2145
-
2146
- // if the filepointer is not the current directory
2147
-
2148
- // or the parent directory
2149
-
2150
- if($item != '.' && $item != '..')
2151
-
2152
- {
2153
-
2154
- // we build the new path to delete
2155
-
2156
- $path = $directory.'/'.$item;
2157
-
2158
-
2159
-
2160
- // if the new path is a directory
2161
-
2162
- if(is_dir($path))
2163
-
2164
- {
2165
-
2166
- // we call this function with the new path
2167
-
2168
- recursive_remove_directory($path);
2169
-
2170
-
2171
-
2172
- // if the new path is a file
2173
-
2174
- }else{
2175
-
2176
- // we remove the file
2177
-
2178
- unlink($path);
2179
-
2180
- }
2181
-
2182
- }
2183
-
2184
- }
2185
-
2186
- // close the directory
2187
-
2188
- closedir($handle);
2189
-
2190
-
2191
-
2192
- // if the option to empty is not set to true
2193
-
2194
- if($empty == FALSE)
2195
-
2196
- {
2197
-
2198
- // try to delete the now empty directory
2199
-
2200
- if(!@rmdir($directory))
2201
-
2202
- {
2203
-
2204
- // return false if not possible
2205
-
2206
- return FALSE;
2207
-
2208
- }
2209
-
2210
- }
2211
-
2212
- // return success
2213
-
2214
- return TRUE;
2215
-
2216
- }
2217
-
2218
- }
2219
-
2220
-
2221
-
2222
- ?>
1
+ <?php
2
+ /*
3
+ * XCloner.php
4
+ *
5
+ * Copyright 2011 Ovidiu Liuta <info@thinkovi.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ * MA 02110-1301, USA.
21
+ */
22
+
23
+ if(is_file("../cloner.config.php")){
24
+
25
+ echo "<h3>Access denied, if you are trying to restore a backup, please move the restore script in another directory!</h3>";
26
+
27
+ exit;
28
+
29
+ }
30
+
31
+
32
+ @set_time_limit(3600);
33
+
34
+ @ini_set("error_reporting", E_ALL^E_NOTICE);
35
+
36
+ ###################### Do not edit Below #############################
37
+
38
+ $g_pcltar_lib_dir = "./";
39
+
40
+ require "TAR.php";
41
+
42
+ $_CONFIG['my_version'] = "3.0.1";
43
+ $_CONFIG['script_name'] = "XCloner.php";
44
+ $_CONFIG['sql_usefile'] = "";
45
+ $_CONFIG['filesLimit'] = 100;
46
+ $_CONFIG['seek'] = 0;
47
+
48
+
49
+ if(isset($_REQUEST['sql_setfile']))
50
+ $_CONFIG['sql_usefile'] = $_REQUEST['sql_setfile'];
51
+
52
+ if(trim($_CONFIG['sql_usefile']) == "")
53
+ $_CONFIG['sql_usefile'] = "database-sql.sql";
54
+
55
+ if(isset($_REQUEST['strrep'])){
56
+ setcookie ("strrep_c", "", time() - 3600);
57
+ setcookie("strrep_c", str_replace("\r\n","*-*",stripslashes($_REQUEST['strrep'])), time()+3600); /* expire in 1 hour */
58
+ }else{
59
+ $_REQUEST['strrep'] = str_replace("*-*", "\r\n", $_COOKIE['strrep_c']);
60
+ }
61
+
62
+
63
+ if ($handle = opendir('./')) {
64
+ /* This is the correct way to loop over the directory. */
65
+ while (false !== ($file = readdir($handle))){
66
+ $ext = substr($file,strlen($file)-4,strlen($file));
67
+ if(($file!='XCloner.php')&&($file!='..')&&($file!='.')&&(($ext=='.tgz')||($ext=='.tar'))){
68
+ $_CONFIG[versions][] = $file;
69
+ }
70
+ }
71
+ closedir($handle);
72
+ }else{
73
+ echo "Unable to open my directory for reading and listing!";exit;
74
+ }
75
+
76
+
77
+ ######################################################################
78
+
79
+
80
+ $_CONFIG['output_path'] = $_REQUEST['output_path'];
81
+ $_CONFIG['output_url'] = $_REQUEST['output_url_pref']."://".$_REQUEST['output_url'];
82
+ $_CONFIG['tmp'] = $_REQUEST['output_path'];
83
+
84
+ if($_REQUEST['files_skip'] == 1)
85
+ $_REQUEST['do_database'] = 1;
86
+ if($_REQUEST['fpos'])
87
+ $_CONFIG['seek'] = $_REQUEST['fpos'];
88
+
89
+ $filepath =$_SERVER["SCRIPT_FILENAME"];
90
+ $pathinfo = pathinfo($filepath);
91
+ $startscript = $pathinfo['dirname'];
92
+ $_CONFIG[group] = $groupinfo[name];
93
+ $_CONFIG[owner] =$ownerinfo[name];
94
+
95
+ ###################### FRONT AREA ###################################
96
+ //setCache();
97
+ ?>
98
+
99
+ <!DOCTYPE html>
100
+
101
+ <html>
102
+ <head>
103
+ <title>XCloner Restore - <?php echo $_SERVER['HTTP_HOST']?> - Backup and Restore Made Easy</title>
104
+ <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
105
+ <link REL="SHORTCUT ICON" HREF="http://www.xcloner.com/images/favicon.ico">
106
+ <style type="text/css" media="screen">
107
+ @import url( http://www.xcloner.com/downloads/style.css );
108
+ @import url( http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/start/jquery-ui.css );
109
+ .error {
110
+ color: red;
111
+ font-size: 15px;
112
+ }
113
+ </style>
114
+
115
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
116
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"></script>
117
+ </head>
118
+
119
+ <body>
120
+
121
+ <script>
122
+ $(function() {
123
+ $( "#tabs-main" ).tabs();
124
+ });
125
+ </script>
126
+
127
+
128
+ <!-- section 1-->
129
+
130
+ <table align='center' width='700' bgcolor='#eeeeee' style='padding: 0 5px 0 5px;'>
131
+
132
+ <tr><td align='center'><h2><font color=red>XCloner</font> Automatic Restore! - <?php echo $_SERVER['HTTP_HOST']?></h2></td></tr>
133
+
134
+ <tr><td align='left'>
135
+
136
+ <form action='' method='GET' name='form'>
137
+
138
+ <?php
139
+
140
+
141
+
142
+ switch ($_REQUEST[task]) {
143
+ case 'step2':
144
+ step2();
145
+ break;
146
+ case 'step1':
147
+ step1();
148
+ break;
149
+ case 'getinfo':
150
+ getPHPINFO();
151
+ break;
152
+ case 'info':
153
+ echo phpinfo();
154
+ break;
155
+ default :
156
+ start();
157
+ break;
158
+ }
159
+
160
+ ?>
161
+
162
+ </form>
163
+ </td></tr>
164
+ <tr><td>
165
+ <hr />
166
+ <small>XCloner Automatic Restore(<b><?php echo $_CONFIG['my_version']?></b>) - <a href='http://www.xcloner.com' title='XCloner.com - Website Backup Application'>Website Backup and Restore</a>
167
+ </small>
168
+ </td></tr>
169
+ </table>
170
+
171
+ </body>
172
+
173
+ </html>
174
+
175
+
176
+
177
+
178
+
179
+ <?php
180
+
181
+ #####################################################################
182
+
183
+
184
+ ##################### FUNCTIONS #####################################
185
+
186
+ function step2($file=""){
187
+
188
+ global $_CONFIG,$filepath ;
189
+
190
+ $DBcreated = $_REQUEST[DBcreated];
191
+
192
+ if ($DBcreated=='on'){
193
+ $DBhostname = $_REQUEST['mysql_server'];
194
+ $DBuserName = $_REQUEST['mysql_username'];
195
+ $DBpassword = $_REQUEST['mysql_pass'];
196
+ $DBname = $_REQUEST['mysql_db'];
197
+
198
+ $db = @mysql_connect($DBhostname, $DBuserName, $DBpassword) or die("<br />The database details provided are incorrect and/or empty. Unable to connect to mysql server");
199
+ @mysql_query("CREATE database $DBname;");
200
+ if (!@mysql_select_db($DBname)) {
201
+ die("<br /><span class='error'>Could not connect to $DBname database! Please make sure the database exists and that you assigned the mysql user to it...</span>");
202
+ }
203
+ mysql_query("SET sql_mode='';");
204
+ if($_REQUEST['charset_of_file']!="")
205
+ mysql_query("SET NAMES ".$_REQUEST['charset_of_file']."");
206
+ else
207
+ mysql_query("SET NAMES utf8;");
208
+ }
209
+
210
+ if($_REQUEST['do_database'] != 1){
211
+
212
+ ############ DATABASE ONLY RESTRICTION##################################################
213
+
214
+ ########################### START FTP MODE #################################
215
+ if($_REQUEST[transfer_mode]==2){
216
+
217
+ $_CONFIG[output_path] = $_CONFIG[output_path]."/archive_tmp/";
218
+ @mkdir($_CONFIG[output_path]);
219
+
220
+ // set up basic connection
221
+ $conn_id = @ftp_connect($_REQUEST[ftp_server], $_REQUEST[ftp_port]) or die("<span class='error'>Could not connect to $_REQUEST[ftp_server] on port $_REQUEST[ftp_port]! Ftp connection has failed!</span>");
222
+
223
+ // login with username and password
224
+ $login_result = @ftp_login($conn_id, $_REQUEST[ftp_user], $_REQUEST[ftp_pass]) or die("<span class='error'>Could not login to ftp server for user $_REQUEST[ftp_user] and provided pass! Ftp connection has failed!</span>");
225
+
226
+ // check connection
227
+ if ((!$conn_id) || (!$login_result)) {
228
+ echo "<b style='color:red'>FTP connection has failed!</b>";
229
+ echo "<b style='color:red'>Attempted to connect to ".$_REQUEST[ftp_server].":".$_REQUEST[ftp_port]." for user ".$_REQUEST[ftp_user]."</b>";
230
+ return;
231
+ } else {
232
+ echo "<br />Connected to $_REQUEST[ftp_server], for user $_REQUEST[ftp_user], starting transfer...<br />";
233
+ }
234
+ $ftp_dir_original = ftp_pwd($conn_id);
235
+ @ftp_mkdir($conn_id,$_REQUEST[ftp_path]);
236
+
237
+ // try to change the directory to somedir
238
+ if (@ftp_chdir($conn_id, $_REQUEST[ftp_path])) {
239
+ echo "Current directory is now: <b>" . ftp_pwd($conn_id) . "</b>\n";
240
+ } else {
241
+ echo "<b style='color:red'>Couldn't change directory to <b>$_REQUEST[ftp_path]</b>, please verify that the ftp location exists or use the \"Install files directly\" option!</b><br />\n";
242
+ return;
243
+ }
244
+ @ftp_chdir($conn_id, $ftp_dir_original);
245
+
246
+ }
247
+
248
+ ########################## END FTP MODE ######################################
249
+
250
+
251
+ ##### START extract ######
252
+ if($_REQUEST['refresh'] < 1){
253
+
254
+ $ext = substr($file, strlen($file)-4, strlen($file));
255
+ if($_REQUEST['file_utilities'] != '1'){
256
+ $tar_object = new Archive_Tar($file);
257
+
258
+ if($_REQUEST['manual_ftp']){
259
+
260
+ $tar_object->_openRead();
261
+ fseek($tar_object->_file, $_CONFIG['seek']);
262
+ $seek = $tar_object->_extractList($_CONFIG['output_path'], $return, "partial", "", "", $_CONFIG['filesLimit']);
263
+ $seek = $seek - 512;//reverse 512 bytes
264
+ if($seek > 0){
265
+ $backupSize = filesize($file);
266
+ $rurl = rurl($seek, $backupSize);
267
+ $percent = sprintf("%.2f",($seek*100)/$backupSize);
268
+ echo "<h3>Processing files - ".$percent."%</h3>";
269
+ echo "<script> document.location='".$rurl."'</script>";
270
+ return;
271
+ }
272
+ $_REQUEST['fpos'] = 0;
273
+ $_REQUEST['chunk'] = 0;
274
+ }
275
+ else{
276
+ $tar_object->extract($_CONFIG['output_path']);
277
+ #$tar_object->extractList("backups/perm.txt", $_CONFIG['output_path']);
278
+ }
279
+
280
+ }else{
281
+ if($ext == '.tgz') $compress = 'z';
282
+ else $compress = '';
283
+ shell_exec("tar -x".$compress."pf $file -C $_CONFIG[output_path]");
284
+ }
285
+ }
286
+ ##### END extract ######
287
+
288
+
289
+ $new_arr = array();
290
+ #@chmod($_CONFIG[output_path], 0777);
291
+ $tran_file = $_CONFIG[output_path]."/transfer.txt";
292
+
293
+ if($_REQUEST[transfer_mode]==2){
294
+ # initialise list arrays, directories and files separately and array counters for them
295
+ $excludedFolders = array();
296
+ $d_arr = array(); $d = 0;
297
+ $ds_arr = array();
298
+ $f_arr = array(); $f = 0;
299
+ $s_arr = array(); $s = 0;
300
+ $d_arr[$d] = $_CONFIG[output_path];
301
+
302
+ if($_REQUEST['refresh'] < 1){
303
+ # obtain the list of files by recursing the mambo file store
304
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $excludedFolders , '', $_CONFIG[output_path]);
305
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $d_arr , '', $_CONFIG[output_path]);
306
+ sort($d_arr);
307
+ sort($f_arr);
308
+ $new_arr = array_merge($d_arr, $f_arr);
309
+
310
+ if($_REQUEST[transfer_mode]==2)
311
+ if($fp = fopen($tran_file, "w")){
312
+ foreach($new_arr as $file){
313
+ fwrite($fp, $file."\n");
314
+ }
315
+ fclose($fp);
316
+ }else{
317
+ echo "Unable to write to directory ".$_CONFIG[output_path]."! Please check that this directory is writeable!"; return;
318
+ }
319
+ else{};
320
+
321
+ }else{
322
+ $content = "";
323
+ $new_arr = file($tran_file);
324
+ }
325
+
326
+ if(sizeof($new_arr) != 0 )
327
+ $percn = sprintf("%.2f",($_REQUEST[next] * 100)/sizeof($new_arr));
328
+ if($percn > sizeof($new_arr))
329
+ $percn = sizeof($new_arr);
330
+
331
+ }
332
+
333
+
334
+ if($_REQUEST['refresh'] == 1){
335
+ echo "<h3>Transfering $percn% of ".sizeof($new_arr)." files through ftp</h3>";
336
+ echo "<textarea cols=70 rows=30 name='ftp_list'></textarea>";
337
+ }
338
+ elseif($_REQUEST['refresh'] == 2)
339
+ echo "Files transfer finished!";
340
+
341
+ $i = (int)$_REQUEST[next];
342
+ $j = 0;
343
+
344
+ ### MOVING THE FILES THROUGH FTP
345
+
346
+ #foreach($new_arr as $key=>$file)
347
+ for($key=$i;$key<=sizeof($new_arr);$key++){
348
+ $file = str_replace(array("\r","\n"), array("",""), $new_arr[$key]);
349
+ if($_REQUEST['manual_ftp'] == 1)
350
+ if($j == 100){
351
+ #echo "Transfering files from line: ". (int)$_REQUEST[next];
352
+ $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
353
+ $rurl = "XCloner.php?".$qstr[0]."&refresh=1&next=".($_REQUEST[next]+100);
354
+ ftp_close($conn_id);
355
+ echo "<script> document.location='".$rurl."'</script>";
356
+ exit;
357
+ }
358
+
359
+ $j++;
360
+ $sfile = str_replace($_CONFIG[output_path],"",$file);
361
+ $fsource = $_CONFIG[output_path]."/".$sfile;
362
+ if(($sfile != "")&&($sfile!="/"))
363
+ if($_REQUEST[transfer_mode]==2){
364
+ $upload = 1;
365
+ $ftarget = $_REQUEST[ftp_path]."/".$sfile;
366
+ if(is_dir($fsource)){
367
+ $upload1 = @ftp_mkdir($conn_id,$ftarget);
368
+ }else{
369
+ $upload = ftp_put($conn_id, $ftarget, $fsource, FTP_BINARY);
370
+ }
371
+ #echo "$i <br >";
372
+
373
+ if(!$upload){
374
+ echo "<br /><font color=red>Transfer fail for $fsource to $ftarget</font> <br />File already exists and/or doesn't have writing permissions!<br/>";
375
+ }else{
376
+
377
+ if($_REQUEST['manual_ftp'] == 1){
378
+ $ftarget .= '\n';
379
+
380
+ echo "<script>document.form.ftp_list.value = document.form.ftp_list.value + '".$ftarget."'; </script>";
381
+ #echo "$ftarget <br />\n";
382
+ }
383
+ }
384
+ }
385
+ }
386
+
387
+
388
+ if($_REQUEST['refresh'] == 1){
389
+ $qstr = explode("&refresh=1&next=",$_SERVER['QUERY_STRING']);
390
+ $rurl = "XCloner.php?".$qstr[0]."&refresh=2&next=".($_REQUEST[next]+102);
391
+ echo "<script> document.location='".$rurl."'</script>";
392
+ exit;
393
+ }
394
+
395
+ ############### RESTORING HTACCESS AND CONFIGURATION PERM#####################################
396
+
397
+ if($_REQUEST[transfer_mode]==2){
398
+ $cmd = "CHMOD 0777 ".$_REQUEST[ftp_path]."/"."wp-config.php";
399
+ @ftp_site($conn_id, $cmd);
400
+ }else{
401
+ @chmod($_REQUEST[output_path]."/"."wp-config.php", 0777);
402
+ }
403
+
404
+
405
+ #### CUSTOM PERMISSIONS #####
406
+ if($_REQUEST['preserve_perm']){
407
+ $perm_data = "";
408
+ $perm_file = $_CONFIG[output_path]."/administrator/backups/perm.txt";
409
+ $per = 1;
410
+
411
+ @chmod($perm_file,0777);
412
+ $fp = @fopen($perm_file,'r');
413
+ if($fp){
414
+ while(!feof($fp))
415
+ $perm_data .= fread($fp, 1024);
416
+ fclose($fp);
417
+ }else{
418
+
419
+ echo "Could not set permissions! Permissions file $perm_file not found!<br />";
420
+ $per = 0;
421
+ }
422
+
423
+ $data = explode("\n",$perm_data);
424
+ foreach($data as $value){
425
+ $dir = explode("|", $value);
426
+ if($dir[1]=="")
427
+ $dir[1] = '0755';
428
+
429
+ if(strstr($dir[0],"wp-config.php"))
430
+ $dir[1] = '0777';
431
+
432
+ if($_REQUEST[transfer_mode]==2){
433
+ $cmd = "CHMOD ".$dir[1]." ".$_REQUEST[ftp_path]."/".$dir[0];
434
+
435
+ @ftp_site($conn_id, $cmd);
436
+
437
+ }else{
438
+
439
+ @chmod($_CONFIG[output_path]."/".$dir[0], octdec($dir[1]));
440
+
441
+ }
442
+
443
+ }
444
+
445
+ if($per){
446
+ echo "<h2>Permissions restored to their initial value...</h2>";
447
+ }
448
+
449
+ }
450
+ #### END CUSTOM PERMISSIONS #####
451
+
452
+ $_CONFIG[output_path] = str_replace("/archive_tmp/","",$_CONFIG[output_path]);
453
+
454
+ if($_REQUEST[transfer_mode]==2){
455
+
456
+ // close the FTP stream
457
+ @ftp_close($conn_id);
458
+ recursive_remove_directory($_CONFIG[output_path]."/archive_tmp/");
459
+ @unlink($_CONFIG[output_path]."/archive_tmp/");
460
+ echo "<h2>Files succesfully copied to ".$_REQUEST[ftp_path]." on $_REQUEST[ftp_server] using FTP</h2>";
461
+
462
+ }else{
463
+ echo "<h2>Files succesfully copied to ".$_CONFIG[output_path]."</h2>";
464
+ }
465
+
466
+ ######### END DATABASE ONLY RESTRICT #########################################
467
+
468
+ }
469
+
470
+
471
+ ##### RESTORE CONFIGURATION #####
472
+ $update_config = 1;
473
+
474
+ if(($_REQUEST['files_skip']) and (isset($_REQUEST['fpos']))){
475
+
476
+ $update_config = 0;
477
+
478
+ }
479
+
480
+ if(($_REQUEST['do_database'] != 1) || ($_REQUEST['files_skip'] == 1)){
481
+ $config_file = $_CONFIG[output_path]."/wp-config.php";
482
+ @chmod($config_file,0777);
483
+ @unlink($_CONFIG[output_path]."/administrator/backups/perm.txt");
484
+ if(($_CONFIG['sql_usefile'] == "database-sql.sql") and ($update_config))
485
+ if(write_config($config_file)){
486
+ echo "<H2>Configuration updated!</H2>";
487
+ }else{
488
+ echo "<span class='error'>Unable to write to configuration file $config_file... Aborting...</span>";return;
489
+ }
490
+ }
491
+
492
+
493
+ ############ ATTEMPT DATABASE INSERT #####################################
494
+
495
+ if($DBcreated!='on'){
496
+
497
+ echo "<h2>Database import skipped!</h2>";
498
+ echo "<a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...</b></a><br />";
499
+
500
+ return ;
501
+ }
502
+
503
+ if (($DBcreated=='on')&&($_REQUEST['do_database'] == 1)){
504
+
505
+ $sqlfile = $_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile'];
506
+
507
+ if(!file_exists($sqlfile)){
508
+ echo "<span class='error'>Unable to read the database backup file $sqlfile , database was not imported!</span>";
509
+ }else{
510
+
511
+ if($_REQUEST['manual_sql'])
512
+ $errors = populate_db_manual( $db, $sqlfile);
513
+ else
514
+ $errors = populate_db( $db, $sqlfile);
515
+
516
+ if(sizeof($errors)>0){
517
+
518
+ echo "There were some errors while importing the database:<br />";
519
+ echo "<textarea cols=60 rows=30>".implode("\n",$errors)."</textarea>";
520
+ exit;
521
+ }else{
522
+
523
+ @unlink($_CONFIG[output_path]."/administrator/backups/".$_CONFIG['sql_usefile']);
524
+
525
+ }
526
+
527
+ echo "<h2>Database populated...</h2>";
528
+
529
+ }
530
+ }
531
+
532
+ ###################################################################################
533
+
534
+ if($_REQUEST['do_database'] != 1) {
535
+
536
+ $vars = "";
537
+ foreach($_REQUEST as $key=>$value)
538
+ $vars .= $key.'='.@urlencode($value).'&';
539
+
540
+ #$href = "XCloner.php?".$vars."do_database=1";
541
+ $href = rurl()."&do_database=1";
542
+ echo "<br /><a href='$href'>Please click here to continue with database import...</a>";
543
+
544
+ return;
545
+
546
+ }else{
547
+
548
+ echo "<br /><a href='".$_CONFIG[output_url]."'><b>All should be done! Click here to continue...<br /></a><br />";
549
+ return ;
550
+ }
551
+
552
+ }
553
+
554
+ function write_config($file){
555
+
556
+ if(@$fp = fopen($file, "r")){
557
+ $config_data = "";
558
+ while(!feof($fp))
559
+ $config_data .= fread($fp, 1024);
560
+ fclose($fp);
561
+ }
562
+
563
+ if ($_REQUEST[DBcreated] == 'on'){
564
+
565
+ $config_data = str_replace("define('DB_HOST', '", "define('DB_HOST', '".$_REQUEST[mysql_server]."');#", $config_data);
566
+ $config_data = str_replace("define('DB_USER', '", "define('DB_USER', '".$_REQUEST[mysql_username]."');#", $config_data);
567
+ $config_data = str_replace("define('DB_PASSWORD', '", "define('DB_PASSWORD', '".$_REQUEST[mysql_pass]."');#", $config_data);
568
+ $config_data = str_replace("define('DB_NAME', '", "define('DB_NAME', '".$_REQUEST[mysql_db]."');#", $config_data);
569
+ $liveurl = $_REQUEST[output_url_pref]."://".$_REQUEST[output_url];
570
+ $config_data = str_replace("define('DB_HOST", "define('WP_SITEURL','".$liveurl."');\ndefine('WP_HOME','".$liveurl."');\ndefine('RELOCATE',true);\ndefine('DB_HOST", $config_data);
571
+
572
+ $config_data = str_replace("define('WP_SITEURL', '", "define('WP_SITEURL', '".$liveurl."');#", $config_data);
573
+ $config_data = str_replace("define('WP_HOME', '", "define('WP_HOME', '".$liveurl."');#", $config_data);
574
+ }
575
+
576
+ if($_REQUEST['transfer_mode'] == 2){
577
+ $config_data = str_replace('$'.'ftp_host =',"$"."ftp_host ='".$_REQUEST[ftp_server]."';#", $config_data);
578
+ $config_data = str_replace('$'.'ftp_port =',"$"."ftp_port ='".$_REQUEST[ftp_port]."';#", $config_data);
579
+ $config_data = str_replace('$'.'ftp_user =',"$"."ftp_user ='".$_REQUEST[ftp_user]."';#", $config_data);
580
+ $config_data = str_replace('$'.'ftp_pass =',"$"."ftp_pass ='".$_REQUEST[ftp_pass]."';#", $config_data);
581
+ $config_data = str_replace('$'.'ftp_root =',"$"."ftp_root ='".$_REQUEST[ftp_path]."';#", $config_data);
582
+ }else{
583
+ $config_data = str_replace('$'.'ftp_enable =',"$"."ftp_enable ='0';#", $config_data);
584
+ }
585
+
586
+ $_REQUEST[output_url] = str_replace("/###","",$_REQUEST[output_url]."###");
587
+ $_REQUEST[output_url] = str_replace("###","",$_REQUEST[output_url]);
588
+
589
+ $config_data = str_replace('$'.'live_site =',"$"."live_site ='".$_REQUEST[output_url_pref]."://".$_REQUEST[output_url]."';#", $config_data);
590
+ $config_data = str_replace('$'.'absolute_path =',"$"."absolute_path ='".$_REQUEST[output_path]."';#", $config_data);
591
+
592
+ if ($fp = fopen($file, "w")) {
593
+ fwrite( $fp, $config_data);
594
+ fclose( $fp );
595
+ } else {
596
+ return false;
597
+ } // if
598
+ return true;
599
+ }
600
+
601
+
602
+ function step1(){
603
+
604
+ global $_CONFIG;
605
+
606
+ $ftarget = $_CONFIG[output_path]."/".$_REQUEST[ver];
607
+
608
+ if($_REQUEST['refresh'] < 1)
609
+
610
+ if(!is_writable($_CONFIG[output_path])){
611
+
612
+ echo "<span class='error'>Directory ".$_CONFIG[output_path]." is not writeable or does not exists! Could not continue...</span>";
613
+
614
+ return ;
615
+
616
+ }
617
+
618
+
619
+
620
+ $ftarget = $_REQUEST[ver];
621
+
622
+
623
+ if((!file_exists($ftarget)) and (!$_REQUEST['files_skip'])){
624
+ echo "<span class='error'>Could not continue, unable to read the clone backup file! Please make sure you copied the backup in the same directory as XCloner.php </span>";
625
+ return;
626
+ }
627
+
628
+ step2($ftarget);
629
+
630
+ return;
631
+
632
+ }
633
+
634
+
635
+
636
+ function start() {
637
+
638
+ global $_CONFIG,$pathinfo;
639
+
640
+ $pdir = str_replace($_CONFIG['script_name'], "", $_SERVER["SCRIPT_FILENAME"]);
641
+
642
+ $purl = $_SERVER['HTTP_HOST'].str_replace("/".$_CONFIG['script_name'],"", $_SERVER['SCRIPT_NAME']);
643
+
644
+ ?>
645
+
646
+
647
+ <script>
648
+ $(function() {
649
+ $( "#DBcreated" ).button();
650
+ $( "#phpinfo").button();
651
+ $( "#manual_sql" ).button();
652
+ $( "#transfer_mode-ftp" ).button();
653
+ $( "#transfer_mode-direct" ).button();
654
+ $( "input:submit", ".form" ).button();
655
+ });
656
+ $(function() {
657
+ $( "#tabs" ).tabs();
658
+ $( "#tabs2" ).tabs();
659
+ });
660
+ </script>
661
+
662
+
663
+ <!-- section 1-->
664
+ <div id="tabs2">
665
+ <ul>
666
+ <li><a href="#tabs2-1">New Path & Url Configuration</a></li>
667
+ </ul>
668
+ <div id="tabs2-1">
669
+ <table class="adminForm">
670
+
671
+ <tr><td nowrap>
672
+ 1. Install directory: (server path where you want to restore your backup)<br />
673
+ <input type=text size=80 name='output_path' value='<?php echo str_replace("\\", "/", $pdir);?>'><br >
674
+
675
+ </td></tr>
676
+ <tr><td>
677
+ <br />2.Install Url: (the url correspondent of your Install directory:)<br />
678
+ <div style="display:inline">
679
+ <div style="float:left">
680
+ <select name='output_url_pref'>
681
+ <option selected value='http'>http://</option>
682
+ <option value='https'>https://</option>
683
+ </select>
684
+ </div>
685
+ <div style="float:left">
686
+ <input type=text size=65 name='output_url' value='<?php echo $purl?>'>
687
+ </div>
688
+ </div>
689
+
690
+ </td></tr>
691
+ <tr><td>
692
+ <br />3. Choose backup archive to restore:
693
+ <?php echo version_list('ver');?>
694
+ </td></tr>
695
+ </table>
696
+ </div>
697
+ </div>
698
+ <!-- end section 1-->
699
+
700
+ <div id="tabs">
701
+ <ul>
702
+ <li><a href="#tabs-1">New Mysql Configuration</a></li>
703
+ <li><a href="#tabs-2">File Restore Options</a></li>
704
+ </ul>
705
+
706
+ <div id="tabs-1">
707
+ <!--start tabs 1 -->
708
+ <table width="100%">
709
+ <tr><td>
710
+ <!--<h3><a href="#">Mysql configuration: </a></h3>-->
711
+ <input type=checkbox checked name='DBcreated' id="DBcreated"> <label for="DBcreated">Import mysql database</label>
712
+ <input type='checkbox' value='1' name='manual_sql' checked id="manual_sql"> <label for="manual_sql">Incremental sql import</label>
713
+ </td></tr>
714
+ <tr><td>
715
+ <!-- mysql details -->
716
+ <table width='100%'>
717
+ <tr>
718
+ <td nowrap>Mysql server:</td>
719
+ <td><input type=text size=40 name='mysql_server' value='localhost'></td>
720
+ <tr>
721
+ <td>Mysql username:</td>
722
+ <td><input type=text size=40 name='mysql_username' value=''></td>
723
+ </tr>
724
+ <tr>
725
+ <td>Mysql password:</td>
726
+ <td><input type=text size=40 name='mysql_pass' value=''></td>
727
+ </tr>
728
+ <tr>
729
+ <td>Mysql database:</td>
730
+ <td><input type=text size=40 name='mysql_db' value=''></td>
731
+ </tr>
732
+ <tr>
733
+ <td>Data encoding:</td>
734
+ <td>
735
+ <select name="charset_of_file">
736
+
737
+ <option value="" selected="selected">Default</option>
738
+ <option value="big5" title="Big5 Traditional Chinese">big5</option>
739
+ <option value="binary" title="Binary pseudo charset">binary</option>
740
+ <option value="cp1250" title="Windows Central European">cp1250</option>
741
+ <option value="cp932" title="SJIS for Windows Japanese">cp932</option>
742
+ <option value="euckr" title="EUC-KR Korean">euckr</option>
743
+
744
+ <option value="gb2312" title="GB2312 Simplified Chinese">gb2312</option>
745
+ <option value="gbk" title="GBK Simplified Chinese">gbk</option>
746
+ <option value="latin1" title="cp1252 West European">latin1</option>
747
+ <option value="latin2" title="ISO 8859-2 Central European">latin2</option>
748
+ <option value="sjis" title="Shift-JIS Japanese">sjis</option>
749
+ <option value="tis620" title="TIS620 Thai">tis620</option>
750
+
751
+ <option value="ucs2" title="UCS-2 Unicode">ucs2</option>
752
+ <option value="ujis" title="EUC-JP Japanese">ujis</option>
753
+ <option value="utf8" title="UTF-8 Unicode" >utf8</option>
754
+ </select>
755
+ </td>
756
+ </tr>
757
+
758
+ <?php
759
+ $dir = "administrator/backups/";
760
+ $sql_files =array();
761
+ if(@is_dir($dir)){
762
+ if ($handle = @opendir($dir)) {
763
+ /* This is the correct way to loop over the directory. */
764
+ while (false !== ($file = @readdir($handle))) {
765
+ if(strstr($file, ".sql"))
766
+ $sql_files[] = $file;
767
+ }
768
+ @closedir($handle);
769
+ }
770
+
771
+ if(sizeof($sql_files) > 0) {
772
+ $list = "";
773
+ for($i=0;$i<sizeof($sql_files);$i++){
774
+ $list .= "<option value='$sql_files[$i]'>$sql_files[$i]</option>";
775
+ }
776
+
777
+ echo "<tr><td>Import Mysql file:</td>
778
+ <td><select name='sql_setfile'><option value='database-sql.sql'>Default</option>$list</select></td> </tr>";
779
+ }
780
+ }
781
+ ?>
782
+ </table>
783
+ </tr></td>
784
+ <!-- end mysql details -->
785
+ </table>
786
+ <!--end tabs 1 -->
787
+ </div>
788
+
789
+ <div id="tabs-2">
790
+ <!-- start tabs 2 -->
791
+ <table width="100%">
792
+ <tr bgcolor='#dddddd'><td>
793
+ <!--<h3><a href="#">Files transfer and configuration:</a></h3>-->
794
+ <input type=checkbox name='files_skip' value='1' > <font color='red'>Skip files restore</font><br />
795
+ <input type=checkbox name='preserve_perm' value='1'> Restore files permissions<br />
796
+ <input type=checkbox name='file_utilities' value='1' > Restore by using the server utilities(tar) <br />
797
+ <input type='checkbox' value='1' name='manual_ftp' checked> Incremental transfer
798
+ </td></tr>
799
+
800
+ <tr><td colspan=2>
801
+
802
+ <table width='100%'>
803
+ <tr><td colspan='2'>
804
+ <label for="transfer_mode-ftp">Install files throught ftp:</label>
805
+ <input type=radio name=transfer_mode value=2 id="transfer_mode-ftp">
806
+ <!--<small>this will attempt to transfer all files through ftp, so the owner keep it's permissions, can be used to send files to other hosts also, <font color=red>*recommended</font></small>-->
807
+ <label for="transfer_mode-direct">Install files directly</label>
808
+ <input type=radio name=transfer_mode value=1 checked id="transfer_mode-direct"><br />
809
+ <!--<small>transfering the files directly will cause some permissions problems in some cases, but it's faster than the other option </small>-->
810
+ </td></tr>
811
+ <tr>
812
+ <td valign="top" nowrap>Ftp server:</td>
813
+ <td><input type=text size=30 name='ftp_server' value='localhost'> : <input type=text size=3 name='ftp_port' value='21'></td>
814
+ </tr>
815
+ <tr>
816
+ <td valign="top">Ftp username:</td>
817
+ <td><input type=text size=30 name='ftp_user'></td>
818
+ </tr>
819
+ <tr>
820
+ <td valign="top">Ftp password:</td>
821
+ <td><input type=text size=30 name='ftp_pass'></td>
822
+ </tr>
823
+ <tr>
824
+ <td valign="top">Ftp upload path:</td>
825
+ <td><input type=text size=30 name='ftp_path'>
826
+ <br><small>ftp root path of where the backup will be restored</small>
827
+ </td>
828
+ </tr>
829
+ </table>
830
+
831
+ </td></tr>
832
+ </table>
833
+ <!--end tabs 2-->
834
+ </div>
835
+ </div>
836
+
837
+ <br />
838
+ <div class="form">
839
+ <input type=hidden name='task' value='step1'>
840
+ <input type=submit name=submit value='Start install' >
841
+ <button onclick="window.open('XCloner.php?task=getinfo', 'getInfo', 'toolbar,width=750,height=400'); return false;" id="phpinfo">phpinfo()</button>
842
+ </div>
843
+ <small>*after hitting submit please wait for the package to get unarchived and transfered through ftp if it is the case!</small>
844
+
845
+ <br />
846
+ <span class="ui-state-highlight">
847
+ <span style='color:red'>Security Note:</span> After restore <b>delete the XCloner.php</b> script from your server</span>
848
+ </span>
849
+
850
+ <?php
851
+
852
+ }
853
+
854
+ function getPHPINFO(){
855
+
856
+ ?>
857
+
858
+ <table width='100%'>
859
+ <tr bgcolor='#dddddd'><td>
860
+ <b>PHP Configuration: <a target='_blank' href='XCloner.php?task=info'> phpinfo()</a></b>
861
+ </td></tr>
862
+
863
+ <tr><td>
864
+ <table bgcolor='#dddddd' width='65%' style='text-align:center;' border='1'>
865
+ <tr>
866
+ <td><b style='color:red'>PHP Setting</b></td>
867
+ <td><b style='color:orange'>Current Value</b></td>
868
+ <td><b style='color:green'>Recomemnded</b></td>
869
+ </tr>
870
+ <tr>
871
+ <td><b>Open_Basedir:</b> </td>
872
+ <td>
873
+ <?php echo (@ini_get('open_basedir') ? @ini_get('open_basedir') : 'No value')?>
874
+ </td>
875
+ <td><b>No Value</b></td>
876
+ </tr>
877
+ <tr>
878
+ <td><b>Max Execution Time:</b> </td>
879
+ <td>
880
+ <?php echo (@ini_get('max_execution_time') ? @ini_get('max_execution_time') : 'No value')?>
881
+ </td>
882
+ <td><b>>30</b></td>
883
+ </tr>
884
+ <tr>
885
+ <td><b>Safe mode:</b> </td>
886
+ <td>
887
+ <?php echo (@ini_get('safe_mode') ? @ini_get('safe_mode') : 'Off')?>
888
+ </td>
889
+ <td><b>Off</b></td>
890
+ </tr>
891
+ </table>
892
+ </td></tr>
893
+ </table>
894
+
895
+ <?php
896
+ }
897
+
898
+
899
+ ###END
900
+
901
+
902
+ ###Starting the manual sql backup
903
+
904
+ function populate_db_manual( $db, $sqlfile='administrator/backups/database-sql.sql'){
905
+
906
+ global $qstr;
907
+
908
+ $extra_que = $qstr[0];
909
+
910
+ $file = $sqlfile;
911
+
912
+ define ('DATA_CHUNK_LENGTH',16384); // How many chars are read per time
913
+
914
+ define ('MAX_QUERY_LINES',300); // How many lines may be considered to be one query (except text lines)
915
+
916
+ $lines = "";
917
+
918
+ $error = "";
919
+
920
+ $error_status = 0;
921
+
922
+ if((isset($_REQUEST['chunk']))&&((int)$_REQUEST['chunk'] != 0))
923
+
924
+ $chunk = $_REQUEST['chunk'];
925
+
926
+ else
927
+
928
+ $chunk = DATA_CHUNK_LENGTH;
929
+
930
+ if($_REQUEST['correct_query'] != 1){
931
+
932
+ $start_pos = (int)$_REQUEST['fpos'];
933
+
934
+ $fpos = read_file($file, MAX_QUERY_LINES, $start_pos, $chunk, $lines);
935
+
936
+ }else{
937
+
938
+ $lines[0] = stripslashes($_REQUEST['error_msg']);
939
+
940
+ $fpos = $_REQUEST['start_posf'] ;
941
+
942
+ }
943
+
944
+ foreach($lines as $line)
945
+
946
+ if(trim($line) != ''){
947
+
948
+ $query = $line;
949
+
950
+ $line = $line .";\n";
951
+
952
+ #$tmp = explode("DEFAULT CHARSET",$line);
953
+
954
+ $line_tmp = $line;
955
+
956
+ $start_pos = $start_pos + strlen($line);
957
+
958
+ if(isset($_REQUEST['strrep']))
959
+
960
+ {
961
+
962
+ $strrep = explode("\r\n", stripslashes($_REQUEST['strrep']));
963
+
964
+ foreach($strrep as $value)
965
+
966
+ if(trim($value)!= ""){
967
+
968
+
969
+ $tmp = explode("|", $value);
970
+
971
+
972
+ $line_tmp = str_replace(trim($tmp[0]),trim($tmp[1]),$line_tmp);
973
+
974
+ $query = str_replace(trim($tmp[0]),trim($tmp[1]),$query);
975
+
976
+ }
977
+
978
+ }
979
+
980
+ if(!mysql_query($line_tmp)){
981
+
982
+ if($_REQUEST['correct_query'] != 1)
983
+
984
+ $fpos = $start_pos ;
985
+
986
+ $form_url = rurl($fpos, $chunk);
987
+
988
+ echo "</form><form name='' action='".$form_url."' method='POST'>
989
+
990
+ <input type='hidden' name='correct_query' value = '1'>
991
+
992
+ <input type='hidden' name='start_pos' value='".$start_pos."'>
993
+
994
+ <input type='hidden' name='start_posf' value='".$fpos."'>
995
+
996
+ <input type='hidden' name='glen' value='".$qlen."'>
997
+
998
+ <center>";
999
+
1000
+ echo sprintf("<b>###MYSQL error</b>\n<br /><font color='red'>".mysql_error()."</font><br />\n<b>###On Query:</b><br />\n<br /><textarea cols=70 rows=15 name='error_msg'>%s</textarea><br />", $query);
1001
+
1002
+ echo "<b>Search and replace in query:</b><br /><textarea cols=70 rows=5 name='strrep'>".stripslashes($_REQUEST[strrep])."</textarea><br />
1003
+
1004
+ <small>
1005
+
1006
+ enter a string, one per line, which you would like to replace in the query above, example <i>string_to_search|text_to_replace_with</i>
1007
+
1008
+ </small>";
1009
+
1010
+ echo "<br /> <input type=submit name=submit value='Correct Query &gt;&gt;'>";
1011
+
1012
+ echo "</center></form>";
1013
+
1014
+ $error_status = 1;
1015
+
1016
+ break;
1017
+
1018
+ }
1019
+
1020
+ }
1021
+
1022
+
1023
+ $percent = sprintf("%.2f", (100*$fpos)/ filesize($file));
1024
+
1025
+ if($fpos!='-1'){
1026
+
1027
+ echo "<h3>Processed $percent% from sql backup!</h3>";
1028
+
1029
+ $red_url = rurl($fpos, $chunk);
1030
+
1031
+ if($error_status == 1 ){
1032
+
1033
+ echo "<h3><a href='".$red_url."'>To skip this query, click here to Continue</a></h3>";
1034
+
1035
+ exit;
1036
+
1037
+ }else{
1038
+
1039
+ echo "<h3><a href='".$red_url."'>Continue here</a></h3>";
1040
+
1041
+ echo "<script>window.location='".$red_url."'</script>";
1042
+
1043
+ exit;
1044
+
1045
+ }
1046
+
1047
+ } else {
1048
+
1049
+ echo "<h3>The sql import is finished!</h3>";
1050
+
1051
+ }
1052
+
1053
+ return;
1054
+
1055
+ }
1056
+
1057
+ ########END
1058
+
1059
+
1060
+
1061
+ ### STARTING THE AUTOMATIC BACKUP
1062
+
1063
+ function populate_db( $db, $sqlfile='administrator/backups/database-sql.sql') {
1064
+
1065
+ global $errors, $_CONFIG;
1066
+
1067
+ if($_REQUEST['use_mysqldump'] == 1){
1068
+ echo shell_exec($_REQUEST['mysqldump_path']." -u ".$_REQUEST[mysql_username]." -p".$_REQUEST[mysql_pass]." -h ".$_REQUEST[mysql_server]." ".$_REQUEST[mysql_db]." < ".$sqlfile);
1069
+ return;
1070
+ }
1071
+
1072
+ $mqr = @get_magic_quotes_runtime();
1073
+
1074
+ @set_magic_quotes_runtime(0);
1075
+
1076
+ @chmod($sqlfile,0777);
1077
+
1078
+ $query = fread( fopen( $sqlfile, 'r' ), filesize( $sqlfile ) );
1079
+
1080
+ @set_magic_quotes_runtime($mqr);
1081
+
1082
+ $pieces = split_sql($query);
1083
+
1084
+
1085
+
1086
+ for ($i=0; $i<count($pieces); $i++) {
1087
+
1088
+ $pieces[$i] = trim($pieces[$i]);
1089
+
1090
+ $tmp = explode("DEFAULT CHARSET",$pieces[$i]);
1091
+
1092
+ $pieces[$i] = $tmp[0].";";
1093
+
1094
+ if(!empty($pieces[$i]) && $pieces[$i] != "#") {
1095
+
1096
+ if (!mysql_query($pieces[$i], $db)) {
1097
+
1098
+ $errors[] = "\n\n##Mysql Query: \n########\n".
1099
+
1100
+ $pieces[$i].
1101
+
1102
+ "\n########\n##Error message: ".
1103
+
1104
+ mysql_error();
1105
+
1106
+
1107
+
1108
+ }
1109
+
1110
+ }
1111
+
1112
+
1113
+
1114
+ }
1115
+
1116
+ return $errors;
1117
+
1118
+ }
1119
+
1120
+
1121
+ function rurl($fpos = 0, $chunk = 0){
1122
+
1123
+ $get_query = "&";
1124
+
1125
+ foreach($_REQUEST as $key=>$value){
1126
+ if(($key != 'fpos')&&($key != 'chunk')&&($key != 'strrep_c')&&($key != 'strrep'))
1127
+ $get_query .= $key."=".$value."&";
1128
+ }
1129
+ $url = $_SERVER['PHP_SELF']."?fpos=".$fpos."&chunk=".$chunk.$get_query;
1130
+
1131
+ return $url;
1132
+ }
1133
+
1134
+ function read_file($file, $lines, $start_pos, &$chunk, &$text){
1135
+
1136
+ $cline = 0;
1137
+
1138
+ $fp = fopen($file, "r");
1139
+ fseek($fp, $start_pos);
1140
+ while((!feof($fp)) &&($cline <= $lines)){
1141
+ $btemp = fgets($fp, $chunk);
1142
+ $buffer .= $btemp;
1143
+ if(strstr($btemp, ";\n"))
1144
+ $cline++;
1145
+ $fpos = ftell($fp);
1146
+ }
1147
+
1148
+ $buffer = str_replace(";\r", ";\n", $buffer);
1149
+ $text = explode(";\n", $buffer);
1150
+ $fpos = $fpos - strlen($text[sizeof($text)-1]);
1151
+ if(sizeof($text) == 1)
1152
+ $chunk = DATA_CHUNK_LENGTH+$chunk;
1153
+ else
1154
+ $chunk = DATA_CHUNK_LENGTH;
1155
+
1156
+ if(feof($fp))
1157
+ $fpos = '-1';
1158
+ fclose ($fp);
1159
+
1160
+ return $fpos; // array_reverse is optional: you can also just return the $text array which consists of the file's lines.
1161
+
1162
+ }
1163
+
1164
+
1165
+
1166
+ /**
1167
+
1168
+ * @param string
1169
+
1170
+ */
1171
+
1172
+ function split_sql($sql) {
1173
+
1174
+ $ret = array();
1175
+ $sql = str_replace("\n) ", "\n) ;\n#\n#", $sql);
1176
+ $sql = str_replace("\n--\n","\n#\n",$sql);
1177
+ $sql = str_replace("\n-- ","\n# ",$sql);
1178
+ $sql = str_replace("\n/*","\n#/*",$sql);
1179
+ $sql = str_replace("#\n", "#;\n", $sql);
1180
+
1181
+ // Processing the SQL file content
1182
+
1183
+ $file_content = explode("\n",$sql);
1184
+ $query = "";
1185
+ // Parsing the SQL file content
1186
+ foreach($file_content as $key=>$sql_line) {
1187
+
1188
+ if(substr($sql_line, 0, 2) == "--")
1189
+ $sql_line = "#".substr($sql_line, 2, strlen($sql_line));
1190
+
1191
+ if(trim($sql_line) != "" ){
1192
+
1193
+ $query .= $sql_line;
1194
+
1195
+ // Checking whether the line is a valid statement
1196
+ if(preg_match("/(.*);/", $sql_line)){
1197
+
1198
+ $query = substr($query, 0, strlen($query)-1);
1199
+
1200
+ //Executing the parsed string, returns the error code in failure
1201
+ $ret[] = $query;
1202
+ $query = "";
1203
+ }
1204
+ }
1205
+ } //End of foreach
1206
+
1207
+ return($ret);
1208
+ }
1209
+
1210
+
1211
+
1212
+ function recurseFiles(&$d_arr, &$ds_arr, &$f_arr, &$s_arr, &$d, &$f, &$s, &$includedFolders, $path, $mosConfig_absolute_path) {
1213
+
1214
+ $currentfullpath = $mosConfig_absolute_path.$path;
1215
+
1216
+ # Open possibly available directory
1217
+
1218
+ if( is_dir( $currentfullpath ) ) {
1219
+
1220
+ if( $handle = opendir( $currentfullpath ) ) {
1221
+
1222
+ while( false !== ( $file = readdir( $handle ) ) ) {
1223
+
1224
+ # Make sure we don't push parental directories or dotfiles (unix) into the arrays
1225
+
1226
+ if( $file != "." && $file != ".." ) {
1227
+
1228
+ if( is_dir( $currentfullpath . "/" . $file ) ) {
1229
+
1230
+ # Create array for directories
1231
+
1232
+ $d_arr[++$d] = $currentfullpath . "/" . $file;
1233
+
1234
+ recurseFiles($d_arr, $ds_arr, $f_arr, $s_arr, $d, $f, $s, $includedFolders, $path . "/" . $file, $mosConfig_absolute_path);
1235
+
1236
+ } else {
1237
+
1238
+ if ( in_array($currentfullpath, $includedFolders) ) {
1239
+
1240
+ # Create array for files
1241
+
1242
+ $s_arr[$f] = filesize($currentfullpath.'/'.$file);
1243
+
1244
+ $f_arr[$f++] = str_replace($mosConfig_absolute_path.'/', '', $currentfullpath.'/').$file;
1245
+
1246
+ $s += filesize($currentfullpath.'/'.$file);
1247
+
1248
+ }
1249
+
1250
+ }
1251
+
1252
+ }
1253
+
1254
+ }
1255
+
1256
+ }
1257
+
1258
+ # Wrap things up if we're in a directory
1259
+
1260
+ if( is_dir( $handle ) )
1261
+
1262
+ closedir( $handle );
1263
+
1264
+ }
1265
+
1266
+ }
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+ function version_list($fname) {
1273
+
1274
+ global $_CONFIG;
1275
+
1276
+ $return = "<select name='$fname'><option value=''>Choose local clone archive</option>";
1277
+
1278
+ if(is_array($_CONFIG[versions])){
1279
+
1280
+ foreach($_CONFIG[versions] as $key=>$value){
1281
+
1282
+ $size = sprintf("%.2fM", filesize($value)/(1024*1024));
1283
+
1284
+ $return .= "<option selected value='$value'>$value($size)</option>";
1285
+
1286
+ }
1287
+
1288
+ }
1289
+
1290
+ $return .= "</select>";
1291
+
1292
+ return $return;
1293
+
1294
+ }
1295
+
1296
+
1297
+ function recursive_remove_directory($directory, $empty=FALSE){
1298
+
1299
+ // if the path has a slash at the end we remove it here
1300
+ if(substr($directory,-1) == '/'){
1301
+ $directory = substr($directory,0,-1);
1302
+ }
1303
+
1304
+ // if the path is not valid or is not a directory ...
1305
+ if(!file_exists($directory) || !is_dir($directory)){
1306
+ // ... we return false and exit the function
1307
+ return FALSE;
1308
+
1309
+ // ... if the path is not readable
1310
+ }elseif(!is_readable($directory)){
1311
+ // ... we return false and exit the function
1312
+ return FALSE;
1313
+ // ... else if the path is readable
1314
+ }else{
1315
+ // we open the directory
1316
+ $handle = opendir($directory);
1317
+ // and scan through the items inside
1318
+ while (FALSE !== ($item = readdir($handle))){
1319
+ // if the filepointer is not the current directory
1320
+ // or the parent directory
1321
+ if($item != '.' && $item != '..'){
1322
+ // we build the new path to delete
1323
+ $path = $directory.'/'.$item;
1324
+ // if the new path is a directory
1325
+ if(is_dir($path)){
1326
+ // we call this function with the new path
1327
+ recursive_remove_directory($path);
1328
+ // if the new path is a file
1329
+ }else{
1330
+ // we remove the file
1331
+ unlink($path);
1332
+ }
1333
+ }
1334
+ }
1335
+ // close the directory
1336
+ closedir($handle);
1337
+
1338
+ // if the option to empty is not set to true
1339
+ if($empty == FALSE){
1340
+ // try to delete the now empty directory
1341
+ if(!@rmdir($directory)){
1342
+ // return false if not possible
1343
+ return FALSE;
1344
+ }
1345
+ }
1346
+ // return success
1347
+ return TRUE;
1348
+ }
1349
+ }
1350
+
1351
+
1352
+ function setCache($time = 3600){
1353
+
1354
+ $seconds_to_cache = $time;
1355
+ $ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
1356
+ @header("Expires: $ts");
1357
+ @header("Pragma: cache");
1358
+ @header("Cache-Control: maxage=$seconds_to_cache");
1359
+
1360
+ }
1361
+
1362
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png ADDED
Binary file
screenshot-7.png ADDED
Binary file
screenshot-8.png ADDED
Binary file
toolbar.cloner.html.php CHANGED
@@ -4,7 +4,7 @@
4
  * Oficial website: http://www.joomlaplug.com/
5
  * -------------------------------------------
6
  * Creator: Liuta Romulus Ovidiu
7
- * License: All Rights Reserved
8
  * Email: admin@joomlaplug.com
9
  * Revision: 1.0
10
  * Date: July 2007
@@ -15,11 +15,33 @@
15
  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
16
 
17
  function button($action, $text='', $js=''){
18
-
19
- echo "<td align='center' class=\"test\" onclick=\"document.adminForm.task.value='$action';document.adminForm.submit();\" onmouseover=\"this.className='test2'\" onmouseout=\"this.className='test'\">
20
- <a href='#' onclick=\"document.adminForm.task.value='$action';document.adminForm.submit();\" ><b>$text</b></a>
21
- </td>";
22
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
  class TOOLBAR_cloner {
@@ -45,25 +67,25 @@ class TOOLBAR_cloner {
45
  button('config', 'Save');
46
  button('cancel', 'Cancel');
47
  }
48
-
49
  function _LANG_EDIT() {
50
  button('save_lang_apply','Apply');
51
  button('save_lang', 'Save');
52
  button('cancel_lang', 'Cancel');
53
  }
54
-
55
  function _LANG_ADD() {
56
  button('add_lang_new', 'New');
57
  button('cancel_lang', 'Cancel');
58
  }
59
-
60
  function _LANG() {
61
  button('add_lang','New');
62
  button('edit_lang', 'Edit');
63
  button('del_lang', 'Delete');
64
  button('cancel','Cancel');
65
  }
66
-
67
  function _RENAME() {
68
  button('rename_save', 'Save');
69
  button('rename_cancel', 'Cancel');
@@ -76,7 +98,7 @@ class TOOLBAR_cloner {
76
  button('cancel','Cancel');
77
  }
78
  function _DEFAULT() {
79
-
80
  button('logout','Logout');
81
  button('cancel','Cancel');
82
 
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
15
  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
16
 
17
  function button($action, $text='', $js=''){
18
+ if($action == "cancel")
19
+ $icon = "ui-icon-cancel";
20
+ elseif($action == "generate")
21
+ $icon = "ui-icon-arrowthick-1-e";
22
+ elseif($action == "config")
23
+ $icon = "ui-icon-circle-check";
24
+ else
25
+ $icon = "ui-icon-arrowreturnthick-1-e";
26
+ ?>
27
+ <script>
28
+ $(function() {
29
+ $( "#<?php echo $text?>" ).button({
30
+ icons:{
31
+ primary: '<?php echo $icon;?>'
32
+ }
33
+ })
34
+ .click(function(){
35
+ document.adminForm.task.value='<?php echo $action?>';document.adminForm.submit();
36
+ })
37
+ .css({ 'text-transform':'uppercase', width: '110px', 'padding-top': '10px', 'padding-bottom': '10px' });
38
+ });
39
+ </script>
40
+
41
+ <button id="<?php echo $text?>"><?php echo $text?></button>
42
+
43
+ <?php
44
+
45
  }
46
 
47
  class TOOLBAR_cloner {
67
  button('config', 'Save');
68
  button('cancel', 'Cancel');
69
  }
70
+
71
  function _LANG_EDIT() {
72
  button('save_lang_apply','Apply');
73
  button('save_lang', 'Save');
74
  button('cancel_lang', 'Cancel');
75
  }
76
+
77
  function _LANG_ADD() {
78
  button('add_lang_new', 'New');
79
  button('cancel_lang', 'Cancel');
80
  }
81
+
82
  function _LANG() {
83
  button('add_lang','New');
84
  button('edit_lang', 'Edit');
85
  button('del_lang', 'Delete');
86
  button('cancel','Cancel');
87
  }
88
+
89
  function _RENAME() {
90
  button('rename_save', 'Save');
91
  button('rename_cancel', 'Cancel');
98
  button('cancel','Cancel');
99
  }
100
  function _DEFAULT() {
101
+
102
  button('logout','Logout');
103
  button('cancel','Cancel');
104
 
toolbar.cloner.php CHANGED
@@ -4,7 +4,7 @@
4
  * Oficial website: http://www.joomlaplug.com/
5
  * -------------------------------------------
6
  * Creator: Liuta Romulus Ovidiu
7
- * License: All Rights Reserved
8
  * Email: admin@joomlaplug.com
9
  * Revision: 1.0
10
  * Date: July 2007
@@ -43,8 +43,8 @@ switch ( $task ) {
43
  case 'view':
44
  TOOLBAR_cloner::_VIEW();
45
  break;
46
-
47
-
48
  case 'add_lang':
49
  TOOLBAR_cloner::_LANG_ADD();
50
  break;
@@ -52,18 +52,19 @@ switch ( $task ) {
52
  case 'edit_lang':
53
  TOOLBAR_cloner::_LANG_EDIT();
54
  break;
55
-
56
  case 'del_lang':
57
  case 'lang':
58
  TOOLBAR_cloner::_LANG();
59
  break;
60
-
61
  case 'login':
62
  TOOLBAR_cloner::_LOGIN();
63
- break;
64
-
65
  default:
66
  TOOLBAR_cloner::_DEFAULT();
67
  break;
68
  }
 
69
  ?>
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
43
  case 'view':
44
  TOOLBAR_cloner::_VIEW();
45
  break;
46
+
47
+
48
  case 'add_lang':
49
  TOOLBAR_cloner::_LANG_ADD();
50
  break;
52
  case 'edit_lang':
53
  TOOLBAR_cloner::_LANG_EDIT();
54
  break;
55
+
56
  case 'del_lang':
57
  case 'lang':
58
  TOOLBAR_cloner::_LANG();
59
  break;
60
+
61
  case 'login':
62
  TOOLBAR_cloner::_LOGIN();
63
+ break;
64
+
65
  default:
66
  TOOLBAR_cloner::_DEFAULT();
67
  break;
68
  }
69
+
70
  ?>
xcloner.php CHANGED
@@ -3,7 +3,7 @@
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
3
  Plugin Name: XCloner
4
  Plugin URI: http://www.xcloner.com
5
  Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks. Don't forget to create the 'administrator/backups' directory in your Wordpress root and make it fully writeable. <a href="plugins.php?page=xcloner_show">Open XCloner</a> | <a href="http://www.xcloner.com/support/premium-support/">Get Premium Support</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40xcloner%2ecom&lc=US&item_name=XCloner%20Support&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest">Donate</a>
6
+ Version: 3.0
7
  Author: Liuta Ovidiu
8
  Author URI: http://www.xcloner.com
9
  Plugin URI: http://www.xcloner.com
xcloner_j1.5.xml CHANGED
@@ -1,113 +1,136 @@
1
- <install type="component" version="1.5.0">
2
- <name>XCloner</name>
3
- <version>2.1.0</version>
4
- <license>JoomlaPlug.com</license>
5
- <author>JoomlaPlug.com</author>
6
- <authoremail>admin@joomlaplug.com</authoremail>
7
- <authorurl>http://www.joomlaplug.com</authorurl>
8
- <creationDate>September 2007</creationDate>
9
- <copyright>JoomlaPlug.com</copyright>
10
  <description><![CDATA[
11
- <a href="http://www.joomlaplug.com"><img src="http://www.joomlaplug.com/logo.gif" border=0></a><br/>
12
  <h2>XCloner Backup&Restore Utility</h2>
13
  <pre>XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured!
14
-
15
  Features:
16
  -cron script to generate backup
17
  -multiple backup options
18
  -restore tool to move the website rapidly to other locations
19
  -multiple locations of where you could store the backup safelly
20
- -comnpatible with both Joomla 1.0.x and 1.5.x
21
 
22
- For reports and suggestions please contact us at admin@joomlaplug.com or visit us on <a href='http://www.joomlaplug.com'>http://www.joomlaplug.com</a>
23
  </pre>
24
- <br/><br/>
25
 
26
- JoomaPlug.com &copy; 2006-2007 | <a href="http://www.joomlaplug.com">www.joomlaplug.com</a>
27
  <br/><p/><br/>
28
  ]]>
29
  </description>
30
  <installfile>install.xcloner.php</installfile>
31
  <administration>
32
- <menu>.XCloner</menu>
33
  <files>
34
- <filename>admin.xcloner.php</filename>
35
- <filename>xcloner.php</filename>
36
- <filename>administrator/index.html</filename>
37
- <filename>administrator/backups/index.html</filename>
38
- <filename>browser/file.gif</filename>
39
- <filename>browser/filebrowser.css</filename>
40
- <filename>browser/files_inpage.php</filename>
41
- <filename>browser/files_xml.php</filename>
42
- <filename>browser/folder.gif</filename>
43
- <filename>browser/timer.gif</filename>
44
- <filename>browser/xmlhttp.js</filename>
45
- <filename>configs/index.html</filename>
46
- <filename>css/dtree.css</filename>
47
- <filename>css/main.css</filename>
48
- <filename>css/tabber.css</filename>
49
- <filename>images/about.png</filename>
50
- <filename>images/actions.gif</filename>
51
- <filename>images/actions.png</filename>
52
- <filename>images/backup.png</filename>
53
- <filename>images/css.png</filename>
54
- <filename>images/editions.png</filename>
55
- <filename>images/editionssm.png</filename>
56
- <filename>images/empty.gif</filename>
57
- <filename>images/filesave.png</filename>
58
- <filename>images/folder.png</filename>
59
- <filename>images/forum.png</filename>
60
- <filename>images/gen_settings.png</filename>
61
- <filename>images/help.png</filename>
62
- <filename>images/helpsm.png</filename>
63
- <filename>images/join.gif</filename>
64
- <filename>images/joinbottom.gif</filename>
65
- <filename>images/keep_icon.gif</filename>
66
- <filename>images/lang.png</filename>
67
- <filename>images/lhelp.png</filename>
68
- <filename>images/line.gif</filename>
69
- <filename>images/logo.gif</filename>
70
- <filename>images/logo.png</filename>
71
- <filename>images/xcloner.png</filename>
72
- <filename>images/minus.gif</filename>
73
- <filename>images/minusbottom.gif</filename>
74
- <filename>images/nolines_minus.gif</filename>
75
- <filename>images/nolines_plus.gif</filename>
76
- <filename>images/page.gif</filename>
77
- <filename>images/plus.gif</filename>
78
- <filename>images/plusbottom.gif</filename>
79
- <filename>images/publish_x.png</filename>
80
- <filename>images/settings.png</filename>
81
- <filename>images/support.png</filename>
82
- <filename>images/templatessm.png</filename>
83
- <filename>images/website.png</filename>
84
- <filename>images/wizard.png</filename>
85
- <filename>images/wizardsm.png</filename>
86
- <filename>images/wizardsm_restore.gif</filename>
87
- <filename>images/wizardsm_restore.png</filename>
88
- <filename>javascript/dtree.js</filename>
89
- <filename>javascript/tabber.js</filename>
90
- <filename>language/english.php</filename>
91
- <filename>language/index.html</filename>
92
- <filename>restore/TAR.php</filename>
93
- <filename>restore/XCloner.php</filename>
94
- <filename>.cloner.config.php</filename>
95
- <filename>admin.cloner.html.php</filename>
96
- <filename>admin.cloner.php</filename>
97
- <filename>cloner.config.php</filename>
98
- <filename>cloner.cron.php</filename>
99
- <filename>cloner.functions.php</filename>
100
- <filename>common.php</filename>
101
- <filename>index.php</filename>
102
- <filename>index2.php</filename>
103
- <filename>install.xcloner.php</filename>
104
- <filename>license.txt</filename>
105
- <filename>readme.txt</filename>
106
- <filename>recursive.php</filename>
107
- <filename>toolbar.cloner.html.php</filename>
108
- <filename>toolbar.cloner.php</filename>
109
-
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  </files>
112
  </administration>
113
  </install>
1
+ <install type="component" version="1.5.0" method="upgrade">
2
+ <name>XCloner-BackupandRestore</name>
3
+ <version>2.2.1</version>
4
+ <license>GNU/GPL</license>
5
+ <author>XCloner.com</author>
6
+ <authoremail>info@xcloner.com</authoremail>
7
+ <authorurl>http://www.xcloner.com</authorurl>
8
+ <creationDate>February 2011</creationDate>
9
+ <copyright>XCloner.com</copyright>
10
  <description><![CDATA[
 
11
  <h2>XCloner Backup&Restore Utility</h2>
12
  <pre>XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured!
13
+ <a href="http://www.xcloner.com"><img src="http://www.xcloner.com/xcloner_p.jpg" border=0 style="float:left; padding-right:10px;padding-bottom: 100px;padding-top:20px;"></a>
14
  Features:
15
  -cron script to generate backup
16
  -multiple backup options
17
  -restore tool to move the website rapidly to other locations
18
  -multiple locations of where you could store the backup safelly
19
+ -comnpatible with both Joomla 1.5.x and 1.6.x
20
 
21
+ For reports and suggestions please contact us at info@xcloner.com or visit us on <a href='http://www.xcloner.com'>http://www.xcloner.com</a>
22
  </pre>
23
+ <br/>
24
 
25
+ XCloner.com &copy; 2006-2011 | <a href="http://www.xcloner.com">www.xcloner.com</a>
26
  <br/><p/><br/>
27
  ]]>
28
  </description>
29
  <installfile>install.xcloner.php</installfile>
30
  <administration>
31
+ <menu img="components/com_xcloner-backupandrestore/images/xcloner.png" alias="XCloner">.XCloner-Backup and Restore</menu>
32
  <files>
33
+ <filename>admin.xcloner.php</filename>
34
+ <filename>admin.xcloner-backupandrestore.php</filename>
35
+ <filename>xcloner.php</filename>
36
+ <filename>classes/S3.php</filename>
37
+ <filename>classes/fileRecursion.php</filename>
38
+ <filename>classes/index.html</filename>
39
+ <filename>classes/main.class.php</filename>
40
+ <filename>classes/mysqlBackup.class.php</filename>
41
+ <filename>administrator/index.html</filename>
42
+ <filename>administrator/backups/index.html</filename>
43
+ <filename>browser/file.gif</filename>
44
+ <filename>browser/filebrowser.css</filename>
45
+ <filename>browser/files_inpage.php</filename>
46
+ <filename>browser/files_xml.php</filename>
47
+ <filename>browser/folder.gif</filename>
48
+ <filename>browser/timer.gif</filename>
49
+ <filename>browser/xmlhttp.js</filename>
50
+ <filename>configs/index.html</filename>
51
+ <filename>css/dtree.css</filename>
52
+ <filename>css/main.css</filename>
53
+ <filename>css/start/jquery-ui-1.8.9.custom.css</filename>
54
+ <filename>css/start/images/ui-bg_flat_55_999999_40x100.png</filename>
55
+ <filename>css/start/images/ui-bg_flat_75_aaaaaa_40x100.png</filename>
56
+ <filename>css/start/images/ui-bg_glass_75_79c9ec_1x400.png</filename>
57
+ <filename>css/start/images/ui-icons_056b93_256x240.png</filename>
58
+ <filename>css/start/images/ui-icons_d8e7f3_256x240.png</filename>
59
+ <filename>css/start/images/ui-icons_fcd113_256x240.png</filename>
60
+ <filename>css/start/images/ui-bg_glass_45_0078ae_1x400.png</filename>
61
+ <filename>css/start/images/ui-icons_f7a50d_256x240.png</filename>
62
+ <filename>css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png</filename>
63
+ <filename>css/start/images/ui-icons_0078ae_256x240.png</filename>
64
+ <filename>css/start/images/ui-bg_glass_55_f8da4e_1x400.png</filename>
65
+ <filename>css/start/images/ui-icons_e0fdff_256x240.png</filename>
66
+ <filename>css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png</filename>
67
+ <filename>css/start/images/ui-icons_f5e175_256x240.png</filename>
68
+ <filename>css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png</filename>
69
+ <filename>css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png</filename>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
+ <filename>images/about.png</filename>
72
+ <filename>images/actions.gif</filename>
73
+ <filename>images/actions.png</filename>
74
+ <filename>images/backup.png</filename>
75
+ <filename>images/css.png</filename>
76
+ <filename>images/editions.png</filename>
77
+ <filename>images/editionssm.png</filename>
78
+ <filename>images/empty.gif</filename>
79
+ <filename>images/filesave.png</filename>
80
+ <filename>images/folder.png</filename>
81
+ <filename>images/forum.png</filename>
82
+ <filename>images/gen_settings.png</filename>
83
+ <filename>images/help.png</filename>
84
+ <filename>images/helpsm.png</filename>
85
+ <filename>images/join.gif</filename>
86
+ <filename>images/joinbottom.gif</filename>
87
+ <filename>images/keep_icon.gif</filename>
88
+ <filename>images/lang.png</filename>
89
+ <filename>images/lhelp.png</filename>
90
+ <filename>images/line.gif</filename>
91
+ <filename>images/logo.gif</filename>
92
+ <filename>images/logo.png</filename>
93
+ <filename>images/xcloner.png</filename>
94
+ <filename>images/minus.gif</filename>
95
+ <filename>images/minusbottom.gif</filename>
96
+ <filename>images/nolines_minus.gif</filename>
97
+ <filename>images/nolines_plus.gif</filename>
98
+ <filename>images/page.gif</filename>
99
+ <filename>images/plus.gif</filename>
100
+ <filename>images/plusbottom.gif</filename>
101
+ <filename>images/publish_x.png</filename>
102
+ <filename>images/settings.png</filename>
103
+ <filename>images/support.png</filename>
104
+ <filename>images/templatessm.png</filename>
105
+ <filename>images/website.png</filename>
106
+ <filename>images/wizard.png</filename>
107
+ <filename>images/wizardsm.png</filename>
108
+ <filename>images/wizardsm_restore.gif</filename>
109
+ <filename>images/wizardsm_restore.png</filename>
110
+ <filename>javascript/dtree.js</filename>
111
+ <filename>javascript/main.js</filename>
112
+ <filename>javascript/jquery-1.4.4.min.js</filename>
113
+ <filename>javascript/jquery-ui-1.8.9.custom.min.js</filename>
114
+ <filename>language/english.php</filename>
115
+ <filename>language/spanish.php</filename>
116
+ <filename>language/dutch.php</filename>
117
+ <filename>language/deutsch.php</filename>
118
+ <filename>language/index.html</filename>
119
+ <filename>restore/TAR.php</filename>
120
+ <filename>restore/XCloner.php</filename>
121
+ <filename>admin.cloner.html.php</filename>
122
+ <filename>admin.cloner.php</filename>
123
+ <filename>cloner.config.php</filename>
124
+ <filename>cloner.cron.php</filename>
125
+ <filename>cloner.functions.php</filename>
126
+ <filename>common.php</filename>
127
+ <filename>index.php</filename>
128
+ <filename>index2.php</filename>
129
+ <filename>install.xcloner.php</filename>
130
+ <filename>license.txt</filename>
131
+ <filename>readme.txt</filename>
132
+ <filename>toolbar.cloner.html.php</filename>
133
+ <filename>toolbar.cloner.php</filename>
134
  </files>
135
  </administration>
136
  </install>