/**
 * Function to get html for table comments, storage engine, collation and
 * partition definition
 *
 * @return string
 */
function PMA_getHtmlForTableConfigurations()
{
    $html = '<table>' . '<tr class="vtop">' . '<th>' . __('Table comments:') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Storage Engine:') . PMA_Util::showMySQLDocu('Storage_engines') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Collation:') . '</th>' . '</tr>' . '<tr><td><input type="text" name="comment" size="40" maxlength="80"' . ' value="' . (isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']) : '') . '" class="textfield" />' . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_StorageEngine::getHtmlSelect('tbl_storage_engine', null, isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null) . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, false, 3) . '</td>' . '</tr>';
    if (PMA_Partition::havePartitioning()) {
        $html .= '<tr class="vtop">' . '<th>' . __('PARTITION definition:') . '&nbsp;' . PMA_Util::showMySQLDocu('Partitioning') . '</th>' . '</tr>' . '<tr>' . '<td>' . '<textarea name="partition_definition" id="partitiondefinition"' . ' cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . ' rows="' . $GLOBALS['cfg']['TextareaRows'] . '"' . ' dir="' . $GLOBALS['text_dir'] . '">' . (isset($_REQUEST['partition_definition']) ? htmlspecialchars($_REQUEST['partition_definition']) : '') . '</textarea>' . '</td>' . '</tr>';
    }
    $html .= '</table>' . '<br />';
    return $html;
}
/**
 * Function to get html for table comments, storage engine, collation and
 * partition definition
 *
 * @return string
 */
function PMA_getHtmlForTableConfigurations()
{
    $html = '<table>';
    $html .= '<tr class="vtop">' . '<th>' . __('Table comments:') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Collation:') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Storage Engine:') . PMA_Util::showMySQLDocu('Storage_engines') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Connection:') . PMA_Util::showMySQLDocu('federated-create-connection') . '</th>' . '</tr>';
    $commentLength = PMA_MYSQL_INT_VERSION >= 50503 ? 2048 : 60;
    $html .= '<tr>' . '<td><input type="text" name="comment"' . ' size="40" maxlength="' . $commentLength . '"' . ' value="' . (isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']) : '') . '" class="textfield" />' . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, false) . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_StorageEngine::getHtmlSelect('tbl_storage_engine', null, isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null) . '</td>' . '<td width="25">&nbsp;</td>' . '<td><input type="text" name="connection" size="40"' . ' value="' . (isset($_REQUEST['connection']) ? htmlspecialchars($_REQUEST['connection']) : '') . '"' . ' placeholder="scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name"' . ' class="textfield" required="required" />' . '</td>' . '</tr>';
    if (PMA_Partition::havePartitioning()) {
        $html .= '<tr class="vtop">' . '<th>' . __('PARTITION definition:') . '&nbsp;' . PMA_Util::showMySQLDocu('Partitioning') . '</th>' . '</tr>' . '<tr>' . '<td>' . '<textarea name="partition_definition" id="partitiondefinition"' . ' cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . ' rows="' . $GLOBALS['cfg']['TextareaRows'] . '"' . ' dir="' . $GLOBALS['text_dir'] . '">' . (isset($_REQUEST['partition_definition']) ? htmlspecialchars($_REQUEST['partition_definition']) : '') . '</textarea>' . '</td>' . '</tr>';
    }
    $html .= '</table>' . '<br />';
    return $html;
}
Example #3
0
/**
 * setup HTML for a given Storage Engine
 *
 * @return string
 */
function PMA_getHtmlForSpecifiedServerEngines()
{
    /**
     * Displays details about a given Storage Engine
     */
    $html = '';
    $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
    $html .= '<h2>' . "\n" . PMA_Util::getImage('b_engine.png') . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n" . '    ' . PMA_Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()) . "\n" . '</h2>' . "\n\n";
    $html .= '<p>' . "\n" . '    <em>' . "\n" . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n" . '    </em>' . "\n" . '</p>' . "\n\n";
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        $html .= '<p>' . "\n" . '    <strong>[</strong>' . "\n";
        if (empty($_REQUEST['page'])) {
            $html .= '    <strong>' . __('Variables') . '</strong>' . "\n";
        } else {
            $html .= '    <a href="server_engines.php' . PMA_URL_getCommon(array('engine' => $_REQUEST['engine'])) . '">' . __('Variables') . '</a>' . "\n";
        }
        foreach ($infoPages as $current => $label) {
            $html .= '    <strong>|</strong>' . "\n";
            if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
                $html .= '    <strong>' . $label . '</strong>' . "\n";
            } else {
                $html .= '    <a href="server_engines.php' . PMA_URL_getCommon(array('engine' => $_REQUEST['engine'], 'page' => $current)) . '">' . htmlspecialchars($label) . '</a>' . "\n";
            }
        }
        unset($current, $label);
        $html .= '    <strong>]</strong>' . "\n" . '</p>' . "\n\n";
    }
    unset($infoPages, $page_output);
    if (!empty($_REQUEST['page'])) {
        $page_output = $engine_plugin->getPage($_REQUEST['page']);
    }
    if (!empty($page_output)) {
        $html .= $page_output;
    } else {
        $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n" . '</p>' . "\n" . $engine_plugin->getHtmlVariables();
    }
    return $html;
}
Example #4
0
/**
 * Get array of possible row formats
 *
 * @return array $possible_row_formats
 */
function PMA_getPossibleRowFormat()
{
    // the outer array is for engines, the inner array contains the dropdown
    // option values as keys then the dropdown option labels
    $possible_row_formats = array('ARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MYISAM' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'PBXT' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'INNODB' => array('COMPACT' => 'COMPACT', 'REDUNDANT' => 'REDUNDANT'));
    /** @var PMA_StorageEngine_Innodb $innodbEnginePlugin */
    $innodbEnginePlugin = PMA_StorageEngine::getEngine('innodb');
    $innodbPluginVersion = $innodbEnginePlugin->getInnodbPluginVersion();
    if (!empty($innodbPluginVersion)) {
        $innodb_file_format = $innodbEnginePlugin->getInnodbFileFormat();
    } else {
        $innodb_file_format = '';
    }
    if ('Barracuda' == $innodb_file_format && $innodbEnginePlugin->supportsFilePerTable()) {
        $possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC';
        $possible_row_formats['INNODB']['COMPRESSED'] = 'COMPRESSED';
    }
    return $possible_row_formats;
}
 /**
  * Constructor
  *
  * @param string $engine The engine ID
  */
 function __construct($engine)
 {
     $storage_engines = PMA_StorageEngine::getStorageEngines();
     if (!empty($storage_engines[$engine])) {
         $this->engine = $engine;
         $this->title = $storage_engines[$engine]['Engine'];
         $this->comment = isset($storage_engines[$engine]['Comment']) ? $storage_engines[$engine]['Comment'] : '';
         switch ($storage_engines[$engine]['Support']) {
             case 'DEFAULT':
                 $this->support = PMA_ENGINE_SUPPORT_DEFAULT;
                 break;
             case 'YES':
                 $this->support = PMA_ENGINE_SUPPORT_YES;
                 break;
             case 'DISABLED':
                 $this->support = PMA_ENGINE_SUPPORT_DISABLED;
                 break;
             case 'NO':
             default:
                 $this->support = PMA_ENGINE_SUPPORT_NO;
         }
     }
 }
           . '        </a></td>' . "\n"
           . '    <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
           . '</tr>' . "\n";
        $odd_row = !$odd_row;
    }
    unset($odd_row, $engine, $details);
    echo '</tbody>' . "\n"
       . '</table>' . "\n";

} else {

    /**
     * Displays details about a given Storage Engine
     */

    $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
    echo '<h2>' . "\n"
       . ($GLOBALS['cfg']['MainPageIconic']
            ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
                .' width="16" height="16" alt="" />' : '')
       . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
       . '    ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
       . '</h2>' . "\n\n";
    echo '<p>' . "\n"
       . '    <em>' . "\n"
       . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
       . '    </em>' . "\n"
       . '</p>' . "\n\n";
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        echo '<p>' . "\n"
 /**
  * Returns true if given engine name is supported/valid, otherwise false
  *
  * @param string $engine name of engine
  *
  * @static
  * @return boolean whether $engine is valid or not
  */
 public static function isValid($engine)
 {
     if ($engine == "PBMS") {
         return true;
     }
     $storage_engines = PMA_StorageEngine::getStorageEngines();
     return isset($storage_engines[$engine]);
 }
Example #8
0
    /**
     * shows/displays the HTML FORM to create the page
     *
     * @param string $db name of the selected database
     *
     * @return void
     * @access public
     */
    public function showCreatePageDialog($db)
    {
        ?>
        <form method="post" action="schema_edit.php" name="frm_create_page">
        <fieldset>
        <legend>
        <?php 
        echo __('Create a page') . "\n";
        ?>
        </legend>
        <?php 
        echo PMA_generate_common_hidden_inputs($db);
        ?>
        <input type="hidden" name="do" value="createpage" />
        <table>
        <tr>
        <td><label for="id_newpage"><?php 
        echo __('Page name');
        ?>
</label></td>
        <td><input type="text" name="newpage" id="id_newpage" size="20" maxlength="50" /></td>
        </tr>
        <tr>
        <td><?php 
        echo __('Automatic layout based on');
        ?>
</td>
        <td>
        <input type="checkbox" name="auto_layout_internal" id="id_auto_layout_internal" /><label for="id_auto_layout_internal">
        <?php 
        echo __('Internal relations');
        ?>
</label><br />
        <?php 
        /*
         * Check to see whether INNODB and PBXT storage engines are Available in MYSQL PACKAGE
         * If available, then provide AutoLayout for Foreign Keys in Schema View
         */
        if (PMA_StorageEngine::isValid('InnoDB') || PMA_StorageEngine::isValid('PBXT')) {
            ?>
            <input type="checkbox" name="auto_layout_foreign" id="id_auto_layout_foreign" /><label for="id_auto_layout_foreign">
            <?php 
            echo __('FOREIGN KEY');
            ?>
</label><br />
            <?php 
        }
        ?>
        </td></tr>
        </table>
        </fieldset>
        <fieldset class="tblFooters">
        <input type="submit" value="<?php 
        echo __('Go');
        ?>
" />
        </fieldset>
        </form>
        <?php 
    }
if (isset($auto_increment) && strlen($auto_increment) > 0 && ($is_myisam_or_maria || $is_innodb || $is_pbxt)) {
    ?>
    <tr><td><label for="auto_increment_opt">AUTO_INCREMENT</label></td>
        <td><input type="text" name="new_auto_increment" id="auto_increment_opt"
                value="<?php 
    echo $auto_increment;
    ?>
" /></td>
    </tr>
    <?php 
}
// end if (MYISAM|INNODB)
// the outer array is for engines, the inner array contains the dropdown
// option values as keys then the dropdown option labels
$possible_row_formats = array('MARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MYISAM' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'PBXT' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'INNODB' => array('COMPACT' => 'COMPACT', 'REDUNDANT' => 'REDUNDANT'));
$innodb_engine_plugin = PMA_StorageEngine::getEngine('innodb');
$innodb_plugin_version = $innodb_engine_plugin->getInnodbPluginVersion();
if (!empty($innodb_plugin_version)) {
    $innodb_file_format = $innodb_engine_plugin->getInnodbFileFormat();
} else {
    $innodb_file_format = '';
}
if ('Barracuda' == $innodb_file_format && $innodb_engine_plugin->supportsFilePerTable()) {
    $possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC';
    $possible_row_formats['INNODB']['COMPRESSED'] = 'COMPRESSED';
}
unset($innodb_engine_plugin, $innodb_plugin_version, $innodb_file_format);
// for MYISAM there is also COMPRESSED but it can be set only by the
// myisampack utility, so don't offer here the choice because if we
// try it inside an ALTER TABLE, MySQL (at least in 5.1.23-maria)
// does not return a warning
 /**
  * Test for PMA_getHtmlForSpecifiedServerEngines
  *
  * @return void
  */
 public function testPMAGetHtmlForSpecifiedServerEngines()
 {
     $_REQUEST['engine'] = "pbxt";
     $_REQUEST['page'] = "page";
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
     //test PMA_getHtmlForSpecifiedServerEngines
     $html = PMA_getHtmlForSpecifiedServerEngines();
     $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
     //validate 1: Engine title
     $this->assertContains(htmlspecialchars($engine_plugin->getTitle()), $html);
     //validate 2: Engine Mysql Help Page
     $this->assertContains(PMA_Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()), $html);
     //validate 3: Engine Comment
     $this->assertContains(htmlspecialchars($engine_plugin->getComment()), $html);
     //validate 4: Engine Info Pages
     $this->assertContains(__('Variables'), $html);
     $this->assertContains(PMA_URL_getCommon(array('engine' => $_REQUEST['engine'], 'page' => "Documentation")), $html);
     //validate 5: other items
     $this->assertContains(PMA_URL_getCommon(array('engine' => $_REQUEST['engine'])), $html);
     $this->assertContains($engine_plugin->getSupportInformationMessage(), $html);
     $this->assertContains($engine_plugin->getHtmlVariables(), $html);
 }
    if (PMA_MYSQL_INT_VERSION >= 40100) {
        echo '        <td width="25">&nbsp;</td>' . "\n" . '        <th>' . $strCollation . ':&nbsp;</th>' . "\n";
    }
    ?>
    </tr>
    <tr><td><input type="text" name="comment" size="40" maxlength="80"
                value="<?php 
    echo isset($comment) ? $comment : '';
    ?>
"
                class="textfield" />
        </td>
        <td width="25">&nbsp;</td>
        <td>
<?php 
    echo PMA_StorageEngine::getHtmlSelect('tbl_type', null, isset($GLOBALS['tbl_type']) ? $GLOBALS['tbl_type'] : null);
    ?>
        </td>
        <?php 
    if (PMA_MYSQL_INT_VERSION >= 40100) {
        echo '        <td width="25">&nbsp;</td>' . "\n" . '        <td>' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($tbl_collation) ? $tbl_collation : null, FALSE, 3) . '        </td>' . "\n";
    }
    ?>
    </tr>
    </table>
    <br />
    <?php 
}
// end if ($action == 'tbl_create.php')
?>
   var new_fields = document.getElementById('added_fields').value;
   var new_field_container = document.getElementById('table_columns');
   var new_field = '<?php echo preg_replace('|\s+|', ' ', preg_replace('|\'|', '\\\'', $new_field)); ?>';
   var i = 0;
   for (i = 0; i < new_fields; i++) {
       if (odd_row) {
           new_field_container.innerHTML += '<tr class="odd">' + new_field + '</tr>';
       } else {
           new_field_container.innerHTML += '<tr class="even">' + new_field + '</tr>';
       }
       odd_row = ! odd_row;
   }

   return true;
}
// ]]>
</script>
   <?php
}
*/
if ($action == 'tbl_create.php') {
    $html .= '<table>' . '<tr class="vtop">' . '<th>' . __('Table comments') . ':&nbsp;</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Storage Engine') . ':' . PMA_Util::showMySQLDocu('Storage_engines', 'Storage_engines') . '</th>' . '<td width="25">&nbsp;</td>' . '<th>' . __('Collation') . ':&nbsp;</th>' . '</tr>' . '<tr><td><input type="text" name="comment" size="40" maxlength="80"' . 'value="' . (isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']) : '') . '" class="textfield" />' . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_StorageEngine::getHtmlSelect('tbl_storage_engine', null, isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null) . '</td>' . '<td width="25">&nbsp;</td>' . '<td>' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, false, 3) . '</td>' . '</tr>';
    if (PMA_Partition::havePartitioning()) {
        $html .= '<tr class="vtop">' . '<th>' . __('PARTITION definition') . ':&nbsp;' . PMA_Util::showMySQLDocu('Partitioning', 'Partitioning') . '</th>' . '</tr>' . '<tr>' . '<td>' . '<textarea name="partition_definition" id="partitiondefinition"' . ' cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . ' rows="' . $GLOBALS['cfg']['TextareaRows'] . '"' . ' dir="' . $GLOBALS['text_dir'] . '">' . (isset($_REQUEST['partition_definition']) ? htmlspecialchars($_REQUEST['partition_definition']) : '') . '</textarea>' . '</td>' . '</tr>';
    }
    $html .= '</table>' . '<br />';
}
// end if ($action == 'tbl_create.php')
$html .= '<fieldset class="tblFooters">' . '<input type="submit" name="do_save_data" value="' . __('Save') . '" />' . '</fieldset>' . '<div id="properties_message"></div>' . '</form>';
$html .= '<div id="popup_background"></div>';
PMA_Response::getInstance()->addHTML($html);
<form method="post" action="pdf_pages.php" name="crpage">
    <fieldset>
     <legend>
    <?php 
    echo $strCreatePage . "\n";
    ?>
     </legend>
    <?php 
    echo PMA_generate_common_hidden_inputs($db, $table);
    ?>
    <input type="hidden" name="do" value="createpage" />
    <input type="text" name="newpage" size="20" maxlength="50" />
       <input type="checkbox" name="auto_layout_internal" />
<?php 
    echo '(' . $strAutomaticLayout . ' / ' . $strInternalRelations . ')';
    if (PMA_StorageEngine::isValid('InnoDB') || PMA_StorageEngine::isValid('PBXT')) {
        echo '<input type="checkbox" name="auto_layout_foreign" />' . '(' . $strAutomaticLayout . ' / FOREIGN KEY)';
    }
    ?>
        <input type="submit" value="<?php 
    echo $strGo;
    ?>
" />
    </fieldset>
</form>
    <?php 
    // Now if we already have chosen a page number then we should show the
    // tables involved
    if (isset($chpage) && $chpage > 0) {
        echo "\n";
        ?>
 /**
  * Test for PMA_StorageEngine::getEngine
  *
  * @param string $expectedClass Class that should be selected
  * @param string $engineName    Engine name
  *
  * @return void
  *
  * @dataProvider providerGetEngine
  */
 public function testGetEngine($expectedClass, $engineName)
 {
     $this->assertInstanceOf($expectedClass, PMA_StorageEngine::getEngine($engineName));
 }
        <th><?php 
    echo __('Collation');
    ?>
:&nbsp;</th>
    </tr>
    <tr><td><input type="text" name="comment" size="40" maxlength="80"
                value="<?php 
    echo isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']) : '';
    ?>
"
                class="textfield" />
        </td>
        <td width="25">&nbsp;</td>
        <td>
    <?php 
    echo PMA_StorageEngine::getHtmlSelect('tbl_type', null, isset($_REQUEST['tbl_type']) ? $_REQUEST['tbl_type'] : null);
    ?>
        </td>
        <td width="25">&nbsp;</td>
        <td>
    <?php 
    echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, false, 3);
    ?>
        </td>
    </tr>
    <?php 
    if (PMA_Partition::havePartitioning()) {
        ?>
    <tr valign="top">
        <th><?php 
        echo __('PARTITION definition');
 /**
  * shows/displays the HTML FORM to create the page
  *
  * @param string $db name of the selected database
  *
  * @return void
  * @access public
  */
 public function showCreatePageDialog($db)
 {
     $htmlString = '<form method="post" action="schema_edit.php"' . ' name="frm_create_page">' . '<fieldset>' . '<legend>' . __('Create a page') . '</legend>' . PMA_URL_getHiddenInputs($db) . '<input type="hidden" name="do" value="createpage" />' . '<table>' . '<tr>' . '<td><label for="id_newpage">' . __('Page name') . '</label></td>' . '<td>' . '<input type="text" name="newpage" id="id_newpage"' . ' size="20" maxlength="50" />' . '</td>' . '</tr>' . '<tr>' . __('Automatic layout based on') . '</td>' . '<td>' . '<input type="checkbox" name="auto_layout_internal"' . ' id="id_auto_layout_internal" /><label for="id_auto_layout_internal">' . __('Internal relations') . '</label><br />';
     /*
      * Check to see whether INNODB and PBXT storage engines
      * are Available in MYSQL PACKAGE
      * If available, then provide AutoLayout for Foreign Keys in Schema View
      */
     if (PMA_StorageEngine::isValid('InnoDB') || PMA_StorageEngine::isValid('PBXT')) {
         $htmlString .= '<input type="checkbox" name="auto_layout_foreign"' . ' id="id_auto_layout_foreign" />' . '<label for="id_auto_layout_foreign">' . __('FOREIGN KEY') . '</label><br />';
     }
     $htmlString .= '</td></tr>' . '</table>' . '</fieldset>' . '<fieldset class="tblFooters">' . '<input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
     echo $htmlString;
 }
Example #17
0
echo urlencode($comment);
?>
" />
        </td>
    </tr>

    <!-- Storage engine -->
    <tr><td><?php 
echo $strStorageEngine;
?>
            <?php 
echo PMA_showMySQLDocu('Storage_engines', 'Storage_engines');
?>
        </td>
        <td><?php 
echo PMA_StorageEngine::getHtmlSelect('new_tbl_type', null, $tbl_type);
?>
        </td>
    </tr>

<?php 
if (PMA_MYSQL_INT_VERSION >= 40100) {
    ?>
    <!-- Table character set -->
    <tr><td><?php 
    echo $strCollation;
    ?>
</td>
        <td><?php 
    echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, $tbl_collation, false, 3);
    ?>
Example #18
0
    $common_url = './server_engines.php?' . PMA_generate_common_url() . '&amp;engine=';
    foreach ($mysql_storage_engines as $engine => $details) {
        echo '        <tr' . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED' ? ' class="disabled"' : '') . '>' . "\n" . '            <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . '                <a href="' . $common_url . $engine . '">' . "\n" . '                    ' . htmlspecialchars($details['Engine']) . "\n" . '                </a>' . "\n" . '            </td>' . "\n";
        if (PMA_MYSQL_INT_VERSION >= 40102) {
            echo '            <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . '                ' . htmlspecialchars($details['Comment']) . "\n" . '            </td>' . "\n";
        }
        echo '        </tr>' . "\n";
        $useBgcolorOne = !$useBgcolorOne;
    }
    unset($useBgcolorOne, $common_url, $engine, $details);
    echo '    </tbody>' . "\n" . '</table>' . "\n";
} else {
    /**
     * Displays details about a given Storage Engine
     */
    $engine_plugin = PMA_StorageEngine::getEngine($engine);
    echo '<h2>' . "\n" . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 'b_engine.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '') . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n" . '</h2>' . "\n\n";
    if (PMA_MYSQL_INT_VERSION >= 40102) {
        echo '<p>' . "\n" . '    <i>' . "\n" . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n" . '    </i>' . "\n" . '</p>' . "\n\n";
    }
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        $common_url = './server_engines.php?' . PMA_generate_common_url() . '&amp;engine=' . urlencode($engine);
        echo '<p>' . "\n" . '    <b>[</b>' . "\n";
        if (empty($page)) {
            echo '    <b>' . $strServerTabVariables . '</b>' . "\n";
        } else {
            echo '    <a href="' . $common_url . '">' . $strServerTabVariables . '</a>' . "\n";
        }
        foreach ($infoPages as $current => $label) {
            echo '    <b>|</b>' . "\n";