-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.php
More file actions
145 lines (141 loc) · 6.82 KB
/
index.php
File metadata and controls
145 lines (141 loc) · 6.82 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
include "helpers/common.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="KoolReport is an intuitive and flexible Open Source PHP Reporting Framework for faster and easier data report delivery.">
<meta name="author" content="KoolPHP Inc">
<meta name="keywords" content="php reporting framework">
<link rel="shortcut icon" href="<?php echo $root_url; ?>/assets/images/bar.png">
<title>KoolReport Examples & Demonstration</title>
<link href="<?php echo $root_url; ?>/assets/fontawesome/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo $root_url; ?>/assets/simpleline/simple-line-icons.min.css" rel="stylesheet">
<link href="<?php echo $root_url; ?>/assets/theme/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $root_url; ?>/assets/theme/css/main.css" rel="stylesheet">
<script type="text/javascript" src="<?php echo $root_url; ?>/assets/theme/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $root_url; ?>/assets/theme/js/bootstrap.bundle.min.js"></script>
</head>
<style>
.fa-plus-square-o,
.fa-minus-square-o {
cursor: pointer;
}
</style>
<script>
function toggleExpandCollapse(i) {
// console.log('toggleExpandCollapse: ', i);
i.classList.toggle('fa-plus-square-o');
i.classList.toggle('fa-minus-square-o');
}
function toggleExpandCollapseAll(i) {
let div = i.parentElement.parentElement;
let expandCollapseButtons = div.querySelectorAll('.expand-collapse');
expandCollapseButtons.forEach(function(btn) {
if (i.classList.contains('fa-plus-square-o')) {
if (btn.classList.contains('fa-plus-square-o')) {
btn.click();
}
} else if (i.classList.contains('fa-minus-square-o')) {
if (btn.classList.contains('fa-minus-square-o')) {
btn.click();
}
}
})
i.classList.toggle('fa-plus-square-o');
i.classList.toggle('fa-minus-square-o');
}
</script>
<body>
<?php include "helpers/nav.php"; ?>
<main class="container">
<h1 class="mt-5">Examples & Demonstration</h1>
<p class="lead">
This demo contains series of examples to guide the usage of KoolReport and its extended packages.
KoolReport is an intuitive and flexible Open-Source PHP Reporting Framework for faster and easier report delivery. It gives you full control of data process as well as data visualization. It is fast, simple and can be extended in many ways.
</p>
<p>
<i><b>Note:</b> If an example in this demonstration does not work, the reason is that it
requires either database or extended packages to be installed. You may find all sample databases
in <code>examples/databases</code> folder, please import them to your database system and change
connection at <code>config.php</code>.
If missing package is the issue, you can get them <a href="https://www.koolreport.com/packages">here</a>.
</i>
</p>
<?php
foreach($menu as $section_name=>$section)
{
?>
<h4 class="section-header"><?php echo $section_name; ?></h4>
<div class="row">
<?php
foreach($section as $group_name=>$group)
{
$hasChildArray = false;
foreach($group as $sname=>$surl) {
if(is_array($surl)) {
$hasChildArray = true;
break;
}
}
?>
<div class="col-md-3 example-group col-sm-6">
<h5>
<!-- <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault"> -->
<?php if ($hasChildArray) { ?>
<i class='fa fa-plus-square-o' data-toggle="collapse" onclick="toggleExpandCollapseAll(this);"></i>
<?php } ?>
<?php echo (strpos($group_name,"</i>")>0)?$group_name:"<i class='icon-layers'></i>$group_name"; ?></h5>
<ul class="list-unstyled">
<?php
// echo "group: "; print_r($group);
foreach($group as $sname=>$surl)
{
if(is_string($surl))
{
?>
<!-- <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault"> -->
<li><a href="<?php echo $root_url.$surl; ?>"><?php echo $sname; ?></a></li>
<?php
}
else
{
$idName = strip_tags($section_name) . '_' . strip_tags($group_name) . '_' . $sname;
$idName = str_replace(" ", "", $idName);
$idName = str_replace("/", "", $idName);
$idName = str_replace("&", "", $idName);
?>
<li>
<!-- <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault"> -->
<strong><i class='fa fa-plus-square-o expand-collapse' data-toggle="collapse" data-target="#<?php echo $idName; ?>" onclick="toggleExpandCollapse(this);"></i> <?php echo $sname; ?></strong>
<ul class="list-unstyled collapse" id="<?php echo $idName; ?>">
<?php
foreach($surl as $tname=>$turl)
{
?>
<!-- <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault"> -->
<li><a href="<?php echo $root_url.$turl; ?>"><?php echo $tname; ?></a></li>
<?php
}
?>
</ul>
</li>
<?php
}
}
?>
</ul>
</div>
<?php
}
?>
</div>
<?php
}
?>
</main>
<?php include "helpers/footer.php"; ?>
</body>
</html>