All pastes #144033 Raw Edit

Something

public php v1 · immutable
#144033 ·published 2006-08-22 09:41 UTC
rendered paste body
<?phpforeach ($_GET as $k => $v) $$k = $v;foreach ($_POST as $k => $v) $$k = $v;?><td><font face="Courier New" size=2><?php$path="logs/";if (!isset($filter)) {?><center><FORM ACTION="<?php $PHP_SELF ?>" METHOD="POST">Timestamp: <INPUT TYPE="CHECKBOX" NAME="timestamp" CHECKED>Log:<select name="searchlog">  <?php  $handle = opendir($path);  while ($file = readdir($handle)) {    if ($file != "." && $file != "..") {      echo "<option value=\"$file\">$file</option>\n";    }  }  closedir($handle);  ?></select>Filter: <INPUT TYPE="text" size="50" name="filter"><INPUT TYPE="submit" VALUE="Display"></FORM><?php} else {  if ($filter == '') $filter == ' ';  if ( !isset($timestamp) ) {    $timestamp = FALSE;  } else {    $timestamp = TRUE;  }  echo $filter;  $lines = file($path . $searchlog);  echo "<center> <a href=\"$PHP_SELF\">Clear Log</a> </center>";  echo "     ";  foreach ($lines as $line_num => $line) {      $pos = strpos($line, $filter);      if ($pos !== false) {        if ($timestamp) {          if (strpos( $oldline, "Time:") === 0 ) {            echo "$oldline<br/>";          }        }        echo "$line<br/>";      }      $oldline = $line;  }}?></font></td>