index.php 6.06 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>
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">
noplanman's avatar
noplanman committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    <div class="sidebar col-md-3">
      <div class="list-group">
        <a class="list-group-item<?php $simpleview && print ' active'; ?>" href="/">Simple View<?php $simpleview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
        <a class="list-group-item<?php $detailedview && print ' active'; ?>" href="/?detailedview">Detailed View<?php $detailedview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
        <a class="list-group-item<?php $mapview && print ' active'; ?>" href="/?mapview">Map View<?php $mapview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
        <a class="list-group-item<?php $statsview && print ' active'; ?>" href="/?statsview">Network Stats<?php $statsview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
      </div>
      <div class="list-group">
        <a class="list-group-item<?php $podmin && print ' active'; ?>" href="/?podmin">Add a pod<?php $podmin && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
        <a class="list-group-item<?php $podminedit && print ' active'; ?>" href="/?podminedit">Edit a pod<?php $podminedit && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a>
        <a class="list-group-item" href="https://diasporafoundation.org/">Host a pod</a>
      </div>
      <div class="list-group">
        <a class="list-group-item" href="https://github.com/diasporg/Poduptime">Github</a>
        <a class="list-group-item" href="https://dia.so/support">Contact</a>
        <a class="list-group-item" href="https://github.com/diasporg/Poduptime/wiki">Wiki</a>
        <a class="list-group-item" href="https://github.com/diasporg/Poduptime/wiki/API">API</a>
      </div>
63
      <p><small>Data refreshed: <br><?php echo date('M d y H:i', filemtime($lastfile)); ?> EST</small></p><br>
64 65 66 67 68 69
      <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
70
    <div class="main offset-md-3">
71
      <a href="go.php" class="btn btn-sm btn-success">Confused? Auto pick a pod for you.</a>
72 73 74
      <div class="row placeholders">
      </div>
      <div class="table-responsive">
David Morley's avatar
David Morley committed
75
        <?php
76
        if ($detailedview) {
noplanman's avatar
noplanman committed
77
          include_once __DIR__ . '/showfull.php';
David Morley's avatar
David Morley committed
78
        } elseif ($mapview) {
noplanman's avatar
noplanman committed
79
          include_once __DIR__ . '/showmap.php';
David Morley's avatar
David Morley committed
80 81
        } elseif ($statsview) {
          include_once __DIR__ . '/statsview.php';
David Morley's avatar
David Morley committed
82
        } elseif ($podmin) {
noplanman's avatar
noplanman committed
83
          include_once __DIR__ . '/podmin.php';
David Morley's avatar
David Morley committed
84
        } elseif ($podminedit) {
noplanman's avatar
noplanman committed
85
          include_once __DIR__ . '/podminedit.php';
dmorley's avatar
dmorley committed
86
        } elseif ($cleanup) {
noplanman's avatar
noplanman committed
87
          include_once __DIR__ . '/cleanup.php';
dmorley's avatar
dmorley committed
88
        } else {
noplanman's avatar
noplanman committed
89
          include_once __DIR__ . '/show.php';
David Morley's avatar
David Morley committed
90 91
        }
        ?>
92 93
      </div>
    </div>
94 95
  </div>
</div>
David Morley's avatar
David Morley committed
96 97 98 99
<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
100
<script src="bower_components/facebox/src/facebox.js"></script>
David Morley's avatar
David Morley committed
101 102
<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
103 104
<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
105 106
</body>
</html>