Initialization of Logs/4Chan_Bans_Log-Reverse_Chrono-410.json
[Backup_bans.verniy.xyz.git] / pages.php
blob21df9d95f12f76173428cf056316a88c6f9fd6bc
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <base href="http://bans.verniy.xyz"/>
5 <!-- Latest compiled and minified CSS -->
6 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
8 <!-- jQuery library -->
9 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
11 <!-- Popper JS -->
12 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
14 <!-- Latest compiled JavaScript -->
15 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
17 <title>Simple 4Chan Ban Log - Paged View</title>
18 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
19 <meta name="viewport" content="width=device-width, initial-scale=0.8">
20 <!-- <script type="text/javascript" src = "/Scripts/TableFunctions.js?5"></script>
22 <!--<link href="/Scripts/IndexStyle.css" rel="stylesheet" type="text/css">-->
23 </head>
24 <body itemscope="" itemtype="http://schema.org/DataCatalog">
25 <div>
26 <nav class="navbar navbar-expand-sm bg-secondary">
27 <ul class="navbar-nav">
28 <li class="nav-item">
29 <a class="nav-link text-success" href="/">Home</a>
30 </li>
31 <li class="nav-item">
32 <a class="nav-link text-success" href="/main">Listing</a>
33 </li>
34 <!-- <li class="nav-item"> -->
35 <!-- <a class="nav-link text-success" href="http://verniy.xyz">Root</a> -->
36 <!-- </li> -->
37 </ul>
38 </nav>
39 <meta itemprop='url' content=\"/pages?file=" . $_GET['file'] . "\"/>
40 <?php
42 // error_reporting(0);
44 require_once("Class/database-connection.php");
46 $database = new DatabaseConnection();
47 $entry_count = $database->getCountOfAllSettings("Bans", $_GET["ref"], $_GET["com"], $_GET["rul"])[0][0];
48 $file_count = ceil($entry_count / 1000) - 1;
49 if($_GET["file"] > $file_count) $_GET["file"] = $file_count + 1;
50 else if($_GET["file"] <= 0) $_GET["file"] = 1;
53 echo "
54 <div class='jumbotron jumbotron-fluid p-5 m-0'>
55 <h2 itemprop='name' class='display-4'>The 4Chan Ban Logger - Pages</h2>
56 <meta itemprop='description' content='An easy to read log of 4chan's ban page for both the ban evader and the innocent alike. Contains information what 4chan moderators ban by archiving the 4chan ban page at 4chan.org/bans. Updated every 15 minutes to stay up to date. Common bans such as GR15, GR5 etc. from every board(/a/, /pol/, /e/, /h/)'>
57 <meta itemprop='keywords' content='4chan,bans,logger,shitposter,GR3,ban evasion,/a/,/c/,/h/,/d/,/e/'>
58 <meta itemprop='version' content='Jan-03' id='versionInfo'/>
60 <p>
61 <form action='/pages' method='GET'>
63 <input id=\"rulerefine\" type=\"text\" class='form-control' placeholder='eg. Global 5' name='file' value='".$_GET["file"]."' hidden/>
65 <div id='searchcard' class='container-fluid p-3 bg-light card' style=\"opacity:1.0\" onmouseenter='' onmouseleave=''>
66 <div class=\"input-group input-group-md\" style=\"display:auto\"><div class=\"input-group-prepend\"><span class=\"input-group-text bg-light\">Search for Board</span></div>
67 <input id=\"refinement\" type=\"text\" class='form-control' placeholder='' name='ref' value='".$_GET["ref"]."' /></div>
68 <!-- -->
69 <div class=\"input-group input-group-md\"><div class=\"input-group-prepend\"><span class=\"input-group-text bg-light\">Search Comment</span></div>
70 <input id=\"commentrefine\" type=\"text\" class='form-control' placeholder='' name='com' value='".$_GET["com"]."' \"/>
71 </div>
72 <div class=\"input-group input-group-md mb-3\"><div class=\"input-group-prepend\"><span class=\"input-group-text bg-light\">Find Specific Rule</span></div>
73 <input id=\"rulerefine\" type=\"text\" class='form-control' placeholder='eg. Global 5' name='rul' value='".$_GET["rul"]."' />
74 </div>
75 <div class=\"input-group input-group-md\" style=\"display:auto\">
76 <span id=\"count\" class ='input-group-text bg-light'>Total entries: $entry_count</span>
77 <input id=\"set\" onclick=\"\" type=\"submit\" value=\"Refine\" class=''/>
78 <span id=\"pages\" class='input-group-text bg-light font-italic'>Currently reading page <span class='font-weight-bold px-1 py-0'>". ($_GET["file"]) ."</span > of <span class='font-italic px-1 py-0'>" . ($file_count + 1) ."</span><br></span>
79 <input id=\"refresh\" onclick=\"\" type =\"submit\" value = \"Refresh\" class =''></div>
80 </div>
84 </p>
85 </div></form>";
88 $low = ($_GET["file"] - 1);
89 if($low < 1) $low = 1;
91 $high = ($_GET["file"]) + 1;
92 if($high > $file_count + 1) $high = $file_count + 2;
94 $file_no = $file_count+1 - $_GET["file"] + 1;
96 $file_contents = $database->getPostDetailsAllSettingsLimit("Bans", "BanEntryID", ($file_count - $_GET["file"] + 1 )*1000, $_GET["ref"], $_GET["com"], $_GET["rul"]);
98 echo " <div class='pb-3 px-1'>
99 <div class='page_table border-left d-flex flex-row flex-wrap '>";
100 $offset = 6;
101 $file_get = $_GET["file"] - $offset;
102 if($file_get < 0) $file_get = 0;
104 $font_size = "18px";
105 for($i = $file_get ; $i < $file_count + 1 ; $i++){
106 if($i == $_GET["file"] - 1) echo "<div style='min-width:50px;' class='text-center border rounded'><a style='font-size:$font_size;color:red' href='/pages?file=" . ($i + 1) ."'>". ($i + 1) . "</a></div>";
107 else if((ceil(($file_count + 1) / 2) + $file_get) < $file_count - 2 && $i == 10 + $file_get){
108 echo "<div style='min-width:50px;' class='text-center border rounded'><a style='font-size:$font_size;'
109 href='/pages?file=" . (ceil(($file_count + 1) / 2) + $file_get) ."&ref=".$_GET["ref"]."&com=".$_GET["com"]."&rul=".$_GET["rul"]."'>"
110 . (ceil(($file_count + 1) / 2) + $file_get) . "</a></div>";
112 else if($i == $file_count){
113 echo "<div style='min-width:50px;' class='text-center border rounded'><a style='font-size:$font_size;' href='/pages?file=" . ($i + 1) ."&ref=".$_GET["ref"]."&com=".$_GET["com"]."&rul=".$_GET["rul"] ."'>". ($i + 1) . "</a></div>";
115 else if($i == 11 + $file_get || $i == 9 + $file_get){
116 echo "<div style='min-width:50px;background-color:#e9ecef' class='text-center ' style='font-size:$font_size'>...</div>";
118 else if($i < 11 + $file_get){
119 echo "<div style='min-width:50px;' class='text-center border rounded'><a style='font-size:$font_size;' href='/pages?file=" . ($i + 1)."&ref=".$_GET["ref"]."&com=".$_GET["com"]."&rul=".$_GET["rul"]."'>". ($i + 1) . "</a></div>";
122 echo "</div></div></span></span></div>";
124 echo "<div class='p-2'><a href='/main'>View the Dynamic Listings</a><div><br/>";
126 echo "<div itemprop='dataset' itemscope='' itemtype='http://schema.org/DataSet'>
127 <a href = 'pages?file=" . $low . "' itemprop='url'>Previous</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href = 'pages?file=" . $high ."' itemprop='url'>Next</a><br/>
128 <meta itemprop='measurementTechnique' content='Page Logging'>
129 <meta itemprop='sameAs' content='" . "Logs/4Chan_Bans_Log-Reverse_Chrono-$file_no.json" . "'>
130 <meta itemprop='version' content='" . $file_no . "' id='versionInfo'/>
131 <table id='bansTable' class='table'>
132 <tbody>
135 echo "<meta itemprop='variableMeasured' content='Board'>";
136 echo "<meta itemprop='variableMeasured' content='Name'>";
137 echo "<meta itemprop='variableMeasured' content='Comment'>";
138 echo "<meta itemprop='variableMeasured' content='Action'>";
139 echo "<meta itemprop='variableMeasured' content='Duration'>";
140 echo "<meta itemprop='variableMeasured' content='Reason'>";
141 echo "<meta itemprop='variableMeasured' content='Time'>";
143 $useragent=$_SERVER['HTTP_USER_AGENT'];
144 $is_mobile;
145 if(strpos($useragent, "Mobile") !== false) $is_mobile = true;
147 if($is_mobile){
148 $font_size = 'font-size:12px';
149 foreach(array_reverse($file_contents) as $line){
150 echo "<tr>";
151 if($line["board"] == "s4s") echo "<td>[" . $line["board"] ."]</td>";
152 else echo "<td style = \"font-size:8px\">/" . $line["board"] ."/</td>";
153 //echo "<td style = \"max-width:150px;$font_size\">" . $line["name"] ."</td>";
154 //echo "<td style = \"max-width:100px;$font_size\">" . $line["trip"] ."</td>";
155 echo "<td style = \"max-width:500px;$font_size\">" . $line["com"] ."</td>";
156 echo "<td style='$font_size'>" . $line["action"] ."</td>";
157 //echo "<td style='$font_size'>" . $line["length"] ."</td>";
158 //echo "<td style='$font_size'>" . $line["reason"] ."</td>";
159 //echo "<td style='$font_size'>" . $line["now"] ."</td>";
160 echo "</tr>";
163 else{
164 foreach(array_reverse($file_contents) as $line){
165 echo "<tr>";
166 if($line["board"] == "s4s") echo "<td>[" . $line["board"] ."]</td>";
167 else echo "<td>/" . $line["board"] ."/</td>";
168 echo "<td style = \"max-width:150px\">" . $line["name"] ."</td>";
169 echo "<td style = \"max-width:100px\">" . $line["trip"] ."</td>";
170 echo "<td style = \"max-width:800px\">" . $line["com"] ."</td>";
171 echo "<td>" . $line["action"] ."</td>";
172 echo "<td>" . $line["length"] ."</td>";
173 echo "<td>" . $line["reason"] ."</td>";
174 echo "<td>" . $line["now"] ."</td>";
175 echo "</tr>";
180 echo "</tbody></table></div>";
183 <div itemprop="about" class='p-4'>
185 <span itemprop="accountablePerson">Verniy 2017-2018</span><br/>
186 <meta itemprop="author" content="ECHibiki">
187 Inquiries to be sent to the gmail account of ECVerniy
188 </p>
189 </div>
190 </body>
191 </html>