settings.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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('articleDisplayLink', $configurationManager->get('articleDisplayLink'));
  34. $tpl->assign('articleDisplayDate', $configurationManager->get('articleDisplayDate'));
  35. $tpl->assign('articleDisplayAuthor', $configurationManager->get('articleDisplayAuthor'));
  36. $tpl->assign('articleDisplayHomeSort', $configurationManager->get('articleDisplayHomeSort'));
  37. $tpl->assign('articleDisplayFolderSort', $configurationManager->get('articleDisplayFolderSort'));
  38. $tpl->assign('articleDisplayMode', $configurationManager->get('articleDisplayMode'));
  39. $tpl->assign('optionFeedIsVerbose', $configurationManager->get('optionFeedIsVerbose'));
  40. $tpl->assign('otpEnabled', $configurationManager->get('otpEnabled'));
  41. //Suppression de l'état des plugins inexistants
  42. Plugin::pruneStates();
  43. //Récuperation des plugins
  44. $tpl->assign('plugins',Plugin::getAll());
  45. $view = "settings";
  46. require_once('footer.php'); ?>