/
index.php
74 lines (72 loc) · 3.18 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<?php include "tools.php" ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Couchbase Beer-Sample</title>
<?= getStylesheets() ?>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container-narrow">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="<?= getContext() ?>">Home</a></li>
<li><a href="<?= getContext() ?>/beers">Beers</a></li>
<li><a href="<?= getContext() ?>/breweries">Breweries</a></li>
</ul>
<h2 class="muted">Couchbase Beer-Sample</h2>
</div>
<hr>
<div class="row-fluid">
<div class="span12">
<?php
if (getPath() == "") {
?>
<div class="span6">
<div class="span12">
<h4>Browse all Beers</h4>
<a href="<?= getContext() ?>/beers" class="btn btn-warning">Show me all beers</a>
<hr />
</div>
<div class="span12">
<h4>Browse all Breweries</h4>
<a href="<?= getContext() ?>/breweries" class="btn btn-info">Take me to the breweries</a>
</div>
</div>
<div class="span6">
<div class="span12">
<h4>About this App</h4>
<p>Welcome to Couchbase!</p>
<p>This application helps you to get started on application
development with Couchbase. It shows how to create, update and
delete documents and how to work with JSON documents.</p>
<p>The official tutorial can be found
<a href="http://www.couchbase.com/docs/couchbase-sdk-java-1.1/tutorial.html">here</a>!</p>
</div>
</div>
<?php
} else {
$script = getRealScript() . ".php";
if (file_exists($script)) {
include $script;
} else {
echo "Internal error!!!";
}
}
?>
</div>
</div>
<hr>
<div class="footer">
<p>© Couchbase, Inc. 2012</p>
</div>
</div>
<script src="<?= getContext() ?>/js/jquery.min.js"></script>
<script src="<?= getContext() ?>/js/bootstrap.min.js"></script>
<script src="<?= getContext() ?>/js/beersample.js"></script>
</body>
</html>