help.php 2.0 KB

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