frmactualfolder.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. /* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2003-2010 Frederico Caldeira Knabben
  4. *
  5. * Source modified from part of fckeditor (http://www.fckeditor.net)
  6. * retrieved as GPL v2 or later
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. */
  21. define('NOTOKENRENEWAL', 1); // Disables token renewal
  22. // Load Dolibarr environment
  23. require '../../../../main.inc.php';
  24. top_httphead();
  25. ?>
  26. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  27. <!--
  28. * FCKeditor - The text editor for Internet - http://www.fckeditor.net
  29. * Copyright (C) 2003-2010 Frederico Caldeira Knabben
  30. *
  31. * == BEGIN LICENSE ==
  32. *
  33. * Licensed under the terms of any of the following licenses at your
  34. * choice:
  35. *
  36. * - GNU General Public License Version 2 or later (the "GPL")
  37. * https://www.gnu.org/licenses/gpl.html
  38. *
  39. * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  40. * https://www.gnu.org/licenses/lgpl.html
  41. *
  42. * - Mozilla Public License Version 1.1 or later (the "MPL")
  43. * http://www.mozilla.org/MPL/MPL-1.1.html
  44. *
  45. * == END LICENSE ==
  46. *
  47. * This page shows the actual folder path.
  48. -->
  49. <html>
  50. <head>
  51. <title>Folder path</title>
  52. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  53. <?php
  54. print '<!-- Includes CSS for Dolibarr theme -->'."\n";
  55. // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
  56. $themepath = dol_buildpath($conf->css, 1);
  57. $themesubdir = '';
  58. if (!empty($conf->modules_parts['theme'])) { // This slow down
  59. foreach ($conf->modules_parts['theme'] as $reldir) {
  60. if (file_exists(dol_buildpath($reldir.$conf->css, 0))) {
  61. $themepath = dol_buildpath($reldir.$conf->css, 1);
  62. $themesubdir = $reldir;
  63. break;
  64. }
  65. }
  66. }
  67. //print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
  68. print '<link rel="stylesheet" type="text/css" href="'.$themepath.'">'."\n";
  69. ?>
  70. <link href="browser.css" type="text/css" rel="stylesheet">
  71. <script type="text/javascript">
  72. // Automatically detect the correct document.domain (#1919).
  73. (function()
  74. {
  75. var d = document.domain ;
  76. while ( true )
  77. {
  78. // Test if we can access a parent property.
  79. try
  80. {
  81. var test = window.top.opener.document.domain ;
  82. break ;
  83. }
  84. catch( e )
  85. {}
  86. // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
  87. d = d.replace( /.*?(?:\.|$)/, '' );
  88. if ( d.length == 0 )
  89. break ; // It was not able to detect the domain.
  90. try
  91. {
  92. document.domain = d ;
  93. }
  94. catch (e)
  95. {
  96. break ;
  97. }
  98. }
  99. })();
  100. function SetCurrentFolder( resourceType, folderPath )
  101. {
  102. document.getElementById('tdName').innerHTML = folderPath ;
  103. }
  104. window.onload = function()
  105. {
  106. window.top.IsLoadedActualFolder = true ;
  107. }
  108. </script>
  109. </head>
  110. <body>
  111. <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0">
  112. <tr>
  113. <td>
  114. <button style="WIDTH: 100%" type="button">
  115. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  116. <tr>
  117. <td><?php echo img_picto_common('', 'treemenu/folder.gif', 'width="16" height="16"'); ?></td>
  118. <td>&nbsp;</td>
  119. <td id="tdName" width="100%" class="ActualFolder nowrap">/</td>
  120. <td>&nbsp;</td>
  121. <td>&nbsp;</td>
  122. <td>&nbsp;</td>
  123. </tr>
  124. </table>
  125. </button>
  126. </td>
  127. </tr>
  128. </table>
  129. </body>
  130. </html>