1
0

functions.common.theme.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /* $Id: functions.common.theme.php 2835 2007-04-08 13:20:05Z b4rt $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. /**
  16. * Get Themes data in an array
  17. *
  18. * @return array
  19. */
  20. function GetThemes() {
  21. $arThemes = array();
  22. $dir = "themes/";
  23. $handle = opendir($dir);
  24. while($entry = readdir($handle)) {
  25. if (is_dir($dir.$entry) && ($entry != "." && $entry != ".." && $entry != ".svn" && $entry != "CVS" && $entry != "tf_standard_themes"))
  26. array_push($arThemes, $entry);
  27. }
  28. closedir($handle);
  29. sort($arThemes);
  30. return $arThemes;
  31. }
  32. /**
  33. * Get Themes data in an array
  34. *
  35. * @return array
  36. */
  37. function GetThemesStandard() {
  38. $arThemes = array();
  39. $dir = "themes/tf_standard_themes/";
  40. $handle = opendir($dir);
  41. while($entry = readdir($handle)) {
  42. if (is_dir($dir.$entry) && ($entry != "." && $entry != ".." && $entry != ".svn" && $entry != "CVS" && $entry != "css" && $entry != "tmpl" && $entry != "scripts" && $entry != "images"))
  43. array_push($arThemes, $entry);
  44. }
  45. closedir($handle);
  46. sort($arThemes);
  47. return $arThemes;
  48. }
  49. ?>