1
0

checksums.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/usr/bin/env php
  2. <?php
  3. /* $Id: checksums.php 2939 2007-04-23 16:44:45Z b4rt $ */
  4. /*******************************************************************************
  5. LICENSE
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License (GPL)
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  15. *******************************************************************************/
  16. // prevent invocation from web
  17. if (empty($argv[0])) die();
  18. if (isset($_REQUEST['argv'])) die();
  19. /******************************************************************************/
  20. // change to docroot if needed
  21. if (!is_file(realpath(getcwd().'/inc/functions/functions.tools.php')))
  22. chdir(realpath(dirname(__FILE__)."/../.."));
  23. // check for home
  24. if (!is_file('inc/functions/functions.tools.php'))
  25. exit("Error: this script can only be used in its default-path (DOCROOT/bin/tools/)\n");
  26. // tools-functions
  27. require_once('inc/functions/functions.tools.php');
  28. // action
  29. if (isset($argv[1]))
  30. printFileList($argv[1], 2, 1);
  31. else
  32. echo "missing param : dir\n";
  33. // exit
  34. exit();
  35. ?>