settings.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. @nom: settings
  4. @auteur: Idleman (http://blog.idleman.fr)
  5. @description: Page de gestion de toutes les préférences/configurations administrateur
  6. */
  7. require_once('header.php');
  8. $tpl->assign('serviceUrl', rtrim($_SERVER['HTTP_HOST'].$cookiedir,'/'));
  9. $logger = new Logger('settings');
  10. $tpl->assign('logs',$logger->flushLogs());
  11. // gestion de la langue
  12. $tpl->assign('languageList',$i18n->translatedLanguages);
  13. $tpl->assign('currentLanguage',$configurationManager->get('language'));
  14. $wrongLogin = !empty($wrongLogin);
  15. $tpl->assign('wrongLogin',$wrongLogin);
  16. // gestion des thèmes
  17. $themesDir = 'templates/';
  18. $dirs = scandir($themesDir);
  19. foreach($dirs as $dir){
  20. if(is_dir($themesDir.$dir) && !in_array($dir,array(".","..")) ){
  21. $themeList[]=$dir;
  22. }
  23. }
  24. sort($themeList);
  25. $tpl->assign('themeList',$themeList);
  26. $tpl->assign('currentTheme',$configurationManager->get('theme'));
  27. //autres variables de configuration
  28. $tpl->assign('feeds',$feedManager->populate('name'));
  29. $tpl->assign('folders',$folderManager->populate('name'));
  30. $tpl->assign('synchronisationType',$configurationManager->get('synchronisationType'));
  31. $tpl->assign('synchronisationEnableCache',$configurationManager->get('synchronisationEnableCache'));
  32. $tpl->assign('synchronisationForceFeed',$configurationManager->get('synchronisationForceFeed'));
  33. $tpl->assign('articleDisplayAnonymous', $configurationManager->get('articleDisplayAnonymous'));
  34. $tpl->assign('articleDisplayLink', $configurationManager->get('articleDisplayLink'));
  35. $tpl->assign('articleDisplayDate', $configurationManager->get('articleDisplayDate'));
  36. $tpl->assign('articleDisplayAuthor', $configurationManager->get('articleDisplayAuthor'));
  37. $tpl->assign('articleDisplayHomeSort', $configurationManager->get('articleDisplayHomeSort'));
  38. $tpl->assign('articleDisplayFolderSort', $configurationManager->get('articleDisplayFolderSort'));
  39. $tpl->assign('articleDisplayMode', $configurationManager->get('articleDisplayMode'));
  40. $tpl->assign('optionFeedIsVerbose', $configurationManager->get('optionFeedIsVerbose'));
  41. $tpl->assign('otpEnabled', $configurationManager->get('otpEnabled'));
  42. //Suppression de l'état des plugins inexistants
  43. Plugin::pruneStates();
  44. //Récuperation des plugins
  45. $tpl->assign('plugins',Plugin::getAll());
  46. $view = "settings";
  47. require_once('footer.php'); ?>