https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /usr/share/phpmyadmin/templates/table/relation/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/phpmyadmin/templates/table/relation/internal_relational_row.phtml
<?php
$myfield = $save_row[$i]['Field'];
// Use an md5 as array index to avoid having special characters
// in the name attribute (see bug #1746964 )
$myfield_md5 = md5($myfield);
$myfield_html = htmlspecialchars($myfield);

$foreign_table = false;
$foreign_column = false;

// database dropdown
if (isset($existrel[$myfield])) {
    $foreign_db = $existrel[$myfield]['foreign_db'];
} else {
    $foreign_db = $db;
}

// table dropdown
$tables = array();
if ($foreign_db) {
    if (isset($existrel[$myfield])) {
        $foreign_table = $existrel[$myfield]['foreign_table'];
    }
    $tables_rs = $GLOBALS['dbi']->query(
        'SHOW TABLES FROM ' . PMA_Util::backquote($foreign_db),
        null,
        PMA_DatabaseInterface::QUERY_STORE
    );
    while ($row = $GLOBALS['dbi']->fetchRow($tables_rs)) {
        $tables[] = $row[0];
    }
}

// column dropdown
$columns = array();
if ($foreign_db && $foreign_table) {
    if (isset($existrel[$myfield])) {
        $foreign_column = $existrel[$myfield]['foreign_field'];
    }
    $table_obj = new PMA_Table($foreign_table, $foreign_db);
    $columns = $table_obj->getUniqueColumns(false, false);
}
?>
<tr class="<?php echo ($odd_row ? 'odd' : 'even'); ?>">
    <td class="vmiddle">
        <strong><?php echo $myfield_html; ?></strong>
        <input type="hidden" name="fields_name[<?php echo $myfield_md5; ?>]"
               value="<?php echo $myfield_html; ?>"/>
    </td>

    <td>
        <?php echo PMA\Template::get('table/relation/relational_dropdown')->render(
            array(
                'name' => 'destination_db[' . $myfield_md5 . ']',
                'title' => __('Database'),
                'values' => $GLOBALS['pma']->databases,
                'foreign' => $foreign_db
            )
        ); ?>
        <?php echo PMA\Template::get('table/relation/relational_dropdown')->render(
            array(
                'name' => 'destination_table[' . $myfield_md5 . ']',
                'title' => __('Table'),
                'values' => $tables,
                'foreign' => $foreign_table
            )
        ); ?>
        <?php echo PMA\Template::get('table/relation/relational_dropdown')->render(
            array(
                'name' => 'destination_column[' . $myfield_md5 . ']',
                'title' => __('Column'),
                'values' => $columns,
                'foreign' => $foreign_column
            )
        ); ?>
    </td>
</tr>

https://t.me/RX1948 - 2025