コード例 #1
0
ファイル: db_search.php プロジェクト: quartemer/xoopserver
 * Gets some core libraries and send headers
 */
require './db_details_common.php';
// If config variable $cfg['Usedbsearch'] is on FALSE : exit.
if (!$cfg['UseDbSearch']) {
    PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url);
}
// end if
$url_query .= '&goto=db_search.php';
/**
 * Get the list of tables from the current database
 */
$list_tables = PMA_mysql_list_tables($db);
$num_tables = $list_tables ? mysql_num_rows($list_tables) : 0;
for ($i = 0; $i < $num_tables; $i++) {
    $tables[] = PMA_mysql_tablename($list_tables, $i);
}
if ($num_tables) {
    mysql_free_result($list_tables);
}
/**
 * Displays top links
 */
$sub_part = '';
require './db_details_links.php';
/**
 * 1. Main search form has been submitted
 */
if (isset($submit_search)) {
    /**
     * Builds the SQL search query
コード例 #2
0
ファイル: left.php プロジェクト: quartemer/xoopserver
            ?>
<bdo dir="<?php 
            echo $text_dir;
            ?>
">&nbsp;&nbsp;</bdo></span><span class="headaCnt">(<?php 
            echo $num_tables_disp;
            ?>
)</span></a></nobr>
    </div>
    <div id="el2Child" class="child" style="margin-bottom: 5px">
        <?php 
        }
        // Displays the list of tables from the current database
        $tablestack = array();
        for ($j = 0; $j < $num_tables; $j++) {
            $table = PMA_mysql_tablename($tables, $j);
            $alias = !empty($tooltip_name) && isset($tooltip_name[$table]) ? htmlentities($tooltip_name[$table]) : '';
            $url_title = !empty($tooltip) && isset($tooltip[$table]) ? htmlentities($tooltip[$table]) : '';
            $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
            if ($cfg['LeftFrameLight']) {
                echo "\n";
                ?>
        <nobr><a target="phpmain<?php 
                echo $hash;
                ?>
" href="sql.php?<?php 
                echo $common_url_query;
                ?>
&amp;table=<?php 
                echo urlencode($table);
                ?>
コード例 #3
0
 */
$tbl_result = PMA_mysql_list_tables($db);
$tbl_result_cnt = mysql_num_rows($tbl_result);
$i = 0;
$k = 0;
// The tables list sent by a previously submitted form
if (!empty($TableList)) {
    $cnt_table_list = count($TableList);
    for ($x = 0; $x < $cnt_table_list; $x++) {
        $tbl_names[urldecode($TableList[$x])] = ' selected="selected"';
    }
}
// end if
// The tables list gets from MySQL
while ($i < $tbl_result_cnt) {
    $tbl = PMA_mysql_tablename($tbl_result, $i);
    $fld_results = @PMA_mysql_list_fields_alternate($db, $tbl) or PMA_mysqlDie(PMA_mysql_error(), 'PMA_mysql_list_fields_alternate(' . $db . ', ' . $tbl . ')', FALSE, $err_url);
    $fld_results_cnt = $fld_results ? count($fld_results) : 0;
    $j = 0;
    if (empty($tbl_names[$tbl]) && !empty($TableList)) {
        $tbl_names[$tbl] = '';
    } else {
        $tbl_names[$tbl] = ' selected="selected"';
    }
    //  end if
    // The fields list per selected tables
    if ($tbl_names[$tbl] == ' selected="selected"') {
        $fld[$k++] = PMA_backquote($tbl) . '.*';
        while ($j < $fld_results_cnt) {
            $fld[$k] = PMA_convert_display_charset($fld_results[$j]['Field']);
            $fld[$k] = PMA_backquote($tbl) . '.' . PMA_backquote($fld[$k]);