//- Rename table (=table_rename) case "table_rename": echo "<form action='?action=table_rename&confirm=1' method='post'>"; echo "<input type='hidden' name='oldname' value='" . htmlencode($target_table) . "'/>"; printf($lang['rename_tbl'], htmlencode($target_table)); echo " <input type='text' name='newname' style='width:200px;'/> <input type='submit' value='" . $lang['rename'] . "' name='rename' class='btn'/>"; echo "</form>"; break; //- Search table (=table_search) //- Search table (=table_search) case "table_search": $searchValues = array(); if (isset($_GET['done'])) { $query = "PRAGMA table_info(" . $db->quote_id($target_table) . ")"; $result = $db->selectArray($query); $primary_key = $db->getPrimaryKey($target_table); $j = 0; $arr = array(); for ($i = 0; $i < sizeof($result); $i++) { $field = $result[$i][1]; $field_index = str_replace(" ", "_", $field); $operator = $_POST[$field_index . ":operator"]; $value = $_POST[$field_index]; if ($value != "" || $operator == "!= ''" || $operator == "= ''") { if ($operator == "= ''" || $operator == "!= ''") { $arr[$j] = $db->quote_id($field) . " " . $operator; } else { if ($operator == "LIKE%") { $operator = "LIKE"; if (!preg_match('/(^%)|(%$)/', $value)) { $value = '%' . $value . '%';