2009-07-03 06:26:01 +00:00
< ? php
2009-07-28 16:38:21 +00:00
page_header ( lang ( 'Server' ), " " , null );
2010-02-03 15:30:52 +00:00
?>
< form action = " " >< p >
2010-02-09 16:28:34 +00:00
< ? php echo SID_FORM ; ?>
2010-02-03 15:30:52 +00:00
< input name = " where[][val] " value = " <?php echo h( $_GET["where"] [0][ " val " ]); ?> " >
< input type = " submit " value = " <?php echo lang('Search'); ?> " />
</ form >
< ? php
if ( $_GET [ " where " ]) {
$found = false ;
foreach ( table_status () as $table => $table_status ) {
$name = $adminer -> tableName ( $table_status );
if ( isset ( $table_status [ " Engine " ]) && $name != " " ) {
$result = $connection -> query ( " SELECT 1 FROM " . idf_escape ( $table ) . " WHERE " . implode ( " AND " , $adminer -> selectSearchProcess ( fields ( $table ), array ())) . " LIMIT 1 " );
if ( $result -> num_rows ) {
if ( ! $found ) {
echo " <ul> \n " ;
$found = true ;
}
echo " <li><a href=' " . h ( ME . " select= " . urlencode ( $table ) . " &where[][val]= " . urlencode ( $_GET [ " where " ][ 0 ][ " val " ])) . " '> " . h ( $name ) . " </a> \n " ;
}
}
}
echo ( $found ? " </ul> " : " <p class='message'> " . lang ( 'No tables.' )) . " \n " ;
}