本文整理汇总了PHP中PMA_generateCharsetDropdownBox函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_generateCharsetDropdownBox函数的具体用法?PHP PMA_generateCharsetDropdownBox怎么用?PHP PMA_generateCharsetDropdownBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_generateCharsetDropdownBox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_generate_common_hidden_inputs
}
/**
* Change database charset
*/
echo '<form method="post" action="./db_operations.php">' . "\n"
. PMA_generate_common_hidden_inputs($db, $table)
. '<fieldset>' . "\n"
. ' <legend>';
if ($cfg['PropertiesIconic']) {
echo '<img class="icon" src="' . $pmaThemeImage . 's_asci.png"'
.' alt="" width="16" height="16" />';
}
echo ' <label for="select_db_collation">' . $strCollation . ':</label>' . "\n"
. ' </legend>' . "\n"
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION,
'db_collation', 'select_db_collation', $db_collation, false, 3)
. ' <input type="submit" name="submitcollation"'
. ' value="' . $strGo . '" style="vertical-align: middle" />' . "\n"
. '</fieldset>' . "\n"
. '</form>' . "\n";
if ($num_tables > 0
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
$message = PMA_Message::notice('strRelationNotWorking');
$message->addParam('<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', false);
$message->addParam('</a>', false);
/* Show error if user has configured something, notice elsewhere */
if (!empty($cfg['Servers'][$server]['pmadb'])) {
$message->isError(true);
}
$message->display();
示例2: PMA_printListItem
}
/**
* Displays the mysql server related links
*/
if ($server > 0) {
include_once 'libraries/check_user_privileges.lib.php';
// Logout for advanced authentication
if ($cfg['Server']['auth_type'] != 'config') {
if ($cfg['ShowChgPassword']) {
$conditional_class = 'ajax';
PMA_printListItem(PMA\libraries\Util::getImage('s_passwd.png') . " " . __('Change password'), 'li_change_password', 'user_password.php' . $common_url_query, null, null, 'change_password_anchor', "no_bullets", $conditional_class);
}
}
// end if
echo ' <li id="li_select_mysql_collation" class="no_bullets" >';
echo ' <form method="post" action="index.php">', "\n" . PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection') . ' <label for="select_collation_connection">' . "\n" . ' ' . PMA\libraries\Util::getImage('s_asci.png') . " " . __('Server connection collation') . "\n" . PMA\libraries\Util::showMySQLDocu('Charset-connection') . ': ' . "\n" . ' </label>' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, true) . ' </form>' . "\n" . ' </li>' . "\n";
}
// end of if ($server > 0)
echo '</ul>';
echo '</div>';
}
echo '<div class="group">';
echo '<h2>', __('Appearance settings'), '</h2>';
echo ' <ul>';
// Displays language selection combo
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
echo '<li id="li_select_lang" class="no_bullets">';
include_once 'libraries/display_select_lang.lib.php';
echo PMA\libraries\Util::getImage('s_lang.png'), " ", PMA_getLanguageSelectorHtml();
echo '</li>';
}
示例3: PMA_getTableOptionFieldset
/**
* Get HTML fieldset for Table option, it contains HTML table for options
*
* @param string $comment Comment
* @param array $tbl_collation table collation
* @param string $tbl_storage_engine table storage engine
* @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
* @param boolean $is_isam whether ISAM or not
* @param string $pack_keys pack keys
* @param string $delay_key_write delay key write
* @param string $auto_increment value of auto increment
* @param string $transactional value of transactional
* @param string $page_checksum value of page checksum
* @param boolean $is_innodb whether INNODB or not
* @param boolean $is_pbxt whether PBXT or not
* @param boolean $is_aria whether ARIA or not
* @param string $checksum the checksum
*
* @return string $html_output
*/
function PMA_getTableOptionFieldset($comment, $tbl_collation, $tbl_storage_engine, $is_myisam_or_aria, $is_isam, $pack_keys, $delay_key_write, $auto_increment, $transactional, $page_checksum, $is_innodb, $is_pbxt, $is_aria, $checksum)
{
$html_output = '<fieldset>' . '<legend>' . __('Table options') . '</legend>';
$html_output .= '<table>';
$html_output .= PMA_getHtmlForRenameTable();
$html_output .= PMA_getHtmlForTableComments($comment);
//Storage engine
$html_output .= '<tr><td class="vmiddle">' . __('Storage Engine') . ' ' . PMA\libraries\Util::showMySQLDocu('Storage_engines') . '</td>' . '<td>' . StorageEngine::getHtmlSelect('new_tbl_storage_engine', null, $tbl_storage_engine) . '</td>' . '</tr>';
//Table character set
$html_output .= '<tr><td class="vmiddle">' . __('Collation') . '</td>' . '<td>' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, $tbl_collation, false) . '</td>' . '</tr>';
// Change all Column collations
$html_output .= '<tr><td></td><td>' . '<input type="checkbox" name="change_all_collations" value="1" ' . 'id="checkbox_change_all_collations" />' . '<label for="checkbox_change_all_collations">' . __('Change all column collations') . '</label>' . '</td></tr>';
if ($is_myisam_or_aria || $is_isam) {
$html_output .= PMA_getHtmlForPackKeys($pack_keys);
}
// end if (MYISAM|ISAM)
if ($is_myisam_or_aria) {
$html_output .= PMA_getHtmlForTableRow('new_checksum', 'CHECKSUM', $checksum);
$html_output .= PMA_getHtmlForTableRow('new_delay_key_write', 'DELAY_KEY_WRITE', $delay_key_write);
}
// end if (MYISAM)
if ($is_aria) {
$html_output .= PMA_getHtmlForTableRow('new_transactional', 'TRANSACTIONAL', $transactional);
$html_output .= PMA_getHtmlForTableRow('new_page_checksum', 'PAGE_CHECKSUM', $page_checksum);
}
// end if (ARIA)
if (mb_strlen($auto_increment) > 0 && ($is_myisam_or_aria || $is_innodb || $is_pbxt)) {
$html_output .= '<tr><td class="vmiddle">' . '<label for="auto_increment_opt">AUTO_INCREMENT</label></td>' . '<td><input type="number" name="new_auto_increment" ' . 'id="auto_increment_opt"' . 'value="' . $auto_increment . '" /></td>' . '</tr> ';
}
// end if (MYISAM|INNODB)
$possible_row_formats = PMA_getPossibleRowFormat();
// 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
// (if the table was compressed, it can be seen on the Structure page)
if (isset($possible_row_formats[$tbl_storage_engine])) {
$current_row_format = mb_strtoupper($GLOBALS['showtable']['Row_format']);
$html_output .= '<tr><td class="vmiddle">' . '<label for="new_row_format">ROW_FORMAT</label></td>' . '<td>';
$html_output .= PMA\libraries\Util::getDropdown('new_row_format', $possible_row_formats[$tbl_storage_engine], $current_row_format, 'new_row_format');
$html_output .= '</td></tr>';
}
$html_output .= '</table>' . '</fieldset>';
return $html_output;
}
示例4: PMA_getHtmlForImportCharset
/**
* Prints Html For Display Import charset
*
* @return string
*/
function PMA_getHtmlForImportCharset()
{
global $cfg;
$html = ' <div class="formelementrow" id="charaset_of_file">';
// charset of file
if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE) {
$html .= '<label for="charset_of_file">' . __('Character set of the file:') . '</label>';
reset($cfg['AvailableCharsets']);
$html .= '<select id="charset_of_file" name="charset_of_file" size="1">';
foreach ($cfg['AvailableCharsets'] as $temp_charset) {
$html .= '<option value="' . htmlentities($temp_charset) . '"';
if (empty($cfg['Import']['charset']) && $temp_charset == 'utf-8' || $temp_charset == $cfg['Import']['charset']) {
$html .= ' selected="selected"';
}
$html .= '>' . htmlentities($temp_charset) . '</option>';
}
$html .= ' </select><br />';
} else {
$html .= '<label for="charset_of_file">' . __('Character set of the file:') . '</label>' . "\n";
$html .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', false);
}
// end if (recoding)
$html .= ' </div>';
return $html;
}
示例5: PMA_generate_common_hidden_inputs
echo $strGo;
?>
" />
</td>
</tr>
</form>
<?php
if (PMA_MYSQL_INT_VERSION >= 40101) {
// MySQL supports setting default charsets / collations for databases since
// version 4.1.1.
echo ' <!-- Change database charset -->' . "\n" . ' <tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>' . "\n" . ' <tr><td colspan="3" class="tblHeaders">';
if ($cfg['PropertiesIconic']) {
echo '<img src="' . $pmaThemeImage . 's_asci.png" border="0" width="16" height="16" hspace="2" align="middle" />';
}
echo ' <label for="select_db_collation">' . $strCollation . '</label>: ' . "\n" . ' </td></tr>' . "\n" . ' <form method="post" action="./db_operations.php">' . "\n" . ' <tr bgcolor="' . $cfg['BgcolorOne'] . '"><td colspan="2" nowrap="nowrap">' . PMA_generate_common_hidden_inputs($db, $table, 3) . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', $db_collation, FALSE, 3) . ' </td><td align="right">' . ' <input type="submit" name="submitcollation" value="' . $strGo . '" style="vertical-align: middle" />' . "\n" . ' </td></tr>' . "\n" . ' </form>' . "\n" . ' ' . "\n\n";
}
if ($num_tables > 0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
echo '<tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>' . '<tr><th colspan="3" class="tblHeadError"><div class="errorhead">' . $strError . '</div></th></tr>' . '<tr><td colspan="3" class="tblError">' . sprintf(wordwrap($strRelationNotWorking, 65, '<br />'), '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', '</a>') . '</td></tr>';
}
// end if
?>
</table>
<form method="post" action="pdf_schema.php">
<?php
// is this OK to check for 'class' support?
if ($num_tables > 0) {
$takeaway = $url_query . '&table=' . urlencode($table);
}
if ($cfgRelation['pdfwork'] && $num_tables > 0 || $num_tables > 0 && $cfgRelation['relwork'] && $cfgRelation['commwork'] && isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir'])) {
示例6: testPMAGetHtmlForSqlQueryFormUpload
/**
* Test for PMA_getHtmlForSqlQueryFormUpload
*
* @return void
*/
public function testPMAGetHtmlForSqlQueryFormUpload()
{
//Call the test function
$html = PMA_getHtmlForSqlQueryFormUpload();
//validate 1: Browse your computer
$this->assertContains(__('Browse your computer:'), $html);
//validate 2: $GLOBALS['max_upload_size']
$this->assertContains(PMA_Util::getFormattedMaximumUploadSize($GLOBALS['max_upload_size']), $html);
$this->assertContains(PMA_Util::generateHiddenMaxFileSize($GLOBALS['max_upload_size']), $html);
//validate 3: Dropdown Box
$this->assertContains(PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', null, 'utf8', false), $html);
}
示例7: PMA_getHtmlForSqlQueryFormUpload
/**
* return HTML for Sql Query Form Upload
*
* @return string
*
* @usedby PMA_getHtmlForSqlQueryForm()
*/
function PMA_getHtmlForSqlQueryFormUpload()
{
global $timeout_passed, $local_import_file;
$errors = array();
// we allow only SQL here
$matcher = '@\\.sql(\\.(' . PMA_supportedDecompressions() . '))?$@';
if (!empty($GLOBALS['cfg']['UploadDir'])) {
$files = PMA_getFileSelectOptions(PMA_Util::userDir($GLOBALS['cfg']['UploadDir']), $matcher, isset($timeout_passed) && $timeout_passed && isset($local_import_file) ? $local_import_file : '');
} else {
$files = '';
}
// start output
$html = '<fieldset id="">';
$html .= '<legend>';
$html .= __('Browse your computer:') . '</legend>';
$html .= '<div class="formelement">';
$html .= '<input type="file" name="sql_file" class="textfield" /> ';
$html .= PMA_Util::getFormattedMaximumUploadSize($GLOBALS['max_upload_size']);
// some browsers should respect this :)
$html .= PMA_Util::generateHiddenMaxFileSize($GLOBALS['max_upload_size']) . "\n";
$html .= '</div>';
if ($files === false) {
$errors[] = PMA_Message::error(__('The directory you set for upload work cannot be reached.'));
} elseif (!empty($files)) {
$html .= '<div class="formelement">';
$html .= '<strong>' . __('web server upload directory:') . '</strong>';
$html .= '<select size="1" name="sql_localfile">' . "\n";
$html .= '<option value="" selected="selected"></option>' . "\n";
$html .= $files;
$html .= '</select>' . "\n";
$html .= '</div>';
}
$html .= '<div class="clearfloat"></div>' . "\n";
$html .= '</fieldset>';
$html .= '<fieldset id="" class="tblFooters">';
$html .= __('Character set of the file:') . "\n";
$html .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', null, 'utf8', false);
$html .= '<input type="submit" name="SQL" value="' . __('Go') . '" />' . "\n";
$html .= '<div class="clearfloat"></div>' . "\n";
$html .= '</fieldset>';
foreach ($errors as $error) {
$html .= $error->getDisplay();
}
return $html;
}
示例8: while
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
}
echo ' </select>' . "\n" . ' ';
echo ' </td>' . "\n";
echo ' </tr>' . "\n";
} else {
if (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <tr bgcolor="' . $cfg['BgcolorTwo'] . '"><td' . $queryframe_thcolspan . '>' . "\n" . $strCharsetOfFile . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', NULL, 'utf8', FALSE) . ' </td>' . "\n" . ' </tr>' . "\n";
}
}
echo ' <tr bgcolor="' . $cfg['BgcolorTwo'] . '">' . "\n" . ' <td align="right"' . $queryframe_thcolspan . '><input type="submit" name="SQL" value="' . $strGo . '" /></td>' . "\n" . ' </tr>' . "\n\n";
}
// Bookmark Support
$bookmark_go = FALSE;
if (!isset($is_inside_querywindow) || isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && ($querydisplay_tab == 'history' || $querydisplay_tab == 'full')) {
if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
if (($bookmark_list = PMA_listBookmarks($db, $cfg['Bookmark'])) && count($bookmark_list) > 0) {
$form_items++;
echo ' <tr><td' . $queryframe_thcolspan . '><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>' . "\n";
echo ' <tr><td' . $queryframe_thcolspan . ' class="tblHeaders">' . "\n";
echo " " . (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && $querydisplay_tab == 'full' || !isset($is_inside_querywindow) ? "<i>{$strOr}</i>" : '') . " {$strBookmarkQuery}: \n";
echo ' </td></tr>' . "\n";
if (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) {
示例9: isset
<tr><td><input type="text" name="comment" size="40" maxlength="80"
value="<?php
echo isset($comment) ? $comment : '';
?>
"
class="textfield" />
</td>
<td width="25"> </td>
<td>
<?php
echo PMA_generateEnginesDropdown('tbl_type', null, FALSE, isset($GLOBALS['tbl_type']) ? $GLOBALS['tbl_type'] : null, 3);
?>
</td>
<?php
if (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <td width="25"> </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')
?>
<fieldset class="tblFooters">
<input type="submit" name="do_save_data" value="<?php
echo $strSave;
?>
" />
示例10: PMA_RTN_getEditorForm
//.........这里部分代码省略.........
$retval .= PMA_RTN_getParameterRow($routine, $i, $isprocedure_class);
}
$retval .= " </table>\n";
$retval .= " </td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td> </td>\n";
$retval .= " <td>\n";
$retval .= " <input style='width: 49%;' type='submit' \n";
$retval .= " name='routine_addparameter'\n";
$retval .= " value='" . __('Add parameter') . "' />\n";
$retval .= " <input style='width: 49%;{$disable_remove_parameter}'\n";
$retval .= " type='submit' \n";
$retval .= " name='routine_removeparameter'\n";
$retval .= " value='" . __('Remove last parameter') . "' />\n";
$retval .= " </td>\n";
$retval .= "</tr>\n";
// parameter handling end
$retval .= "<tr class='routine_return_row{$isfunction_class}'>\n";
$retval .= " <td>" . __('Return type') . "</td>\n";
$retval .= " <td><select name='item_returntype'>\n";
$retval .= PMA_CommonFunctions::getInstance()->getSupportedDatatypes(true, $routine['item_returntype']) . "\n";
$retval .= " </select></td>\n";
$retval .= "</tr>\n";
$retval .= "<tr class='routine_return_row{$isfunction_class}'>\n";
$retval .= " <td>" . __('Return length/values') . "</td>\n";
$retval .= " <td><input type='text' name='item_returnlength'\n";
$retval .= " value='{$routine['item_returnlength']}' /></td>\n";
$retval .= " <td class='hide no_len'>---</td>\n";
$retval .= "</tr>\n";
$retval .= "<tr class='routine_return_row{$isfunction_class}'>\n";
$retval .= " <td>" . __('Return options') . "</td>\n";
$retval .= " <td><div>\n";
$retval .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, "item_returnopts_text", null, $routine['item_returnopts_text']);
$retval .= "\n </div>\n";
$retval .= " <div><select name='item_returnopts_num'>\n";
$retval .= " <option value=''></option>";
foreach ($param_opts_num as $key => $value) {
$selected = "";
if (!empty($routine['item_returnopts_num']) && $routine['item_returnopts_num'] == $value) {
$selected = " selected='selected'";
}
$retval .= "<option{$selected}>{$value}</option>";
}
$retval .= "\n </select></div>\n";
$retval .= " <div class='hide no_opts'>---</div>\n";
$retval .= "</td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('Definition') . "</td>\n";
$retval .= " <td><textarea name='item_definition' rows='15' cols='40'>";
$retval .= $routine['item_definition'];
$retval .= "</textarea></td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('Is deterministic') . "</td>\n";
$retval .= " <td><input type='checkbox' name='item_isdeterministic'{$routine['item_isdeterministic']} /></td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('Definer') . "</td>\n";
$retval .= " <td><input type='text' name='item_definer'\n";
$retval .= " value='{$routine['item_definer']}' /></td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('Security type') . "</td>\n";
$retval .= " <td><select name='item_securitytype'>\n";
示例11: PMA_getTableOptionFieldset
/**
* Get HTML fieldset for Table option, it contains HTML table for options
*
* @param string $comment Comment
* @param array $tbl_collation table collation
* @param string $tbl_storage_engine table storage engine
* @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
* @param boolean $is_isam whether ISAM or not
* @param array $pack_keys pack keys
* @param string $delay_key_write delay key write
* @param string $auto_increment value of auto increment
* @param string $transactional value of transactional
* @param string $page_checksum value of page checksum
* @param boolean $is_innodb whether INNODB or not
* @param boolean $is_pbxt whether PBXT or not
* @param boolean $is_aria whether ARIA or not
* @param string $checksum the checksum
*
* @return string $html_output
*/
function PMA_getTableOptionFieldset($comment, $tbl_collation, $tbl_storage_engine, $is_myisam_or_aria, $is_isam, $pack_keys, $delay_key_write, $auto_increment, $transactional, $page_checksum, $is_innodb, $is_pbxt, $is_aria, $checksum)
{
$html_output = '<fieldset>' . '<legend>' . __('Table options') . '</legend>';
$html_output .= '<table>';
//Change table name
$html_output .= '<tr><td>' . __('Rename table to') . '</td>' . '<td>' . '<input type="text" size="20" name="new_name" onfocus="this.select()"' . 'value="' . htmlspecialchars($GLOBALS['table']) . '" required="required" />' . '</td>' . '</tr>';
//Table comments
$html_output .= '<tr><td>' . __('Table comments') . '</td>' . '<td><input type="text" name="comment" maxlength="60" size="30"' . 'value="' . htmlspecialchars($comment) . '" onfocus="this.select()" />' . '<input type="hidden" name="prev_comment" value="' . htmlspecialchars($comment) . '" />' . '</td>' . '</tr>';
//Storage engine
$html_output .= '<tr><td>' . __('Storage Engine') . PMA_Util::showMySQLDocu('Storage_engines') . '</td>' . '<td>' . PMA_StorageEngine::getHtmlSelect('new_tbl_storage_engine', null, $tbl_storage_engine) . '</td>' . '</tr>';
//Table character set
$html_output .= '<tr><td>' . __('Collation') . '</td>' . '<td>' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, $tbl_collation, false, 3) . '</td>' . '</tr>';
if ($is_myisam_or_aria || $is_isam) {
$html_output .= '<tr>' . '<td><label for="new_pack_keys">PACK_KEYS</label></td>' . '<td><select name="new_pack_keys" id="new_pack_keys">';
$html_output .= '<option value="DEFAULT"';
if ($pack_keys == 'DEFAULT') {
$html_output .= 'selected="selected"';
}
$html_output .= '>DEFAULT</option>
<option value="0"';
if ($pack_keys == '0') {
$html_output .= 'selected="selected"';
}
$html_output .= '>0</option>
<option value="1" ';
if ($pack_keys == '1') {
$html_output .= 'selected="selected"';
}
$html_output .= '>1</option>' . '</select>' . '</td>' . '</tr>';
}
// end if (MYISAM|ISAM)
if ($is_myisam_or_aria) {
$html_output .= PMA_getHtmlForTableRow('new_checksum', 'CHECKSUM', $checksum);
$html_output .= PMA_getHtmlForTableRow('new_delay_key_write', 'DELAY_KEY_WRITE', $delay_key_write);
}
// end if (MYISAM)
if ($is_aria) {
$html_output .= PMA_getHtmlForTableRow('new_transactional', 'TRANSACTIONAL', $transactional);
$html_output .= PMA_getHtmlForTableRow('new_page_checksum', 'PAGE_CHECKSUM', $page_checksum);
}
// end if (ARIA)
/** @var PMA_String $pmaString */
$pmaString = $GLOBALS['PMA_String'];
if ($pmaString->strlen($auto_increment) > 0 && ($is_myisam_or_aria || $is_innodb || $is_pbxt)) {
$html_output .= '<tr><td>' . '<label for="auto_increment_opt">AUTO_INCREMENT</label></td>' . '<td><input type="number" name="new_auto_increment" ' . 'id="auto_increment_opt"' . 'value="' . $auto_increment . '" /></td>' . '</tr> ';
}
// end if (MYISAM|INNODB)
$possible_row_formats = PMA_getPossibleRowFormat();
// 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
// (if the table was compressed, it can be seen on the Structure page)
if (isset($possible_row_formats[$tbl_storage_engine])) {
$current_row_format = $pmaString->strtoupper($GLOBALS['showtable']['Row_format']);
$html_output .= '<tr><td>' . '<label for="new_row_format">ROW_FORMAT</label></td>' . '<td>';
$html_output .= PMA_Util::getDropdown('new_row_format', $possible_row_formats[$tbl_storage_engine], $current_row_format, 'new_row_format');
$html_output .= '</td></tr>';
}
$html_output .= '</table>' . '</fieldset>';
return $html_output;
}
示例12: __
*
* @package PhpMyAdmin
*/
if (!defined('PHPMYADMIN')) {
exit;
}
/**
*
*/
require_once './libraries/check_user_privileges.lib.php';
if ($is_create_db_priv) {
// The user is allowed to create a db
$html .= '<form method="post" action="db_create.php"' . ' id="create_database_form" class="ajax"><strong>';
$html .= '<label for="text_create_db">' . PMA_Util::getImage('b_newdb.png') . " " . __('Create database') . '</label> ' . PMA_Util::showMySQLDocu('CREATE_DATABASE');
$html .= '</strong><br />';
$html .= PMA_URL_getHiddenInputs('', '', 5);
$html .= '<input type="hidden" name="reload" value="1" />';
$html .= '<input type="text" name="new_db" value="' . $db_to_create . '" maxlength="64" class="textfield" id="text_create_db" ' . 'required placeholder="' . __('Database name') . '"/>';
include_once './libraries/mysql_charsets.inc.php';
$html .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, true);
if (!empty($dbstats)) {
$html .= '<input type="hidden" name="dbstats" value="1" />';
}
$html .= '<input type="submit" value="' . __('Create') . '" id="buttonGo" />';
$html .= '</form>';
} else {
$html .= '<!-- db creation no privileges message -->';
$html .= '<strong>' . __('Create database:') . ' ' . PMA_Util::showMySQLDocu('CREATE_DATABASE') . '</strong><br />';
$html .= '<span class="noPrivileges">' . PMA_Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) . '' . __('No Privileges') . '</span>';
}
// end create db form or message
示例13: preg_replace
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') . ': </th>' . '<td width="25"> </td>' . '<th>' . __('Storage Engine') . ':' . PMA_Util::showMySQLDocu('Storage_engines', 'Storage_engines') . '</th>' . '<td width="25"> </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"> </td>' . '<td>' . PMA_StorageEngine::getHtmlSelect('tbl_storage_engine', null, isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null) . '</td>' . '<td width="25"> </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') . ': ' . 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);
示例14: testGenerateCharsetDropdownBox
/**
* Test for PMA_generateCharsetDropdownBox
*
* @return void
* @test
*/
public function testGenerateCharsetDropdownBox()
{
$GLOBALS['mysql_charsets'] = array('latin1', 'latin2', 'latin3');
$GLOBALS['mysql_charsets_available'] = array('latin1' => true, 'latin2' => false, 'latin3' => true);
$GLOBALS['mysql_charsets_descriptions'] = array('latin1' => 'abc', 'latin2' => 'def');
$GLOBALS['mysql_collations'] = array('latin1' => array('latin1_german1_ci', 'latin1_swedish1_ci'), 'latin2' => array('latin1_general_ci'), 'latin3' => array());
$GLOBALS['mysql_collations_available'] = array('latin1_german1_ci' => true, 'latin1_swedish1_ci' => false, 'latin2_general_ci' => true);
$result = PMA_generateCharsetDropdownBox();
$this->assertContains('name="collation"', $result);
$this->assertNotContains('id="', $result);
$this->assertNotContains('class="autosubmit"', $result);
$this->assertContains('<option value="">Collation', $result);
$this->assertContains('<option value=""></option>', $result);
$this->assertContains('<optgroup label="latin1', $result);
$this->assertNotContains('<optgroup label="latin2', $result);
$this->assertContains('title="latin3', $result);
$this->assertContains('title="abc', $result);
$this->assertNotContains('value="latin1_swedish1_ci"', $result);
$this->assertContains('value="latin1_german1_ci"', $result);
$this->assertNotContains('value="latin2_general1_ci"', $result);
$this->assertContains('title="German', $result);
$result = PMA_generateCharsetDropdownBox(2, null, "test_id", "latin1", false, true);
$this->assertContains('name="character_set"', $result);
$this->assertNotContains('Charset</option>', $result);
$this->assertContains('class="autosubmit"', $result);
$this->assertContains('id="test_id"', $result);
$this->assertContains('selected="selected">latin1', $result);
}
示例15: PMA_getHTMLforAddNewColumn
/**
* build html for adding a new user defined column to central list
*
* @param string $db current database
*
* @return string html of the form to let user add a new user defined column to the
* list
*/
function PMA_getHTMLforAddNewColumn($db)
{
$addNewColumn = '<div id="add_col_div"><a href="#">' . '<span>+</span> ' . __('Add new column') . '</a>' . '<form id="add_new" style="min-width:100%;display:none" ' . 'method="post" action="db_central_columns.php">' . PMA_URL_getHiddenInputs($db) . '<input type="hidden" name="add_new_column" value="add_new_column">' . '<table>';
$addNewColumn .= PMA_getCentralColumnsTableHeader();
$addNewColumn .= '<tr>' . '<td></td>' . '<td name="col_name" class="nowrap">' . PMA\libraries\Template::get('columns_definitions/column_name')->render(array('columnNumber' => 0, 'ci' => 0, 'ci_offset' => 0, 'columnMeta' => array(), 'cfgRelation' => array('centralcolumnswork' => false))) . '</td>' . '<td name = "col_type" class="nowrap">' . PMA\libraries\Template::get('columns_definitions/column_type')->render(array('columnNumber' => 0, 'ci' => 1, 'ci_offset' => 0, 'type_upper' => '', 'columnMeta' => array())) . '</td>' . '<td class="nowrap" name="col_length">' . PMA\libraries\Template::get('columns_definitions/column_length')->render(array('columnNumber' => 0, 'ci' => 2, 'ci_offset' => 0, 'length_values_input_size' => 8, 'length_to_display' => '')) . '</td>' . '<td class="nowrap" name="col_default">' . PMA\libraries\Template::get('columns_definitions/column_default')->render(array('columnNumber' => 0, 'ci' => 3, 'ci_offset' => 0, 'type_upper' => '', 'columnMeta' => array())) . '</td>' . '<td name="collation" class="nowrap">' . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'field_collation[0]', 'field_0_4', null, false) . '</td>' . '<td class="nowrap" name="col_attribute">' . PMA\libraries\Template::get('columns_definitions/column_attribute')->render(array('columnNumber' => 0, 'ci' => 5, 'ci_offset' => 0, 'extracted_columnspec' => array(), 'columnMeta' => array(), 'submit_attribute' => false)) . '</td>' . '<td class="nowrap" name="col_isNull">' . PMA\libraries\Template::get('columns_definitions/column_null')->render(array('columnNumber' => 0, 'ci' => 6, 'ci_offset' => 0, 'columnMeta' => array())) . '</td>' . '<td class="nowrap" name="col_extra">' . PMA\libraries\Template::get('columns_definitions/column_extra')->render(array('columnNumber' => 0, 'ci' => 7, 'ci_offset' => 0, 'columnMeta' => array())) . '</td>' . ' <td>' . '<input id="add_column_save" type="submit" ' . ' value="Save"/></td>' . '</tr>';
$addNewColumn .= '</table></form></div>';
return $addNewColumn;
}