<?php
// flickrfeedseveral.php or flickrfeedseveral.html (due to Nitro HTML iPad app usage)
// Supervise fickrfeedbigborder.html to make "20" be variable (20 or lower)
// RJM Programming
// October, 2016
$htmlis="";
$twenty="20";
if (file_exists("flickrfeedbigborder.html")) { 
 $htmlis=@file_get_contents("flickrfeedbigborder.html");
 if (isset($_GET['twenty'])) {
   $twenty=$_GET['twenty'];
   $htmlis=str_replace("ii++;", "}\n ii++;" ,str_replace("if (((", " if (ii < (-1 + " . $_GET['twenty'] . ")) {\n if (((", str_replace(" 20", " " . $_GET['twenty'], $htmlis)));
 } else if (isset($_POST['twenty'])) {
   $twenty=$_POST['twenty'];
   $htmlis=str_replace("ii++;", "}\n ii++;" ,str_replace("if (((", " if (ii < (-1 + " . $_POST['twenty'] . ")) {\n if (((", str_replace(" 20", " " . $_POST['twenty'], $htmlis)));  
 } 
}
$selis="<select onchange=\\\" location.href=document.URL.split('?')[0] + '?twenty=' + this.value; \\\"><option value=" . $twenty . ">" . $twenty . "</option></select>";
for ($ij=20; $ij>=1; $ij--) {
     $selis=str_replace("</select>", "<option value=" . $ij . ">" . $ij . "</option></select>", $selis);
}
echo str_replace(" " . $twenty . "<", " " . $selis . "<", $htmlis);
?>