index.php 6.45 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 12 13 14
<!doctype html>
<html>
<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>
noplanman's avatar
noplanman committed
31 32 33 34
<nav class="navbar navbar-inverse bg-primary fixed-top">
  <button class="navbar-toggler navbar-toggler-right hidden-md-up" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
35
  <a class="navbar-brand" href="#">Poduptime</a>
noplanman's avatar
noplanman committed
36
  <div class="collapse navbar-toggleable hidden-md-up" id="navbar">
noplanman's avatar
noplanman committed
37 38 39 40 41 42
    <ul class="navbar-nav">
      <li class="nav-item"><a class="nav-link<?php $simpleview && print ' active'; ?>" href="/">Simple View</a></li>
      <li class="nav-item"><a class="nav-link<?php $detailedview && print ' active'; ?>" href="/?detailedview">Detailed View</a></li>
      <li class="nav-item"><a class="nav-link<?php $mapview && print ' active'; ?>" href="/?mapview">Map View</a></li>
      <li class="nav-item"><a class="nav-link<?php $statsview && print ' active'; ?>" href="/?statsview">Network Stats</a></li>
    </ul>
43 44 45 46
  </div>
</nav>
<div class="container-fluid">
  <div class="row">
noplanman's avatar
noplanman committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
    <div class="sidebar col-md-3 col-lg-2 hidden-sm-down">
      <ul class="nav nav-pills flex-column">
        <li class="nav-item"><a class="nav-link<?php $simpleview && print ' active'; ?>" href="/">Simple View<?php $simpleview && print ' <span class="sr-only">(current)</span>'; ?></a></li>
        <li class="nav-item"><a class="nav-link<?php $detailedview && print ' active'; ?>" href="/?detailedview">Detailed View<?php $detailedview && print ' <span class="sr-only">(current)</span>'; ?></a></li>
        <li class="nav-item"><a class="nav-link<?php $mapview && print ' active'; ?>" href="/?mapview">Map View<?php $mapview && print ' <span class="sr-only">(current)</span>'; ?></a></li>
        <li class="nav-item"><a class="nav-link<?php $statsview && print ' active'; ?>" href="/?statsview">Network Stats<?php $statsview && print ' <span class="sr-only">(current)</span>'; ?></a></li>
      </ul>
      <hr>
      <ul class="nav nav-pills flex-column">
        <li class="nav-item"><a class="nav-link<?php $podmin && print ' active'; ?>" href="/?podmin">Add a pod<?php $podmin && print ' <span class="sr-only">(current)</span>'; ?></a></li>
        <li class="nav-item"><a class="nav-link<?php $podminedit && print ' active'; ?>" href="/?podminedit">Edit a pod<?php $podminedit && print ' <span class="sr-only">(current)</span>'; ?></a></li>
        <li class="nav-item"><a class="nav-link" href="https://diasporafoundation.org/">Host a pod</a></li>
      </ul>
      <hr>
      <ul class="nav nav-pills flex-column">
        <li class="nav-item"><a class="nav-link" href="https://github.com/diasporg/Poduptime">Github</a></li>
        <li class="nav-item"><a class="nav-link" href="https://dia.so/support">Contact</a></li>
        <li class="nav-item"><a class="nav-link" href="https://github.com/diasporg/Poduptime/wiki">Wiki</a></li>
        <li class="nav-item"><a class="nav-link" href="https://github.com/diasporg/Poduptime/wiki/API">API</a></li>
      </ul>
67
      <p><small>Data refreshed: <br><?php echo date('M d y H:i', filemtime($lastfile)); ?> EST</small></p><br>
68 69 70 71 72 73
      <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
      <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3662181805557062" data-ad-slot="2195215834" data-ad-format="auto"></ins>
      <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
      </script>
    </div>
noplanman's avatar
noplanman committed
74
    <div class="main col offset-md-3 offset-lg-2">
75
      <a href="go.php" class="btn btn-sm btn-success">Confused? Auto pick a pod for you.</a>
76 77 78
      <div class="row placeholders">
      </div>
      <div class="table-responsive">
David Morley's avatar
David Morley committed
79
        <?php
80
        if ($detailedview) {
noplanman's avatar
noplanman committed
81
          include_once __DIR__ . '/showfull.php';
David Morley's avatar
David Morley committed
82
        } elseif ($mapview) {
noplanman's avatar
noplanman committed
83
          include_once __DIR__ . '/showmap.php';
David Morley's avatar
David Morley committed
84 85
        } elseif ($statsview) {
          include_once __DIR__ . '/statsview.php';
David Morley's avatar
David Morley committed
86
        } elseif ($podmin) {
noplanman's avatar
noplanman committed
87
          include_once __DIR__ . '/podmin.php';
David Morley's avatar
David Morley committed
88
        } elseif ($podminedit) {
noplanman's avatar
noplanman committed
89
          include_once __DIR__ . '/podminedit.php';
dmorley's avatar
dmorley committed
90
        } elseif ($cleanup) {
noplanman's avatar
noplanman committed
91
          include_once __DIR__ . '/cleanup.php';
dmorley's avatar
dmorley committed
92
        } else {
noplanman's avatar
noplanman committed
93
          include_once __DIR__ . '/show.php';
David Morley's avatar
David Morley committed
94 95
        }
        ?>
96 97
      </div>
    </div>
98 99
  </div>
</div>
David Morley's avatar
David Morley committed
100 101 102 103
<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
104
<script src="bower_components/facebox/src/facebox.js"></script>
David Morley's avatar
David Morley committed
105 106
<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
107 108
<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
109 110
</body>
</html>