forked from tharindud/conan-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·58 lines (56 loc) · 1.23 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
<?php
// Copyright 2017, Tharindu Dissanayake <[email protected]>.
// Published under the MIT license.
require_once("conan.php");
require_once("layout.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php layout_header(2); ?>
<style>
.row-vcenter
{
min-height: 90%;
min-height: 90vh;
display: flex;
align-items: center;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-vcenter">
<div class="col-sm-3">
</div>
<div class="col-sm-6 text-center">
<?php layout_title(5); ?>
<br/>
<?php layout_search_form(5, false); ?>
<br/>
<br/>
<br/>
<br/>
<?php
$packages = conan_search("");
$channels = array();
foreach ($packages as $package)
{
$channel = explode("@", $package)[1];
array_push($channels, "<a href=\"search.php?query=*@".$channel."\">".$channel."</a>\n");
}
$channels = array_unique($channels);
print(join(layout_indent(5)." | \n".layout_indent(5), $channels));
?>
<br/>
<br/>
<br/>
<br/>
</div>
<div class="col-sm-3">
</div>
</div>
<?php layout_footer(3, false); ?>
</div>
</body>
</html>