getTables()); } } function checkTables(&$db) { $type = v($_POST['optype']); $options = array('skiplog' => v($_POST['skiplog']) == 'on' ? TRUE : FALSE); $options['checktype'] = v($_POST['checktype']); $options['repairtype'] = is_array(v($_POST['repairtype'])) ? v($_POST['repairtype']) : array(); include(BASE_PATH . "/lib/tablechecker.php"); $checker = new tableChecker($db); $checker->setOperation($type); $checker->setTables(v($_POST['tables'])); $checker->setOptions($options); $results = array(); if ($checker->runCheck()) $results = $checker->getResults(); $replace = array('RESULTS' => json_encode($results) ); echo view('dbrepair_results', $replace); } ?>