public static function createFormSelectList() { $engine = EngineAPI::singleton(); $forms = forms::getForms(TRUE, TRUE); $output = '<ul class="pickList">'; foreach ($forms as $form) { if ($form === FALSE) { continue; } if (!mfcsPerms::isViewer($form['ID'])) { continue; } $output .= sprintf('<div class="btn-group" style="display: block; margin: 5px;"> <a href="list.php?listType=form&formID=%s" class="btn" style="width: 400px;">%s</a> <button class="btn dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <ul class="dropdown-menu" style="width: 450px;"> <li><a href="list.php?listType=formShelfList&formID=%s" style="width: 400px; text-align: right;">Shelf List</a></li> </ul> </div>', $form['ID'], forms::title($form['ID']), $form['ID']); } $output .= '</ul>'; return $output; }
<?php session_save_path('/tmp'); ini_set('memory_limit', -1); set_time_limit(0); require "../header.php"; if (!isCLI()) { print "Must be run from the command line."; exit; } // Turn off EngineAPI template engine $engine->obCallback = FALSE; $forms = forms::getForms(NULL); $dupeConfirm = array(TRUE => 0, FALSE => 0); foreach ($forms as $form) { print "Form: " . $form['title'] . "\n"; $objects = objects::getAllObjectsForForm($form['ID']); foreach ($objects as $object) { unset(mfcs::$engine->cleanPost['MYSQL']); $return = duplicates::updateDupeTable($form['ID'], $object['ID'], $object['data']); $dupeConfirm[$return]++; } } print "\n\n"; var_dump($dupeConfirm); print "Done.\n\n";