clean_report.php 392 B

12345678910111213141516171819
  1. <?php
  2. ini_set('max_execution_time', 0);
  3. require_once 'auth.php';
  4. $metaTables = $adodb->MetaTables();
  5. $adodb->debug = 1;
  6. $i = 0;
  7. foreach ($metaTables as $k => $v) {
  8. if (ereg('^qb_view_', $v)
  9. || ereg('^qb_data_', $v)
  10. || ereg('^qb_report_', $v)
  11. || ereg('_flag$', $v)) {
  12. $i++;
  13. $adodb->Execute("DROP TABLE ".$v);
  14. }
  15. }
  16. if ($i === 0) echo 'No Report Tables Deleted.';
  17. ?>