help.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * @author Bart Visscher <bartv@thisnet.nl>
  4. * @author Christopher Schäpers <kondou@ts.unde.re>
  5. * @author Frank Karlitschek <frank@owncloud.org>
  6. * @author Jakob Sack <mail@jakobsack.de>
  7. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  8. * @author Lukas Reschke <lukas@owncloud.com>
  9. * @author Morris Jobke <hey@morrisjobke.de>
  10. * @author Robin Appelman <icewind@owncloud.com>
  11. *
  12. * @copyright Copyright (c) 2015, ownCloud, Inc.
  13. * @license AGPL-3.0
  14. *
  15. * This code is free software: you can redistribute it and/or modify
  16. * it under the terms of the GNU Affero General Public License, version 3,
  17. * as published by the Free Software Foundation.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU Affero General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Affero General Public License, version 3,
  25. * along with this program. If not, see <http://www.gnu.org/licenses/>
  26. *
  27. */
  28. OC_Util::checkLoggedIn();
  29. // Load the files we need
  30. OC_Util::addStyle( "settings", "settings" );
  31. OC_App::setActiveNavigationEntry( "help" );
  32. if(isset($_GET['mode']) and $_GET['mode'] === 'admin') {
  33. $url=OC_Helper::linkToAbsolute( 'core', 'doc/admin/index.html' );
  34. $style1='';
  35. $style2=' active';
  36. }else{
  37. $url=OC_Helper::linkToAbsolute( 'core', 'doc/user/index.html' );
  38. $style1=' active';
  39. $style2='';
  40. }
  41. $url1=OC_Helper::linkToRoute( "settings_help" ).'?mode=user';
  42. $url2=OC_Helper::linkToRoute( "settings_help" ).'?mode=admin';
  43. $tmpl = new OC_Template( "settings", "help", "user" );
  44. $tmpl->assign( "admin", OC_User::isAdminUser(OC_User::getUser()));
  45. $tmpl->assign( "url", $url );
  46. $tmpl->assign( "url1", $url1 );
  47. $tmpl->assign( "url2", $url2 );
  48. $tmpl->assign( "style1", $style1 );
  49. $tmpl->assign( "style2", $style2 );
  50. $tmpl->printPage();