index.php 5.63 KB
Newer Older
noplanman's avatar
noplanman committed
1 2
<?php
$lastfile     = 'db/last.data';
3
$detailedview = isset($_GET['detailedview']);
noplanman's avatar
noplanman committed
4 5
$mapview      = isset($_GET['mapview']);
$cleanup      = isset($_GET['cleanup']);
David Morley's avatar
David Morley committed
6
$statsview    = isset($_GET['statsview']);
noplanman's avatar
noplanman committed
7 8
$podmin       = isset($_GET['podmin']);
$podminedit   = isset($_GET['podminedit']);
9
$simpleview   = !($detailedview || $mapview || $cleanup || $podmin || $podminedit || $statsview);
noplanman's avatar
noplanman committed
10
?>
11
<!doctype html>
David Morley's avatar
David Morley committed
12
<html lang="en">
13 14
<head>
  <meta charset="utf-8">
15 16
  <title>Open Source Social Network Pod Uptime Status</title>
  <meta name="keywords" content="diaspora, federated pods, <?php echo $_SERVER['HTTP_HOST'] ?>, friendica, hubzilla, open source social, open source social network"/>
17 18 19 20 21 22
  <meta name="description" content="Diaspora Pod Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!"/>
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/newstyle.css"/>
  <link rel="stylesheet" href="bower_components/facebox/src/facebox.css"/>
  <link rel="stylesheet" href="css/dashboard.css"/>
  <link rel="stylesheet" href="bower_components/jquery-ui/themes/base/jquery-ui.min.css"/>
dmorley's avatar
dmorley committed
23
  <meta property="og:url" content="https://<?php echo $_SERVER['HTTP_HOST'] ?>"/>
24
  <meta property="og:title" content="Social Network Pod Finder"/>
25 26 27 28
  <meta property="og:type" content="website"/>
  <meta property="og:description" content="Diaspora Pod Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
dmorley's avatar
dmorley committed
29
</head>
David Morley's avatar
index  
David Morley committed
30
<body>
31 32 33 34 35
<nav class="navbar navbar-dark navbar-fixed-top bg-primary">
  <button type="button" class="navbar-toggler hidden-sm-up" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" aria-label="Toggle navigation"></button>
  <a class="navbar-brand" href="#">Poduptime</a>
  <div id="navbar" class="text-muted collapse">
    <nav class="nav navbar-nav float-xs-left">
noplanman's avatar
noplanman committed
36
      <a class="nav-item nav-link<?php $simpleview && print ' active'; ?>" href="/">Simple View</a>
37
      <a class="nav-item nav-link<?php $detailedview && print ' active'; ?>" href="/?detailedview">Detailed View</a>
noplanman's avatar
noplanman committed
38
      <a class="nav-item nav-link<?php $mapview && print ' active'; ?>" href="/?mapview">Map View</a>
David Morley's avatar
David Morley committed
39
      <a class="nav-item nav-link<?php $statsview && print ' active'; ?>" href="/?statsview">Network Stats</a>
David Morley's avatar
David Morley committed
40
    </nav>
41 42 43 44
  </div>
</nav>
<div class="container-fluid">
  <div class="row">
45
    <div class="sidebar">
46
      <ul class="nav nav-sidebar">
noplanman's avatar
noplanman committed
47
        <li<?php $simpleview && print ' class="active"'; ?>><a href="/">Simple View<?php $simpleview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
48
        <li<?php $detailedview && print ' class="active"'; ?>><a href="/?detailedview">Detailed View<?php $detailedview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
noplanman's avatar
noplanman committed
49
        <li<?php $mapview && print ' class="active"'; ?>><a href="/?mapview">Map View<?php $mapview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
David Morley's avatar
David Morley committed
50
        <li<?php $statsview && print ' class="active"'; ?>><a href="/?statsview">Network Stats<?php $statsview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
51 52
      </ul>
      <ul class="nav nav-sidebar">
noplanman's avatar
noplanman committed
53 54
        <li<?php $podmin && print ' class="active"'; ?>><a href="/?podmin">Add a pod<?php $podmin && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
        <li<?php $podminedit && print ' class="active"'; ?>><a href="/?podminedit">Edit a pod<?php $podminedit && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
55 56 57 58 59 60 61 62
        <li><a href="https://diasporafoundation.org/">Host a pod</a></li>
      </ul>
      <ul class="nav nav-sidebar">
        <li><a href="https://github.com/diasporg/Poduptime">Github</a></li>
        <li><a href="https://dia.so/support">Contact</a></li>
        <li><a href="https://github.com/diasporg/Poduptime/wiki">Wiki</a></li>
        <li><a href="https://github.com/diasporg/Poduptime/wiki/API">API</a></li>
      </ul>
David Morley's avatar
David Morley committed
63
      <p><small>Data refreshed: <br><?php echo date('M d y H:i', filemtime($lastfile)); ?> EST</small></p>
64
    </div>
65
    <div class="main offset-md-1">
66
      <a href="go.php" class="btn btn-sm btn-success">Confused? Auto pick a pod for you.</a>
67 68 69
      <div class="row placeholders">
      </div>
      <div class="table-responsive">
David Morley's avatar
David Morley committed
70
        <?php
71
        if ($detailedview) {
noplanman's avatar
noplanman committed
72
          include_once __DIR__ . '/showfull.php';
David Morley's avatar
David Morley committed
73
        } elseif ($mapview) {
noplanman's avatar
noplanman committed
74
          include_once __DIR__ . '/showmap.php';
David Morley's avatar
David Morley committed
75 76
        } elseif ($statsview) {
          include_once __DIR__ . '/statsview.php';
David Morley's avatar
David Morley committed
77
        } elseif ($podmin) {
noplanman's avatar
noplanman committed
78
          include_once __DIR__ . '/podmin.php';
David Morley's avatar
David Morley committed
79
        } elseif ($podminedit) {
noplanman's avatar
noplanman committed
80
          include_once __DIR__ . '/podminedit.php';
dmorley's avatar
dmorley committed
81
        } elseif ($cleanup) {
noplanman's avatar
noplanman committed
82
          include_once __DIR__ . '/cleanup.php';
dmorley's avatar
dmorley committed
83
        } else {
noplanman's avatar
noplanman committed
84
          include_once __DIR__ . '/show.php';
David Morley's avatar
David Morley committed
85 86
        }
        ?>
87 88
      </div>
    </div>
89 90
  </div>
</div>
David Morley's avatar
David Morley committed
91 92 93 94
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/tether/dist/js/tether.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="js/podup.js"></script>
David Morley's avatar
David Morley committed
95
<script src="bower_components/facebox/src/facebox.js"></script>
David Morley's avatar
David Morley committed
96 97
<script src="bower_components/tablesorter/dist/js/jquery.tablesorter.min.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
David Morley's avatar
David Morley committed
98 99
<script src="bower_components/chart.js/dist/Chart.min.js"></script>
<?php $statsview && include_once __DIR__ . '/statsviewjs.php'; ?>
David Morley's avatar
index  
David Morley committed
100 101
</body>
</html>