Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- This is my soup description -->
- Found on the net<br>
- Znalezione w sieci<br>
- <!-- Link displaying hidden content and then hiding itself after click -->
- <a id="showmyoptions"
- onclick=
- '
- document.getElementById("myoptions").style.display = "inline";
- document.getElementById("searchcontainer").style.display = "block";
- document.getElementById("showmyoptions").style.display = "none";
- '
- STYLE="cursor:url(http://ofp-faguss.com/img/cursor2.png), auto; font-size:0.75em;">show options</a>
- <!-- Start of the hidden content -->
- <span id="myoptions" style="display:none;">
- <hr>
- <!-- Form drop-down -->
- <select id="filterbydate" onchange='window.location="http://faguss.soup.io/?date=" + document.getElementById("filterbydate").value'>
- <option>Filter by date...</option>
- <?php
- // Get current date
- $CURRyear = date("Y");
- $CURRmonth = date("m");
- $CURRday = date("d");
- // Prepare vars for iteration
- $startYear = 2010;
- $year = $CURRyear;
- $month = 0;
- $day = 0;
- $quarter = "IV";
- // Determine current quarter of the year
- $CURRquarter = floor(--$CURRmonth / 3);
- switch ($CURRquarter) {
- case 0: $month=3; $day=31; $quarter="I"; break;
- case 1: $month=6; $day=30; $quarter="II"; break;
- case 2: $month=9; $day=30; $quarter="III"; break;
- case 3: $month=12; $day=31; $quarter="IV"; break;
- };
- // Loop filling drop-down with dates
- while ($year>=$startYear && $month>0) {
- // Exception for 2013 III - skip it
- if ($year==2013 && $month==9) {
- $month -= 3;
- $quarter = "II";
- continue;
- };
- // Exception for data lost in 2017 crash
- if ($year == 2016) {
- $year = 2015;
- $month = 9;
- $quarter = "III";
- $day = 30;
- continue;
- }
- echo "<option value=\"$year-$month-$day\">$year $quarter</option>\n";
- $month -= 3;
- switch($month) {
- case 9: $quarter="III"; $day=30; break;
- case 6: $quarter="II"; $day=30; break;
- case 3: $quarter="I"; $day=31; break;
- case 0: $quarter="IV"; $month=12; $day=31; $year--; break;
- };
- };
- ?>
- </select>
- <hr>
- <!-- Tag list -->
- All tags: <br>
- <?php
- // List of my tags
- $mytags = array(
- "Actor", "Animals", "Art", "Cards", "Cat", "Comics", "Drink", "Body", "Film", "Food", "Gadget", "Games", "Goth", "Graph",
- "Homosexuality", "Info", "IT", "Language", "Lego", "Men-Women", "Military", "Misc", "Music", "Politics", "PL",
- "Religion", "Science", "Skill", "Studies", "Sport", "TV", "ChuckNorris",
- "Drugs", "Procrastination", "Tabloids", "Kids", "CalvinHobbes", "Pooh", "Car", "Valentine", "Job",
- "Christmas", "DYI", "Police", "Country", "Comment", "Soup", "Pun", "Pareidolia", "Books", "Photography", "Reaction",
- "NewYear", "Quotes", "Creativity", "Motivational", "Depression", "PixelArt", "Winter", "Dog", "Cthulhu",
- "StreetArt", "Internet", "Coding", "FatThursday", "Women", "Dark", "City", "Animation",
- "Jap", "MetaArt", "Overwatch"
- // Lost in 2017 crash
- //"Halloween", "Clothing",
- //"Pop",
- //"Easter", "VideoGames", "FourChan", "Summer", "Astronaut", "Sandman",
- //,"PopTeamEpic", "Chordophones", "Lolnein", "JoJo", "Kancolle", "Carving"
- );
- sort($mytags);
- // Loop creating links
- foreach ($mytags as &$value) {
- // exceptions: different name for sorting and different for display
- if ($value == "FourChan")
- $value = "4chan";
- echo "<a href=http://faguss.soup.io/tag/$value>$value</a>\n";
- };
- ?>
- <hr>
- <!-- Add soup search field -->
- <div class="hidden" id="searchcontainer">
- <form action="" method="get" accept-charset="utf-8">
- <input class="search" type="text" name="search" value="" size="20" />
- <input class="btn" type="submit" value="Search" />
- </form>
- </div>
- <!-- End of hidden content -->
- </span>
Add Comment
Please, Sign In to add comment