Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
phpmyadmin /
libraries /
Delete
Unzip
Name
Size
Permission
Date
Action
bfShapeFiles
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
config
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
controllers
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
dbi
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
di
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
engines
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
gis
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
navigation
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
plugins
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
properties
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
rte
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
sql-parser
[ DIR ]
drwxrwxrwx
2022-03-20 10:35
Advisor.php
15.13
KB
-rw-r--r--
2017-01-23 20:20
Config.php
54.69
KB
-rw-r--r--
2020-10-23 14:39
Console.php
14.82
KB
-rw-r--r--
2017-01-23 20:20
DatabaseInterface.php
95.6
KB
-rw-r--r--
2017-01-23 20:20
DbList.php
1.9
KB
-rw-r--r--
2017-01-23 20:20
DbQbe.php
68.87
KB
-rw-r--r--
2017-01-23 20:20
DbSearch.php
17.21
KB
-rw-r--r--
2017-01-23 20:20
DisplayResults.php
206
KB
-rw-r--r--
2020-10-23 14:39
Error.php
12.7
KB
-rw-r--r--
2017-01-23 20:20
ErrorHandler.php
16.48
KB
-rw-r--r--
2017-01-23 20:20
File.php
18.82
KB
-rw-r--r--
2017-01-23 20:20
Font.php
4.24
KB
-rw-r--r--
2017-01-23 20:20
Footer.php
10.52
KB
-rw-r--r--
2020-10-23 14:39
Header.php
25.34
KB
-rw-r--r--
2017-01-23 20:20
Index.php
23.79
KB
-rw-r--r--
2017-01-23 20:20
IndexColumn.php
4.46
KB
-rw-r--r--
2017-01-23 20:20
Language.php
4.27
KB
-rw-r--r--
2017-01-23 20:20
LanguageManager.php
20.75
KB
-rw-r--r--
2017-01-23 20:20
Linter.php
5.02
KB
-rw-r--r--
2017-01-23 20:20
ListAbstract.php
3.15
KB
-rw-r--r--
2017-01-23 20:20
ListDatabase.php
4.62
KB
-rw-r--r--
2017-01-23 20:20
Menu.php
21.14
KB
-rw-r--r--
2017-01-23 20:20
Message.php
18.67
KB
-rw-r--r--
2017-01-23 20:20
OutputBuffering.php
3.59
KB
-rw-r--r--
2017-01-23 20:20
PDF.php
3.94
KB
-rw-r--r--
2017-01-23 20:20
Partition.php
7.26
KB
-rw-r--r--
2017-01-23 20:20
Psr4Autoloader.php
4.85
KB
-rw-r--r--
2017-01-23 20:20
RecentFavoriteTable.php
11.78
KB
-rw-r--r--
2017-01-23 20:20
Response.php
12.61
KB
-rw-r--r--
2017-01-23 20:20
SavedSearches.php
11.67
KB
-rw-r--r--
2017-01-23 20:20
Scripts.php
7.38
KB
-rw-r--r--
2017-01-23 20:20
ServerStatusData.php
15.72
KB
-rw-r--r--
2017-01-23 20:20
StorageEngine.php
13.61
KB
-rw-r--r--
2017-01-23 20:20
SubPartition.php
3.52
KB
-rw-r--r--
2017-01-23 20:20
SysInfo.php
799
B
-rw-r--r--
2017-01-23 20:20
SysInfoLinux.php
1.92
KB
-rw-r--r--
2017-01-23 20:20
SysInfoSunOS.php
1.86
KB
-rw-r--r--
2017-01-23 20:20
SysInfoWINNT.php
3.08
KB
-rw-r--r--
2017-01-23 20:20
SystemDatabase.php
3.66
KB
-rw-r--r--
2017-01-23 20:20
Table.php
88.12
KB
-rw-r--r--
2017-01-23 20:20
Template.php
4.45
KB
-rw-r--r--
2017-01-23 20:20
Theme.php
11.34
KB
-rw-r--r--
2017-01-23 20:20
ThemeManager.php
12.91
KB
-rw-r--r--
2017-01-23 20:20
Tracker.php
30.35
KB
-rw-r--r--
2017-01-23 20:20
Types.php
6.08
KB
-rw-r--r--
2017-01-23 20:20
TypesMySQL.php
17.26
KB
-rw-r--r--
2017-01-23 20:20
Util.php
172.46
KB
-rw-r--r--
2020-10-23 14:39
VersionInformation.php
7.87
KB
-rw-r--r--
2017-01-23 20:20
ZipFile.php
6.63
KB
-rw-r--r--
2017-01-23 20:20
advisor.lib.php
1.6
KB
-rw-r--r--
2017-01-23 20:20
advisory_rules.txt
25.94
KB
-rw-r--r--
2017-01-23 20:20
autoloader.php
450
B
-rw-r--r--
2017-01-23 20:20
bookmark.lib.php
8.5
KB
-rw-r--r--
2017-01-23 20:20
browse_foreigners.lib.php
9.83
KB
-rw-r--r--
2017-01-23 20:20
central_columns.lib.php
49.38
KB
-rw-r--r--
2017-01-23 20:20
charset_conversion.lib.php
3.54
KB
-rw-r--r--
2017-01-23 20:20
check_user_privileges.lib.php
10.65
KB
-rw-r--r--
2017-01-23 20:20
cleanup.lib.php
1.29
KB
-rw-r--r--
2017-01-23 20:20
common.inc.php
34.38
KB
-rw-r--r--
2020-10-23 14:39
config.default.php
66.5
KB
-rw-r--r--
2017-01-23 20:20
config.values.php
10.17
KB
-rw-r--r--
2017-01-23 20:20
core.lib.php
29.94
KB
-rw-r--r--
2017-01-23 20:20
create_addfield.lib.php
15.68
KB
-rw-r--r--
2017-01-23 20:20
database_interface.inc.php
2.63
KB
-rw-r--r--
2017-01-23 20:20
db_common.inc.php
3.12
KB
-rw-r--r--
2017-01-23 20:20
db_designer.lib.php
10.4
KB
-rw-r--r--
2020-10-23 14:39
db_table_exists.lib.php
3.21
KB
-rw-r--r--
2017-01-23 20:20
display_change_password.lib.php
5.45
KB
-rw-r--r--
2017-01-23 20:20
display_create_table.lib.php
1.53
KB
-rw-r--r--
2017-01-23 20:20
display_export.lib.php
38.11
KB
-rw-r--r--
2017-01-23 20:20
display_git_revision.lib.php
3.04
KB
-rw-r--r--
2020-10-23 14:39
display_import.lib.php
24.34
KB
-rw-r--r--
2017-01-23 20:20
display_import_ajax.lib.php
3.13
KB
-rw-r--r--
2017-01-23 20:20
display_select_lang.lib.php
2.36
KB
-rw-r--r--
2017-01-23 20:20
error.inc.php
1.21
KB
-rw-r--r--
2017-01-23 20:20
error_report.lib.php
10.25
KB
-rw-r--r--
2017-01-23 20:20
export.lib.php
35.16
KB
-rw-r--r--
2017-01-23 20:20
file_listing.lib.php
2.37
KB
-rw-r--r--
2017-01-23 20:20
iconv_wrapper.lib.php
3.88
KB
-rw-r--r--
2017-01-23 20:20
import.lib.php
50.64
KB
-rw-r--r--
2017-01-23 20:20
index.lib.php
1.37
KB
-rw-r--r--
2017-01-23 20:20
information_schema_relations.lib.php
10.95
KB
-rw-r--r--
2017-01-23 20:20
insert_edit.lib.php
112.79
KB
-rw-r--r--
2020-10-23 14:39
ip_allow_deny.lib.php
9.35
KB
-rw-r--r--
2017-01-23 20:20
js_escape.lib.php
4.43
KB
-rw-r--r--
2017-01-23 20:20
kanji-encoding.lib.php
4.46
KB
-rw-r--r--
2017-01-23 20:20
language_stats.inc.php
1.45
KB
-rw-r--r--
2017-01-23 20:20
logging.lib.php
521
B
-rw-r--r--
2017-01-23 20:20
mime.lib.php
704
B
-rw-r--r--
2017-01-23 20:20
mult_submits.inc.php
10.64
KB
-rw-r--r--
2017-01-23 20:20
mult_submits.lib.php
20.44
KB
-rw-r--r--
2017-01-23 20:20
mysql_charsets.inc.php
4.09
KB
-rw-r--r--
2017-01-23 20:20
mysql_charsets.lib.php
10.47
KB
-rw-r--r--
2017-01-23 20:20
mysql_relations.lib.php
5.12
KB
-rw-r--r--
2017-01-23 20:20
normalization.lib.php
33.98
KB
-rw-r--r--
2017-01-23 20:20
opendocument.lib.php
7.94
KB
-rw-r--r--
2017-01-23 20:20
operations.lib.php
73.64
KB
-rw-r--r--
2017-01-23 20:20
parse_analyze.lib.php
2.12
KB
-rw-r--r--
2017-01-23 20:20
plugin_interface.lib.php
19.69
KB
-rw-r--r--
2017-01-23 20:20
pmd_common.php
24.2
KB
-rw-r--r--
2020-10-23 14:39
relation.lib.php
68.41
KB
-rw-r--r--
2017-01-23 20:20
relation_cleanup.lib.php
13.84
KB
-rw-r--r--
2017-01-23 20:20
replication.inc.php
8.82
KB
-rw-r--r--
2017-01-23 20:20
replication_gui.lib.php
37.45
KB
-rw-r--r--
2017-01-23 20:20
sanitizing.lib.php
6.3
KB
-rw-r--r--
2017-01-23 20:20
select_server.lib.php
3.4
KB
-rw-r--r--
2017-01-23 20:20
server_common.inc.php
1.22
KB
-rw-r--r--
2017-01-23 20:20
server_common.lib.php
1.92
KB
-rw-r--r--
2017-01-23 20:20
server_privileges.lib.php
179.22
KB
-rw-r--r--
2020-10-23 14:39
server_status.lib.php
9.92
KB
-rw-r--r--
2017-01-23 20:20
server_status_advisor.lib.php
1.89
KB
-rw-r--r--
2017-01-23 20:20
server_status_monitor.lib.php
26.22
KB
-rw-r--r--
2017-01-23 20:20
server_status_processes.lib.php
9.57
KB
-rw-r--r--
2017-01-23 20:20
server_status_queries.lib.php
4.86
KB
-rw-r--r--
2017-01-23 20:20
server_status_variables.lib.php
28.95
KB
-rw-r--r--
2017-01-23 20:20
server_user_groups.lib.php
12.8
KB
-rw-r--r--
2017-01-23 20:20
server_users.lib.php
1.35
KB
-rw-r--r--
2017-01-23 20:20
session.inc.php
5.22
KB
-rw-r--r--
2017-01-23 20:20
session.lib.php
735
B
-rw-r--r--
2017-01-23 20:20
special_schema_links.lib.php
17.51
KB
-rw-r--r--
2017-01-23 20:20
sql.lib.php
77.51
KB
-rw-r--r--
2017-01-23 20:20
sql_query_form.lib.php
15.71
KB
-rw-r--r--
2017-01-23 20:20
string.lib.php
800
B
-rw-r--r--
2017-01-23 20:20
stringMb.lib.php
1.86
KB
-rw-r--r--
2017-01-23 20:20
stringNative.lib.php
6.82
KB
-rw-r--r--
2017-01-23 20:20
sysinfo.lib.php
1.34
KB
-rw-r--r--
2017-01-23 20:20
tbl_columns_definition_form.inc.php
13.55
KB
-rw-r--r--
2017-01-23 20:20
tbl_common.inc.php
1.3
KB
-rw-r--r--
2017-01-23 20:20
tbl_info.inc.php
3.54
KB
-rw-r--r--
2017-01-23 20:20
tbl_partition_definition.inc.php
5.55
KB
-rw-r--r--
2017-01-23 20:20
tracking.lib.php
54.93
KB
-rw-r--r--
2017-01-23 20:20
transformations.lib.php
14.63
KB
-rw-r--r--
2020-10-23 14:39
url_generating.lib.php
6.77
KB
-rw-r--r--
2017-01-23 20:20
user_preferences.inc.php
2.38
KB
-rw-r--r--
2017-01-23 20:20
user_preferences.lib.php
8.17
KB
-rw-r--r--
2017-01-23 20:20
util.lib.php
749
B
-rw-r--r--
2017-01-23 20:20
vendor_config.php
2.49
KB
-rw-r--r--
2020-10-23 14:39
zip_extension.lib.php
5.38
KB
-rw-r--r--
2017-01-23 20:20
Save
Rename
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Handles Database Search * * @package PhpMyAdmin */ namespace PMA\libraries; /** * Class to handle database search * * @package PhpMyAdmin */ class DbSearch { /** * Database name * * @access private * @var string */ private $_db; /** * Table Names * * @access private * @var array */ private $_tables_names_only; /** * Type of search * * @access private * @var array */ private $_searchTypes; /** * Already set search type * * @access private * @var integer */ private $_criteriaSearchType; /** * Already set search type's description * * @access private * @var string */ private $_searchTypeDescription; /** * Search string/regexp * * @access private * @var string */ private $_criteriaSearchString; /** * Criteria Tables to search in * * @access private * @var array */ private $_criteriaTables; /** * Restrict the search to this column * * @access private * @var string */ private $_criteriaColumnName; /** * Public Constructor * * @param string $db Database name */ public function __construct($db) { $this->_db = $db; // Sets criteria parameters $this->_setSearchParams(); } /** * Sets search parameters * * @return void */ private function _setSearchParams() { $this->_tables_names_only = $GLOBALS['dbi']->getTables($this->_db); $this->_searchTypes = array( '1' => __('at least one of the words'), '2' => __('all words'), '3' => __('the exact phrase'), '4' => __('as regular expression'), ); if (empty($_REQUEST['criteriaSearchType']) || ! is_string($_REQUEST['criteriaSearchType']) || ! array_key_exists( $_REQUEST['criteriaSearchType'], $this->_searchTypes ) ) { $this->_criteriaSearchType = 1; unset($_REQUEST['submit_search']); } else { $this->_criteriaSearchType = (int) $_REQUEST['criteriaSearchType']; $this->_searchTypeDescription = $this->_searchTypes[$_REQUEST['criteriaSearchType']]; } if (empty($_REQUEST['criteriaSearchString']) || ! is_string($_REQUEST['criteriaSearchString']) ) { $this->_criteriaSearchString = ''; unset($_REQUEST['submit_search']); } else { $this->_criteriaSearchString = $_REQUEST['criteriaSearchString']; } $this->_criteriaTables = array(); if (empty($_REQUEST['criteriaTables']) || ! is_array($_REQUEST['criteriaTables']) ) { unset($_REQUEST['submit_search']); } else { $this->_criteriaTables = array_intersect( $_REQUEST['criteriaTables'], $this->_tables_names_only ); } if (empty($_REQUEST['criteriaColumnName']) || ! is_string($_REQUEST['criteriaColumnName']) ) { unset($this->_criteriaColumnName); } else { $this->_criteriaColumnName = $GLOBALS['dbi']->escapeString( $_REQUEST['criteriaColumnName'] ); } } /** * Builds the SQL search query * * @param string $table The table name * * @return array 3 SQL queries (for count, display and delete results) * * @todo can we make use of fulltextsearch IN BOOLEAN MODE for this? * PMA_backquote * DatabaseInterface::freeResult * DatabaseInterface::fetchAssoc * $GLOBALS['db'] * explode * count * strlen */ private function _getSearchSqls($table) { // Statement types $sqlstr_select = 'SELECT'; $sqlstr_delete = 'DELETE'; // Table to use $sqlstr_from = ' FROM ' . Util::backquote($GLOBALS['db']) . '.' . Util::backquote($table); // Gets where clause for the query $where_clause = $this->_getWhereClause($table); // Builds complete queries $sql = array(); $sql['select_columns'] = $sqlstr_select . ' * ' . $sqlstr_from . $where_clause; // here, I think we need to still use the COUNT clause, even for // VIEWs, anyway we have a WHERE clause that should limit results $sql['select_count'] = $sqlstr_select . ' COUNT(*) AS `count`' . $sqlstr_from . $where_clause; $sql['delete'] = $sqlstr_delete . $sqlstr_from . $where_clause; return $sql; } /** * Provides where clause for building SQL query * * @param string $table The table name * * @return string The generated where clause */ private function _getWhereClause($table) { // Columns to select $allColumns = $GLOBALS['dbi']->getColumns($GLOBALS['db'], $table); $likeClauses = array(); // Based on search type, decide like/regex & '%'/'' $like_or_regex = (($this->_criteriaSearchType == 4) ? 'REGEXP' : 'LIKE'); $automatic_wildcard = (($this->_criteriaSearchType < 3) ? '%' : ''); // For "as regular expression" (search option 4), LIKE won't be used // Usage example: If user is searching for a literal $ in a regexp search, // he should enter \$ as the value. $criteriaSearchStringEscaped = $GLOBALS['dbi']->escapeString( $this->_criteriaSearchString ); // Extract search words or pattern $search_words = (($this->_criteriaSearchType > 2) ? array($criteriaSearchStringEscaped) : explode(' ', $criteriaSearchStringEscaped)); foreach ($search_words as $search_word) { // Eliminates empty values if (mb_strlen($search_word) === 0) { continue; } $likeClausesPerColumn = array(); // for each column in the table foreach ($allColumns as $column) { if (! isset($this->_criteriaColumnName) || mb_strlen($this->_criteriaColumnName) == 0 || $column['Field'] == $this->_criteriaColumnName ) { $column = 'CONVERT(' . Util::backquote($column['Field']) . ' USING utf8)'; $likeClausesPerColumn[] = $column . ' ' . $like_or_regex . ' ' . "'" . $automatic_wildcard . $search_word . $automatic_wildcard . "'"; } } // end for if (count($likeClausesPerColumn) > 0) { $likeClauses[] = implode(' OR ', $likeClausesPerColumn); } } // end for // Use 'OR' if 'at least one word' is to be searched, else use 'AND' $implode_str = ($this->_criteriaSearchType == 1 ? ' OR ' : ' AND '); if (empty($likeClauses)) { // this could happen when the "inside column" does not exist // in any selected tables $where_clause = ' WHERE FALSE'; } else { $where_clause = ' WHERE (' . implode(') ' . $implode_str . ' (', $likeClauses) . ')'; } return $where_clause; } /** * Displays database search results * * @return string HTML for search results */ public function getSearchResults() { $html_output = ''; // Displays search string $html_output .= '<br />' . '<table class="data">' . '<caption class="tblHeaders">' . sprintf( __('Search results for "<i>%s</i>" %s:'), htmlspecialchars($this->_criteriaSearchString), $this->_searchTypeDescription ) . '</caption>'; $num_search_result_total = 0; $odd_row = true; // For each table selected as search criteria foreach ($this->_criteriaTables as $each_table) { // Gets the SQL statements $newsearchsqls = $this->_getSearchSqls($each_table); // Executes the "COUNT" statement $res_cnt = intval($GLOBALS['dbi']->fetchValue($newsearchsqls['select_count'])); $num_search_result_total += $res_cnt; // Gets the result row's HTML for a table $html_output .= $this->_getResultsRow( $each_table, $newsearchsqls, $odd_row, $res_cnt ); $odd_row = ! $odd_row; } // end for $html_output .= '</table>'; // Displays total number of matches if (count($this->_criteriaTables) > 1) { $html_output .= '<p>'; $html_output .= sprintf( _ngettext( '<b>Total:</b> <i>%s</i> match', '<b>Total:</b> <i>%s</i> matches', $num_search_result_total ), $num_search_result_total ); $html_output .= '</p>'; } return $html_output; } /** * Provides search results row with browse/delete links. * (for a table) * * @param string $each_table One of the tables on which search was performed * @param array $newsearchsqls Contains SQL queries * @param bool $odd_row For displaying contrasting table rows * @param integer $res_cnt Number of results found * * @return string HTML row */ private function _getResultsRow($each_table, $newsearchsqls, $odd_row, $res_cnt) { $this_url_params = array( 'db' => $GLOBALS['db'], 'table' => $each_table, 'goto' => 'db_sql.php', 'pos' => 0, 'is_js_confirmed' => 0, ); // Start forming search results row $html_output = '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">'; // Displays results count for a table $html_output .= '<td>'; $html_output .= sprintf( _ngettext( '%1$s match in <strong>%2$s</strong>', '%1$s matches in <strong>%2$s</strong>', $res_cnt ), $res_cnt, htmlspecialchars($each_table) ); $html_output .= '</td>'; // Displays browse/delete link if result count > 0 if ($res_cnt > 0) { $this_url_params['db'] = htmlspecialchars($GLOBALS['db']); $this_url_params['table'] = htmlspecialchars($each_table); $browse_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params); $html_output .= '<td><a name="browse_search" ' . ' class="ajax browse_results" href="' . $browse_result_path . '" ' . 'data-browse-sql="' . htmlspecialchars($newsearchsqls['select_columns']). '" ' . 'data-table-name="' . htmlspecialchars($each_table) . '" >' . __('Browse') . '</a></td>'; $delete_result_path = $browse_result_path; $html_output .= '<td><a name="delete_search" class="ajax delete_results"' . ' href="' . $delete_result_path . '"' . ' data-delete-sql="' . htmlspecialchars($newsearchsqls['delete']) . '"' . ' data-table-name="' . htmlspecialchars($each_table) . '" >' . __('Delete') . '</a></td>'; } else { $html_output .= '<td> </td>' . '<td> </td>'; }// end if else $html_output .= '</tr>'; return $html_output; } /** * Provides the main search form's html * * @return string HTML for selection form */ public function getSelectionForm() { $html_output = '<a id="db_search"></a>'; $html_output .= '<form id="db_search_form"' . ' class="ajax lock-page"' . ' method="post" action="db_search.php" name="db_search">'; $html_output .= PMA_URL_getHiddenInputs($GLOBALS['db']); $html_output .= '<fieldset>'; // set legend caption $html_output .= '<legend>' . __('Search in database') . '</legend>'; $html_output .= '<table class="formlayout">'; // inputbox for search phrase $html_output .= '<tr>'; $html_output .= '<td>' . __('Words or values to search for (wildcard: "%"):') . '</td>'; $html_output .= '<td><input type="text"' . ' name="criteriaSearchString" size="60"' . ' value="' . htmlspecialchars($this->_criteriaSearchString) . '" />'; $html_output .= '</td>'; $html_output .= '</tr>'; // choices for types of search $html_output .= '<tr>'; $html_output .= '<td class="right vtop">' . __('Find:') . '</td>'; $html_output .= '<td>'; $choices = array( '1' => __('at least one of the words') . Util::showHint( __('Words are separated by a space character (" ").') ), '2' => __('all words') . Util::showHint( __('Words are separated by a space character (" ").') ), '3' => __('the exact phrase'), '4' => __('as regular expression') . ' ' . Util::showMySQLDocu('Regexp') ); // 4th parameter set to true to add line breaks // 5th parameter set to false to avoid htmlspecialchars() escaping // in the label since we have some HTML in some labels $html_output .= Util::getRadioFields( 'criteriaSearchType', $choices, $this->_criteriaSearchType, true, false ); $html_output .= '</td></tr>'; // displays table names as select options $html_output .= '<tr>'; $html_output .= '<td class="right vtop">' . __('Inside tables:') . '</td>'; $html_output .= '<td rowspan="2">'; $html_output .= '<select name="criteriaTables[]" size="6"' . ' multiple="multiple">'; foreach ($this->_tables_names_only as $each_table) { if (in_array($each_table, $this->_criteriaTables)) { $is_selected = ' selected="selected"'; } else { $is_selected = ''; } $html_output .= '<option value="' . htmlspecialchars($each_table) . '"' . $is_selected . '>' . str_replace(' ', ' ', htmlspecialchars($each_table)) . '</option>'; } // end for $html_output .= '</select>'; $html_output .= '</td></tr>'; // Displays 'select all' and 'unselect all' links $alter_select = '<a href="#" ' . 'onclick="setSelectOptions(\'db_search\',' . ' \'criteriaTables[]\', true); return false;">' . __('Select all') . '</a> / '; $alter_select .= '<a href="#" ' . 'onclick="setSelectOptions(\'db_search\',' . ' \'criteriaTables[]\', false); return false;">' . __('Unselect all') . '</a>'; $html_output .= '<tr><td class="right vbottom">' . $alter_select . '</td></tr>'; // Inputbox for column name entry $html_output .= '<tr>'; $html_output .= '<td class="right">' . __('Inside column:') . '</td>'; $html_output .= '<td><input type="text" name="criteriaColumnName" size="60"' . 'value="' . (! empty($this->_criteriaColumnName) ? htmlspecialchars($this->_criteriaColumnName) : '') . '" /></td>'; $html_output .= '</tr>'; $html_output .= '</table>'; $html_output .= '</fieldset>'; $html_output .= '<fieldset class="tblFooters">'; $html_output .= '<input type="submit" name="submit_search" value="' . __('Go') . '" id="buttonGo" />'; $html_output .= '</fieldset>'; $html_output .= '</form>'; $html_output .= '<div id="togglesearchformdiv">' . '<a id="togglesearchformlink"></a></div>'; return $html_output; } /** * Provides div tags for browsing search results and sql query form. * * @return string div tags */ public function getResultDivs() { $html_output = '<!-- These two table-image and table-link elements display' . ' the table name in browse search results -->'; $html_output .= '<div id="table-info">'; $html_output .= '<a class="item" id="table-link" ></a>'; $html_output .= '</div>'; // div for browsing results $html_output .= '<div id="browse-results">'; $html_output .= '<!-- this browse-results div is used to load the browse' . ' and delete results in the db search -->'; $html_output .= '</div>'; $html_output .= '<br class="clearfloat" />'; $html_output .= '<div id="sqlqueryform">'; $html_output .= '<!-- this sqlqueryform div is used to load the delete' . ' form in the db search -->'; $html_output .= '</div>'; $html_output .= '<!-- toggle query box link-->'; $html_output .= '<a id="togglequerybox"></a>'; return $html_output; } }