showfull.php 6.79 KB
Newer Older
dmorley's avatar
dmorley committed
1
<?php
2

3
/**
dmorley's avatar
dmorley committed
4
 * Show pod list table.
5 6 7 8
 */

declare(strict_types=1);

9 10 11 12 13
use Poduptime\PodStatus;
use RedBeanPHP\R;

require_once __DIR__ . '/boot.php';

dmorley's avatar
dmorley committed
14 15
// CloudFlare country code pull.
$country_code = $_SERVER['HTTP_CF_IPCOUNTRY'] ?? '';
dmorley's avatar
dmorley committed
16

17 18 19 20 21
try {
    $pods = R::getAll("
        SELECT count(domain)
        FROM pods
        WHERE status < ?
dmorley's avatar
dmorley committed
22
        AND score > 0
23 24 25 26 27
    ", [PodStatus::RECHECK]);
} catch (\RedBeanPHP\RedException $e) {
    die('Error in SQL query: ' . $e->getMessage());
}

dmorley's avatar
dmorley committed
28
?>
noplanman's avatar
noplanman committed
29

dmorley's avatar
dmorley committed
30 31 32 33 34 35 36 37 38
<style>
    @media (max-width: 800px) {
        .tablesorter-header {
            background-image: none !important;
            font: 10px/20px Arial, Sans-serif !important;
            font-weight: 500 !important;
        }
    }
</style>
dmorley's avatar
dmorley committed
39
<div class="float-right float-md-left float-sm-right">
dmorley's avatar
Ux  
dmorley committed
40 41
    <a href="go.php" class="m-1 btn btn-sm bg-blue text-white">Auto pick a pod</a>
    <a href="#" class="m-1 btn btn-sm bg-blue text-white"  data-featherlight-variant="table-responsive" data-featherlight="wizard.php?page=1">Use pod wizard</a>
dmorley's avatar
dmorley committed
42 43
</div>
<div class="float-right">
dmorley's avatar
Ux  
dmorley committed
44
    <button type="button" class="columnssimple hidden m-1 btn btn-sm bg-blue text-white">Simple View</button>
dmorley's avatar
dmorley committed
45 46
    <div class="columnSelectorWrapper m-1">
        <input id="colSelect1" type="checkbox" class="hidden">
dmorley's avatar
Ux  
dmorley committed
47
        <label class="columnSelectorButton m-1 btn btn-sm bg-blue text-white" for="colSelect1">Select Columns</label>
dmorley's avatar
dmorley committed
48 49 50
        <div id="columnSelector" class="dropdown columnSelector">
        </div>
    </div>
dmorley's avatar
Ux  
dmorley committed
51 52
    <button type="button" class="resetfilters m-1 btn btn-sm bg-blue hidden text-white">Reset Filters</button>
    <button type="button" class="columnsadvanced m-1 btn btn-sm bg-blue text-white">Advanced View</button>
dmorley's avatar
dmorley committed
53 54 55 56 57 58
</div>

    <div class="pager hidden float-right float-md-left">
        <span class="first pagination" title="First page">&laquo;</span>
        <span class="prev pagination" title="Previous page">&lt;</span>

dmorley's avatar
dmorley committed
59
            <span class="pagedisplay text-center pagerhidden"></span>
dmorley's avatar
dmorley committed
60 61 62

        <span class="next pagination" title="Next page">&gt;</span>
        <span class="last pagination" title="Last page">&raquo;</span>
63 64 65 66 67 68
        <div class="d-inline-block">
            <select class="pagesize hidden form-control form-control-sm">
                <option value="15">15</option>
                <option value="60">60</option>
                <option value="120">120</option>
                <option value="240">240</option>
dmorley's avatar
dmorley committed
69
                <option value="500">500</option>
70 71 72
                <option value="all">All</option>
            </select>
        </div>
dmorley's avatar
dmorley committed
73 74 75 76
    </div>

<div class="table-responsive">
    <div class="loadingtable">
dmorley's avatar
dmorley committed
77
        <div class="loadingmessage">Loading <span id="podcountdown"><?php echo $pods[0]['count']; ?></span> lines of data to the table</div>
dmorley's avatar
dmorley committed
78 79
        <div class="signal"></div>
    </div>
dmorley's avatar
dmorley committed
80
    <table class="table table-bordered table-sm tablesorter table-hover tfont">
dmorley's avatar
Ux  
dmorley committed
81
        <thead class="thead-blue">
dmorley's avatar
dmorley committed
82
        <tr>
dmorley's avatar
dmorley committed
83 84 85
            <th data-priority="1" class="columnSelector-disable"><div data-toggle="tooltip" title="A pod is a site for you to set up your account.">Pod</div></th>
            <th class="columnSelector-false"><div>Name</div></th>
            <th class="columnSelector-false"><div data-toggle="tooltip" title="Version of software this pod runs">Version</div></th>
86
            <th class="columnSelector-false filter-select" data-priority="3"><div data-toggle="tooltip" title="Type of software this pod runs">Software</div></th>
dmorley's avatar
Ux  
dmorley committed
87
            <th class="columnSelector-false filter-match" data-priority="4"><div data-toggle="tooltip" title="Protocols this pod supports.">Protocols</div></th>
dmorley's avatar
dmorley committed
88
            <th data-priority="1"><div data-toggle="tooltip" title="Percent of the time the pod is online.">Uptime</div></th>
noplanman's avatar
noplanman committed
89
            <th class="columnSelector-false filter-select"><div data-toggle="tooltip" title="Does this pod offer ipv6 connection.">IPv6</div></th>
dmorley's avatar
dmorley committed
90
            <th class="columnSelector-false"><div data-toggle="tooltip" title="Average connection latency time in ms from Los Angeles.">Latency</div></th>
91
            <th class="filter-select" data-priority="2"><div data-toggle="tooltip" title="Does this pod allow new users.">Signups</div></th>
dmorley's avatar
dmorley committed
92 93 94 95 96 97
            <th data-priority="2" data-selector-name="Total Users"><div data-toggle="tooltip" title="Number of total users on this pod.">Users</div></th>
            <th class="columnSelector-false" data-selector-name="Users last 6 months"><div data-toggle="tooltip" title="Number of users active last 6 months on this pod.">6m</div></th>
            <th class="columnSelector-false" data-selector-name="Users last 1 month"><div data-toggle="tooltip" title="Number of users active last 1 month on this pod.">1m</div></th>
            <th class="columnSelector-false"><div data-toggle="tooltip" title="Number of total posts on this pod.">Posts</div></th>
            <th class="columnSelector-false"><div data-toggle="tooltip" title="Number of total comments on this pod." data-placeholder="Try: 10 - 50">Comments</div></th>
            <th class="columnSelector-false"><div data-toggle="tooltip" title="How many months have we been watching this pod." data-placeholder="Try: ! 0">Months</div></th>
dmorley's avatar
Ux  
dmorley committed
98
            <th class="columnSelector-false" data-priority="6"><div data-toggle="tooltip" title="User rating for this pod.">Rating</div></th>
dmorley's avatar
dmorley committed
99
            <th class="columnSelector-false"><div data-toggle="tooltip" title="System Score on a 100 point scale.">Score</div></th>
100 101 102
            <th class="columnSelector-false filter-select"><div data-toggle="tooltip" title="System Status.">Status</div></th>
            <th class="columnSelector-false filter-select"><div data-toggle="tooltip" title="Does this domain use DNSSEC.">DNSSEC</div></th>
            <th class="filter-select" data-priority="1"><div data-toggle="tooltip" title="Pod location, based on IP Geolocation." data-placeholder="Try: <?php echo $country_code ?: 'US'; ?>">Country</div></th>
dmorley's avatar
dmorley committed
103 104
            <th class="columnSelector-false" data-priority="5"><div data-toggle="tooltip" title="Pod City, based on IP Geolocation.">City</div></th>
            <th class="columnSelector-false" data-priority="5"><div data-toggle="tooltip" title="Pod State, based on IP Geolocation.">State</div></th>
105
            <th class="columnSelector-false filter-select"><div data-toggle="tooltip" title="Pod language detected from their main page text.">Language</div></th>
dmorley's avatar
dmorley committed
106
            <th data-placeholder="Try: tumblr AND twitter" class="filter-match" data-priority="3" data-selector-name="All Services"><div data-toggle="tooltip" title="External Social Networks this pod can post to." class="filter-false">Services</div></th>
dmorley's avatar
dmorley committed
107
            <th data-priority="6" data-selector-name="Podmin Info"><div data-toggle="tooltip" title="Click for more information about this pod from the pod host (podmin).">Info</div></th>
dmorley's avatar
dmorley committed
108 109 110 111 112
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
dmorley's avatar
dmorley committed
113
</div>