nextcloud/inc/templates/header.php

91 lines
3.0 KiB
PHP
Raw Normal View History

2010-03-14 02:43:47 +03:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2010-03-14 02:46:28 +03:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>ownCloud</title>
2010-03-24 18:35:24 +03:00
<base href="<?php echo($WEBROOT); ?>/"/>
<link rel="stylesheet" type="text/css" href="<?php
if(!OC_UTIL::hasSmallScreen()){
echo($WEBROOT.'/css/default.php');
}else{
echo($WEBROOT.'/css/small.php');
}
?>"/>
2010-03-24 18:35:24 +03:00
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_ajax.js'></script>
2010-05-02 16:39:58 +04:00
<?php
global $CONFIG_INSTALLED;
if($CONFIG_INSTALLED){//the javascripts somehow breaks the first run wizzard in konqueror?>
2010-03-29 23:49:11 +04:00
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_timer.js'></script>
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_notification.js'></script>
2010-03-24 18:35:24 +03:00
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_xmlloader.js'></script>
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_files.js'></script>
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_event.js'></script>
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_drag.js'></script>
2010-04-22 21:03:54 +04:00
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_api.js'></script>
<script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/filebrowser.js'></script>
2010-05-02 16:39:58 +04:00
<?php
}
?>
2010-03-28 15:07:13 +04:00
<?php
foreach(OC_UTIL::$scripts as $script){
2010-05-02 16:39:58 +04:00
echo("<script type='text/ecmascript' src='$WEBROOT/$script'></script>\n");
2010-03-28 15:07:13 +04:00
}
2010-09-08 03:43:40 +04:00
foreach(OC_UTIL::$styles as $style){
echo("<link rel='stylesheet' type='text/css' href='$WEBROOT/$style'/>\n");
2010-09-08 03:43:40 +04:00
}
2010-03-28 15:07:13 +04:00
?>
2010-03-24 18:35:24 +03:00
<script type='text/ecmascript'>
var WEBROOT='<?php echo($WEBROOT)?>';
var SMALLSCREEN='<?php echo((OC_UTIL::hasSmallScreen())?'true':'false')?>';
2010-03-24 18:35:24 +03:00
</script>
</head>
2010-03-24 18:35:24 +03:00
<body onload='OC_onload.run()'>
2010-04-12 16:31:22 +04:00
<div id='mainlayout'>
<div class='head'>
2010-03-10 15:03:40 +03:00
<?php
global $CONFIG_ERROR;
if(!OC_UTIL::hasSmallScreen()){
echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'"><span>ownCloud</span></a></h1>');
}
2010-03-10 15:03:40 +03:00
// check if already configured. otherwise start configuration wizard
2011-01-01 03:01:57 +03:00
$error=OC_CONFIG::writeadminlistener();
if($e=OC_CONFIG::configlistener()){
$error.=$e;
}
2011-01-01 03:01:57 +03:00
if($e=OC_CONFIG::createuserlistener()){
$error.=$e;
}
2011-01-01 03:01:57 +03:00
if($e=OC_CONFIG::creategrouplistener()){
$error.=$e;
2010-04-22 22:08:38 +04:00
}
$CONFIG_ERROR=$error;
2010-04-22 21:03:54 +04:00
global $CONFIG_INSTALLED;
if(!$CONFIG_INSTALLED) {
2010-03-24 18:35:24 +03:00
global $FIRSTRUN;
$FIRSTRUN=true;
2010-05-02 01:57:35 +04:00
echo('</div><div class="body">');
echo('<div class="center">');
echo('<p class="errortext">'.$error.'</p>');
echo('<p class="highlighttext">First Run Wizard</p>');
OC_CONFIG::showadminform();
echo('</div>');
OC_UTIL::showfooter();
exit();
2010-05-02 01:57:35 +04:00
}elseif(!isset($_SESSION['username']) or $_SESSION['username']=='') { // show the loginform if not loggedin
echo('<div class="center">');
2010-03-10 15:03:40 +03:00
OC_UTIL::showloginform();
echo('</div>');
2010-03-10 15:03:40 +03:00
OC_UTIL::showfooter();
exit();
}else{
echo('<div id="nav" class="center">');
2010-03-10 15:03:40 +03:00
OC_UTIL::shownavigation();
echo('</div>');
2010-04-12 16:31:22 +04:00
echo('</div><div class="body">');
2010-03-10 15:03:40 +03:00
}
?>