index.php 5.36 KB
Newer Older
1 2 3 4 5 6 7 8 9
<?php
$lastfile     = 'db/last.data';
$advancedview = isset($_GET['advancedview']);
$mapview      = isset($_GET['mapview']);
$cleanup      = isset($_GET['cleanup']);
$podmin       = isset($_GET['podmin']);
$podminedit   = isset($_GET['podminedit']);
$simpleview   = !($advancedview || $mapview || $cleanup || $podmin || $podminedit);
?>
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Diaspora Pod Uptime Status - Find your new social home on a hosted pod</title>
  <meta name="keywords" content="diaspora, federated pods, podupti.me, open source social, open source social network"/>
  <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"/>
  <meta property="og:url" content="https://podupti.me"/>
  <meta property="og:title" content="Diaspora Pod Finder"/>
  <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
28
</head>
David Morley's avatar
David Morley committed
29
<body>
30 31 32 33 34
<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">
35 36 37
      <a class="nav-item nav-link<?php $simpleview && print ' active'; ?>" href="/">Simple View</a>
      <a class="nav-item nav-link<?php $advancedview && print ' active'; ?>" href="/?advancedview">Advanced View</a>
      <a class="nav-item nav-link<?php $mapview && print ' active'; ?>" href="/?mapview">Map View</a>
David Morley's avatar
David Morley committed
38
    </nav>
39 40 41 42 43 44
  </div>
</nav>
<div class="container-fluid">
  <div class="row">
    <div class="col-sm-3 col-md-2 sidebar">
      <ul class="nav nav-sidebar">
45 46 47
        <li<?php $simpleview && print ' class="active"'; ?>><a href="/">Simple View<?php $simpleview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
        <li<?php $advancedview && print ' class="active"'; ?>><a href="/?advancedview">Advanced View<?php $advancedview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
        <li<?php $mapview && print ' class="active"'; ?>><a href="/?mapview">Map View<?php $mapview && print ' <span class="sr-only bg-dark">(current)</span>'; ?></a></li>
48 49
      </ul>
      <ul class="nav nav-sidebar">
50 51
        <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>
52 53 54 55 56 57 58 59 60 61 62 63 64 65
        <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>
      <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>
      <br>
66
      Data last refreshed: <br><?php echo date('F d Y H:i:s.', filemtime($lastfile)); ?> EST
67 68
    </div>
    <div class="main col-md-10 offset-md-2">
69
      <a href="go.php" class="btn btn-sm btn-success">Confused? Auto pick a pod for you.</a>
70 71 72
      <div class="row placeholders">
      </div>
      <div class="table-responsive">
David Morley's avatar
David Morley committed
73 74
        <?php
        if ($advancedview) {
75
          include_once __DIR__ . '/showfull.php';
David Morley's avatar
David Morley committed
76
        } elseif ($mapview) {
77
          include_once __DIR__ . '/showmap.php';
David Morley's avatar
David Morley committed
78
        } elseif ($podmin) {
79
          include_once __DIR__ . '/podmin.php';
David Morley's avatar
David Morley committed
80
        } elseif ($podminedit) {
81
          include_once __DIR__ . '/podminedit.php';
82
        } elseif ($cleanup) {
83
          include_once __DIR__ . '/cleanup.php';
dmorley's avatar
dmorley committed
84
        } else {
85
          include_once __DIR__ . '/show.php';
David Morley's avatar
David Morley committed
86 87
        }
        ?>
88 89
      </div>
    </div>
90 91
  </div>
</div>
David Morley's avatar
David Morley committed
92 93 94 95
<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
96
<script src="bower_components/facebox/src/facebox.js"></script>
David Morley's avatar
David Morley committed
97 98
<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
99 100
</body>
</html>