Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Eloy's unchecked_vars admin page.

  • Loading branch information...
commit 83cd002a8e5f14a19dc3e2b7d1841d4be8588265 1 parent 8de0b68
defacer authored

Showing 1 changed file with 35 additions and 0 deletions. Show diff stats Hide diff stats

  1. +35 0 admin/unchecked_vars.php
35 admin/unchecked_vars.php
... ... @@ -0,0 +1,35 @@
  1 +<?php
  2 +
  3 + include("../config.php");
  4 +
  5 + $action = optional_param('action','LIST',PARAM_ALPHA);
  6 + $url = optional_param('url');
  7 + $info = optional_param('info');
  8 +
  9 + if (!isadmin()) {
  10 + error("Only the admin can use this page");
  11 + }
  12 +
  13 + print_header('Admin : Unchecked Vars' );
  14 +
  15 + if ($action == 'DELETE') {
  16 + delete_records('log', 'url', $url, 'info', $info);
  17 + }
  18 +
  19 + if ($errors = get_records_sql("SELECT DISTINCT url, info
  20 + FROM {$CFG->prefix}log
  21 + WHERE module = 'dev' AND
  22 + action = 'unchecked vars'")) {
  23 + echo '<table border="1" cellpadding="5">';
  24 + foreach ($errors as $error) {
  25 + echo '<tr>';
  26 + echo '<td>'.$error->url.'</td>';
  27 + echo '<td>'.$error->info.'</td>';
  28 + echo '<td><a href="unchecked_vars.php?action=DELETE&amp;url='.$error->url.'&amp;info='.$error->info.'">Delete this</a></td>';
  29 + echo '</tr>';
  30 + }
  31 + echo '</table>';
  32 + } else {
  33 + echo "No unchecked vars were detected";
  34 + }
  35 +?>

0 comments on commit 83cd002

Please sign in to comment.
Something went wrong with that request. Please try again.