home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / filesystem / overwrite.inc < prev    next >
Text File  |  2004-03-08  |  2KB  |  62 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12.  
  13. if ($task == 'overwrite')
  14. {
  15.     $task = 'paste';
  16. }
  17. echo '<input type="hidden" value="'.$task.'" name="task" />';
  18. echo '<input type="hidden" name="overwrite_destination_path" value="'.$overwrite_destination_path.'" />';
  19. echo '<input type="hidden" name="overwrite_source_path" value="'.$overwrite_source_path.'" />';
  20. echo '<input type="hidden" name="overwrite" value="false" />';
  21. echo '<input type="hidden" name="overwrite_all" value="false" />';
  22. ?>
  23. <table border="0" cellspacing="0" cellpadding="4">
  24. <tr>
  25.     <td><img src="<?php echo $GO_THEME->images['questionmark']; ?>" border="0" /></td><td><h2><?php echo $fbConfirmOverwrite; ?></h2></td>
  26. </tr>
  27. <tr>
  28.     <td colspan="2">
  29.     <?php echo $strOverwritePrefix."'".basename($overwrite_destination_path)."'".$strOverwriteSuffix; ?>
  30.     </td>
  31. </tr>
  32. <tr>
  33.     <td colspan="2" class="cmd">
  34.     <br />
  35.     <?php
  36.     $button = new button($cmdOk,'javascript:overwrite_file(true);');
  37.     echo '  ';
  38.     $button = new button($cmdCancel,'javascript:overwrite_file(false);');
  39.     echo '  ';
  40.     $button = new button($cmdYesToAll,'javascript:overwrite_all_files();');
  41.     ?>
  42.     </td>
  43. </tr>
  44. </table>
  45.  
  46. <script type="text/javascript" language="javascript">
  47. function overwrite_file(overwrite)
  48. {
  49.     if (overwrite)
  50.     {
  51.         document.forms[0].overwrite.value = "true";
  52.     }
  53.     document.forms[0].submit();
  54. }
  55.  
  56. function overwrite_all_files()
  57. {
  58.     document.forms[0].overwrite_all.value = "true";
  59.     document.forms[0].overwrite.value = "true";
  60.     document.forms[0].submit();
  61. }
  62. </script>