diff options
| -rw-r--r-- | index.php | 24 | 
1 files changed, 23 insertions, 1 deletions
@@ -95,7 +95,6 @@ if (isset($_GET['C'])) {  }  $listing = array(); -$listing[0] = array();  ?>  <?php @@ -139,6 +138,29 @@ while ($this_array = each($new_array)){    $value = $this_array['value'];    $key = $this_array['key']; +  // Drop if outside (optional) date range +  if (isset($_GET['from'])) { +    $from = $_GET['from']; +    // If $from has a -, assume not Unix time +    if (strpos($from, "-") !== false) { +      $from = strtotime($from); +    } + +    if (isset($_GET['to'])) { +      $to = $_GET['to']; +      // If $to has a -, assume not Unix time +      if (strpos($to, "-") !== false) { +        $to = strtotime($to); +      } +    } else { +      $to = time(); +    } + +    if ($key < $from || $key > $to) { +      continue; +    } +  } +    $fileparts = explode('.', strtolower($value));    $icon = "unknown";  | 
