You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

help.php 2.0KB

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