-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview-mobile.php
81 lines (71 loc) · 2.5 KB
/
view-mobile.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
75
76
77
78
79
80
81
<?php
/* This file is part of PHP Kochbuch
Copyright (C) 2013-2016 Thomas Tuerk <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
*/
require_once('functions.php');
function print_view($links, $actions, $content_fun, $user) {
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="jquery-1.10.2.min.js"></script>
<script src="jquery.mobile-1.4.2.min.js"></script>
<link rel="stylesheet" href="jquery.mobile-1.4.2.min.css">
<style>
.ui-li-static.ui-collapsible > .ui-collapsible-heading {
margin: 0;
}
.ui-li-static.ui-collapsible {
padding: 0;
}
.ui-li-static.ui-collapsible > .ui-collapsible-heading > .ui-btn {
border-top-width: 0;
}
.ui-li-static.ui-collapsible > .ui-collapsible-heading.ui-collapsible-heading-collapsed > .ui-btn,
.ui-li-static.ui-collapsible > .ui-collapsible-content {
border-bottom-width: 0;
}
</style>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Kochbuch</h1>
</div>
<div data-role="main" class="ui-content">
<ul data-role="listview" data-inset="true" data-shadow="true">
<?php foreach ($actions as $i => $value) { ?>
<li><a href="<?php echo $value["l"]?>"><?php echo $value["name"]?></a></li>
<?php } ?>
<li style="width:auto" data-role="collapsible" data-iconpos="right" data-inset="false">
<h2>Navigation</h2>
<ul data-role="listview" data-theme="b">
<?php foreach ($links as $i => $value) { ?>
<li><a href="<?php echo $value["l"]?>"><?php echo $value["name"]?></a></li>
<?php } ?>
</ul>
</li>
<li data-role="collapsible" data-iconpos="right" data-inset="false">
<h2>Kochbuch</h2>
<ul data-role="listview" data-theme="b">
<li><a href="mobile.php?update">Aktualisieren</a></li>
<li><a data-ajax=\"false\" target="_blank" href="index.php?<?php echo $_SERVER["QUERY_STRING"]; ?>">Desktopversion</a></li>
<li><a href="mobile.php?logout">Abmelden</a></li>
</ul>
</li>
</ul><br/>
<?php $content_fun () ?>
</div>
<div data-role="footer">
<h1><?php echo (htmlentities(getAuthorForUser($user))); ?></h1>
</div>
</div>
</body>
</html>
<?php } ?>