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.

header.php 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>ownCloud</title>
  6. <base href="<?php echo($WEBROOT); ?>/"/>
  7. <link rel="stylesheet" type="text/css" href="<?php
  8. if(!OC_UTIL::hasSmallScreen()){
  9. echo($WEBROOT.'/css/default.php');
  10. }else{
  11. echo($WEBROOT.'/css/small.php');
  12. }
  13. ?>"/>
  14. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_ajax.js'></script>
  15. <?php
  16. global $CONFIG_INSTALLED;
  17. if($CONFIG_INSTALLED){//the javascripts somehow breaks the first run wizzard in konqueror?>
  18. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_timer.js'></script>
  19. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_notification.js'></script>
  20. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_xmlloader.js'></script>
  21. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_files.js'></script>
  22. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_event.js'></script>
  23. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_drag.js'></script>
  24. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_api.js'></script>
  25. <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/filebrowser.js'></script>
  26. <?php
  27. }
  28. ?>
  29. <?php
  30. foreach(OC_UTIL::$scripts as $script){
  31. echo("<script type='text/ecmascript' src='$WEBROOT/$script'></script>\n");
  32. }
  33. ?>
  34. <script type='text/ecmascript'>
  35. var WEBROOT='<?php echo($WEBROOT)?>';
  36. var SMALLSCREEN='<?php echo((OC_UTIL::hasSmallScreen())?'true':'false')?>';
  37. </script>
  38. </head>
  39. <body onload='OC_onload.run()'>
  40. <div id='mainlayout'>
  41. <div class='head'>
  42. <?php
  43. global $CONFIG_ERROR;
  44. if(!OC_UTIL::hasSmallScreen()){
  45. echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'"><span>ownCloud</span></a></h1>');
  46. }
  47. // check if already configured. otherwise start configuration wizard
  48. $error=OC_CONFIG::writeadminlisener();
  49. if($e=OC_CONFIG::configlisener()){
  50. $error.=$e;
  51. }
  52. if($e=OC_CONFIG::createuserlisener()){
  53. $error.=$e;
  54. }
  55. if($e=OC_CONFIG::creategrouplisener()){
  56. $error.=$e;
  57. }
  58. $CONFIG_ERROR=$error;
  59. global $CONFIG_INSTALLED;
  60. if(!$CONFIG_INSTALLED) {
  61. global $FIRSTRUN;
  62. $FIRSTRUN=true;
  63. echo('</div><div class="body">');
  64. echo('<div class="center">');
  65. echo('<p class="errortext">'.$error.'</p>');
  66. echo('<p class="highlighttext">First Run Wizard</p>');
  67. OC_CONFIG::showadminform();
  68. echo('</div>');
  69. OC_UTIL::showfooter();
  70. exit();
  71. }elseif(!isset($_SESSION['username']) or $_SESSION['username']=='') { // show the loginform if not loggedin
  72. echo('<div class="center">');
  73. OC_UTIL::showloginform();
  74. echo('</div>');
  75. OC_UTIL::showfooter();
  76. exit();
  77. }else{
  78. echo('<div id="nav" class="center">');
  79. OC_UTIL::shownavigation();
  80. echo('</div>');
  81. echo('</div><div class="body">');
  82. }
  83. ?>