/**
 * PMA_syncDisplayHeaderTargetAndMatchingTables() shows the header for target database and the matching tables
 * @uses   $_SESSION['trg_type'] 
 * @uses   $_SESSION['trg_server']['host'] 
 * 
 * @param   string  $trg_db          target db name 
 * @param   array   $matching_tables
 * @return  boolean $odd_row         current value of this toggle 
*/
function PMA_syncDisplayHeaderTargetAndMatchingTables($trg_db, $matching_tables)
{
    echo '<table id="serverstatusconnections" class="data" width="43%">';
    echo '<tr>';
    echo '<th>' . __('Target database') . ':  ' . $trg_db . '<br />(';
    if ('cur' == $_SESSION['trg_type']) {
        echo __('Current server');
    } else {
        echo __('Remote server') . ' ' . $_SESSION['trg_server']['host'];
    }
    echo ')</th>';
    echo '</tr>';
    $odd_row = false;
    foreach ($matching_tables as $tbl_name) {
        $odd_row = PMA_syncDisplayBeginTableRow($odd_row);
        echo '<td>  ' . htmlspecialchars($tbl_name) . '</td>';
        echo '</tr>';
    }
    return $odd_row;
}
         </tr>';
 }
 foreach ($target_tables_uncommon as $tbl_nc_name) {
     $odd_row = PMA_syncDisplayBeginTableRow($odd_row);
     echo '<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td><td></td>';
     echo '</tr>';
 }
 echo '</table>';
 $odd_row = PMA_syncDisplayHeaderTargetAndMatchingTables($trg_db, $matching_tables);
 foreach ($source_tables_uncommon as $tbl_nc_name) {
     $odd_row = PMA_syncDisplayBeginTableRow($odd_row);
     echo '<td>' . htmlspecialchars($tbl_nc_name) . ' </td>
         </tr>';
 }
 foreach ($target_tables_uncommon as $tbl_nc_name) {
     $odd_row = PMA_syncDisplayBeginTableRow($odd_row);
     echo '<td>  ' . htmlspecialchars($tbl_nc_name) . '</td>';
     echo '</tr>';
 }
 echo '</table> </div>';
 /**
  * connecting the source and target servers
  */
 if ('rmt' == $_SESSION['src_type']) {
     $src_link = PMA_DBI_connect($src_username, $src_password, $is_controluser = false, $_SESSION['src_server']);
 } else {
     $src_link = $GLOBALS['userlink'];
     // working on current server, so initialize this for tracking
     // (does not work if user defined current server as a remote one)
     $GLOBALS['db'] = $_SESSION['src_db'];
 }