diff options
-rwxr-xr-x | ChangeLog | 5 | ||||
-rw-r--r-- | browse_foreigners.php | 93 | ||||
-rw-r--r-- | css/phpmyadmin.css.php | 5 | ||||
-rw-r--r-- | db_printview.php | 12 | ||||
-rw-r--r-- | header_printview.inc.php | 2 | ||||
-rw-r--r-- | libraries/auth/config.auth.lib.php | 6 | ||||
-rw-r--r-- | libraries/auth/cookie.auth.lib.php | 18 | ||||
-rw-r--r-- | libraries/auth/http.auth.lib.php | 1 | ||||
-rw-r--r-- | libraries/common.lib.php | 92 | ||||
-rw-r--r-- | libraries/header_meta_style.inc.php | 10 | ||||
-rw-r--r-- | server_privileges.php | 16 | ||||
-rw-r--r-- | tbl_properties.inc.php | 82 | ||||
-rw-r--r-- | tbl_properties_structure.php | 2 | ||||
-rw-r--r-- | tbl_relation.php | 34 | ||||
-rw-r--r-- | themes.php | 2 | ||||
-rw-r--r-- | themes/original/css/theme_left.css.php | 3 | ||||
-rw-r--r-- | themes/original/css/theme_right.css.php | 36 |
17 files changed, 151 insertions, 268 deletions
@@ -7,6 +7,11 @@ $Source$ 2005-11-23 Sebastian Mendel <cybot_tm@users.sourceforge.net> * libraries/display_select_lang.lib.php: correct lang definition + * themes/original/*, libraries/auth/*.auth.lib.php, server_privilegs.php, + db_printview.php, tbl_properties_structure.php, tbl_properties.inc.php, + tbl_relation.php, browse_foreigners.php, css/phpmyadmin.css.php, + header_printview.inc.php, header_meta_style.inc.php, themes.php: + - drop PMA_setFontSizes() 2005-11-23 Michal ÄŒihaÅ™ <michal@cihar.com> * config.default.php, libraries/import/csv.php, libraries/import/ldi.php: diff --git a/browse_foreigners.php b/browse_foreigners.php index cb5c65371a..30738adc56 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -25,9 +25,6 @@ $field = urldecode($field); /** * Displays the frame */ -// Gets the font sizes to use -PMA_setFontSizes(); - $per_page = 200; require_once('./libraries/relation.lib.php'); // foreign keys require_once('./libraries/transformations.lib.php'); // Transformations @@ -49,7 +46,7 @@ require('./libraries/get_foreign.lib.php'); if (isset($pk)) { $pk_uri = '&pk=' . urlencode($pk); - ?> + ?> <input type="hidden" name="pk" value="<?php echo urlencode($pk); ?>" /> <?php } else { @@ -65,11 +62,11 @@ if (isset($disp_row) && is_array($disp_row)) { if ( $cfg['ShowAll'] && ($count > $per_page) ) { $showall = '<input type="submit" name="foreign_navig" value="' . $strShowAll . '" />'; } - + $session_max_rows = $per_page; $pageNow = @floor($pos / $session_max_rows) + 1; $nbTotalPage = @ceil($count / $session_max_rows); - + if ( $count > $per_page ) { $gotopage = PMA_pageselector( 'browse_foreigners.php?field=' . urlencode($field) . @@ -87,9 +84,9 @@ if (isset($disp_row) && is_array($disp_row)) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xml:lang="<?php echo $available_languages[$lang][2]; ?>" - lang="<?php echo $available_languages[$lang][2]; ?>" +<html xmlns="http://www.w3.org/1999/xhtml" + xml:lang="<?php echo $available_languages[$lang][2]; ?>" + lang="<?php echo $available_languages[$lang][2]; ?>" dir="<?php echo $text_dir; ?>"> <head> @@ -105,19 +102,19 @@ if (isset($disp_row) && is_array($disp_row)) { function formupdate( field, key ) { if (opener && opener.document && opener.document.insertForm) { var field = 'field_' + field; - - <?php if ( isset( $pk ) ) { ?> + + <?php if ( isset( $pk ) ) { ?> var element_name = field + '[multi_edit][<?php echo urlencode( $pk ); ?>][]'; - <?php } else { ?> + <?php } else { ?> var element_name = field + '[]'; - <?php } ?> - - <?php if ( isset( $fieldkey ) ) { ?> + <?php } ?> + + <?php if ( isset( $fieldkey ) ) { ?> var element_name_alt = field + '[<?php echo $fieldkey; ?>]'; - <?php } else { ?> + <?php } else { ?> var element_name_alt = field + '[0]'; - <?php } ?> - + <?php } ?> + if (opener.document.insertForm.elements[element_name]) { // Edit/Insert form opener.document.insertForm.elements[element_name].value = key; @@ -141,22 +138,22 @@ if (isset($disp_row) && is_array($disp_row)) { <form action="browse_foreigners.php" method="post"> <fieldset> -<?php echo PMA_generate_common_hidden_inputs( $db, $table ); ?> +<?php echo PMA_generate_common_hidden_inputs( $db, $table ); ?> <input type="hidden" name="field" value="<?php echo urlencode($field); ?>" /> <input type="hidden" name="fieldkey" value="<?php echo isset($fieldkey) ? $fieldkey : ''; ?>" /> -<?php if ( isset( $pk ) ) { ?> +<?php if ( isset( $pk ) ) { ?> <input type="hidden" name="pk" value="<?php echo urlencode($pk); ?>" /> -<?php } ?> +<?php } ?> <span class="formelement"> <label for="input_foreign_filter"><?php echo $strSearch . ':'; ?></label> <input type="text" name="foreign_filter" id="input_foreign_filter" value="<?php echo isset($foreign_filter) ? htmlspecialchars($foreign_filter) : ''; ?>" /> <input type="submit" name="submit_foreign_filter" value="<?php echo $strGo;?>" /> </span> <span class="formelement"> - <?php echo $gotopage; ?> + <?php echo $gotopage; ?> </span> <span class="formelement"> - <?php echo $showall; ?> + <?php echo $showall; ?> </span> </fieldset> </form> @@ -171,7 +168,7 @@ if (isset($disp_row) && is_array($disp_row)) { <th>' . $strDescription . '</th> <th>' . $strKeyname . '</th> </tr>'; - + echo '<thead>' . $header . '</thead>' . "\n" .'<tfoot>' . $header . '</tfoot>' . "\n" .'<tbody>' . "\n"; @@ -187,9 +184,9 @@ if (isset($disp_row) && is_array($disp_row)) { $keys[] = $relrow[$foreign_field]; } - + asort( $keys ); - + $hcount = 0; $odd_row = true; $val_ordered_current_row = 0; @@ -207,12 +204,12 @@ if (isset($disp_row) && is_array($disp_row)) { $key_ordered_current_key = $keys[$key_ordered_current_row]; $key_ordered_current_val = $values[$key_ordered_current_row]; - + $val_ordered_current_key = $keys[$val_ordered_current_row]; $val_ordered_current_val = $values[$val_ordered_current_row]; - + $val_ordered_current_row++; - + if (PMA_strlen( $val_ordered_current_val ) <= $cfg['LimitChars']) { $val_ordered_current_val = htmlspecialchars($val_ordered_current_val); $val_ordered_current_val_title = ''; @@ -233,29 +230,29 @@ if (isset($disp_row) && is_array($disp_row)) { htmlspecialchars( PMA_substr( $key_ordered_current_val, 0, $cfg['LimitChars'] ) . '...' ); } - + if ( ! empty( $data ) ) { $val_ordered_current_equals_data = $val_ordered_current_key == $data; $key_ordered_current_equals_data = $key_ordered_current_key == $data; } - ?> + ?> <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>"> <td nowrap="nowrap"> <?php - echo ($key_ordered_current_equals_data ? '<b>' : '') - .'<a href="#" title="' . $strUseThisValue + echo ($key_ordered_current_equals_data ? '<b>' : '') + .'<a href="#" title="' . $strUseThisValue . ($key_ordered_current_val_title != '' ? ': ' . $key_ordered_current_val_title : '') . '"' - .' onclick="formupdate(\'' . md5($field) . '\', \'' - . htmlspecialchars($key_ordered_current_key) . '\'); return false;">' + .' onclick="formupdate(\'' . md5($field) . '\', \'' + . htmlspecialchars($key_ordered_current_key) . '\'); return false;">' .htmlspecialchars($key_ordered_current_key) . '</a>' . ($key_ordered_current_equals_data ? '</b>' : ''); ?></td> <td> <?php echo ($key_ordered_current_equals_data ? '<b>' : '') - . '<a href="#" title="' . $strUseThisValue . ($key_ordered_current_val_title != '' ? ': ' - . $key_ordered_current_val_title : '') . '" onclick="formupdate(\'' - . md5($field) . '\', \'' . htmlspecialchars($key_ordered_current_key) . '\'); return false;">' + . '<a href="#" title="' . $strUseThisValue . ($key_ordered_current_val_title != '' ? ': ' + . $key_ordered_current_val_title : '') . '" onclick="formupdate(\'' + . md5($field) . '\', \'' . htmlspecialchars($key_ordered_current_key) . '\'); return false;">' . $key_ordered_current_val . '</a>' . ($key_ordered_current_equals_data ? '</b>' : ''); ?></td> <td width="20%"> @@ -264,25 +261,25 @@ if (isset($disp_row) && is_array($disp_row)) { <td> <?php - echo ($val_ordered_current_equals_data ? '<b>' : '') - . '<a href="#" title="' . $strUseThisValue . ($val_ordered_current_val_title != '' ? ': ' - . $val_ordered_current_val_title : '') . '" onclick="formupdate(\'' . md5($field) - . '\', \'' . htmlspecialchars($val_ordered_current_key) . '\'); return false;">' + echo ($val_ordered_current_equals_data ? '<b>' : '') + . '<a href="#" title="' . $strUseThisValue . ($val_ordered_current_val_title != '' ? ': ' + . $val_ordered_current_val_title : '') . '" onclick="formupdate(\'' . md5($field) + . '\', \'' . htmlspecialchars($val_ordered_current_key) . '\'); return false;">' . $val_ordered_current_val . '</a>' . ($val_ordered_current_equals_data ? '</b>' : ''); ?></td> <td nowrap="nowrap"> <?php - echo ($val_ordered_current_equals_data ? '<b>' : '') . '<a href="#" title="' - . $strUseThisValue . ($val_ordered_current_val_title != '' ? ': ' . $val_ordered_current_val_title : '') - . '" onclick="formupdate(\'' . md5($field) . '\', \'' - . htmlspecialchars($val_ordered_current_key) . '\'); return false;">' . htmlspecialchars($val_ordered_current_key) + echo ($val_ordered_current_equals_data ? '<b>' : '') . '<a href="#" title="' + . $strUseThisValue . ($val_ordered_current_val_title != '' ? ': ' . $val_ordered_current_val_title : '') + . '" onclick="formupdate(\'' . md5($field) . '\', \'' + . htmlspecialchars($val_ordered_current_key) . '\'); return false;">' . htmlspecialchars($val_ordered_current_key) . '</a>' . ($val_ordered_current_equals_data ? '</b>' : ''); ?></td> </tr> <?php } // end while } -?> +?> </tbody> </table> @@ -308,4 +305,4 @@ if (isset($cfg['OBGzip']) && $cfg['OBGzip'] && isset($ob_mode) && $ob_mode) { PMA_outBufferPost($ob_mode); } -?> +?> diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index e931c3a76a..efa3b3c8e9 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -15,11 +15,6 @@ if ( $GLOBALS['text_dir'] === 'ltr' ) { $left = 'right'; } -// Gets the default font sizes -// garvin: TODO: Should be optimized to not include the whole common.lib.php bunch -// but only functions used to determine browser heritage. -PMA_setFontSizes(); - // Send correct type: header('Content-Type: text/css; charset=ISO-8859-1'); diff --git a/db_printview.php b/db_printview.php index 9b35fb610d..e7de94c711 100644 --- a/db_printview.php +++ b/db_printview.php @@ -217,8 +217,8 @@ else { if (isset($sts_data['Create_time']) && !empty($sts_data['Create_time'])) { ?> <tr> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatCreateTime . ': '; ?></td> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Create_time'])); ?></td> + <td style="font-size: 80%" align="right"><?php echo $strStatCreateTime . ': '; ?></td> + <td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Create_time'])); ?></td> </tr> <?php } @@ -226,8 +226,8 @@ else { if (isset($sts_data['Update_time']) && !empty($sts_data['Update_time'])) { ?> <tr> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatUpdateTime . ': '; ?></td> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Update_time'])); ?></td> + <td style="font-size: 80%" align="right"><?php echo $strStatUpdateTime . ': '; ?></td> + <td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Update_time'])); ?></td> </tr> <?php } @@ -235,8 +235,8 @@ else { if (isset($sts_data['Check_time']) && !empty($sts_data['Check_time'])) { ?> <tr> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatCheckTime . ': '; ?></td> - <td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Check_time'])); ?></td> + <td style="font-size: 80%" align="right"><?php echo $strStatCheckTime . ': '; ?></td> + <td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Check_time'])); ?></td> </tr> <?php } diff --git a/header_printview.inc.php b/header_printview.inc.php index 59dca1abfd..0b60d54d65 100644 --- a/header_printview.inc.php +++ b/header_printview.inc.php @@ -28,8 +28,6 @@ require_once('./libraries/header_http.inc.php'); /** * Sends the beginning of the html page then returns to the calling script */ -// Gets the font sizes to use -PMA_setFontSizes(); // Defines the cell alignment values depending on text direction if ($text_dir == 'ltr') { $cell_align_left = 'left'; diff --git a/libraries/auth/config.auth.lib.php b/libraries/auth/config.auth.lib.php index 9ebef1adbe..322b5d33b1 100644 --- a/libraries/auth/config.auth.lib.php +++ b/libraries/auth/config.auth.lib.php @@ -44,7 +44,7 @@ function PMA_auth_check() function PMA_auth_set_user() { return TRUE; -} // end of the 'PMA_auth_set_user()' function +} // end of the 'PMA_auth_set_user()' function /** @@ -68,7 +68,7 @@ function PMA_auth_set_user() function PMA_auth_fails() { global $php_errormsg, $cfg; - global $right_font_family, $font_size, $font_bigger; + if (PMA_DBI_getError()) { $conn_error = PMA_DBI_getError(); } else if (isset($php_errormsg)) { @@ -109,7 +109,7 @@ function PMA_auth_fails() <?php // if we display the "Server not responding" error, do not confuse users - // by telling them they have a settings problem + // by telling them they have a settings problem // (note: it's true that they could have a badly typed host name, but // anyway the current $strAccessDeniedExplanation tells that the server // rejected the connection, which is not really what happened) diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 140b9cb58e..1467597e3a 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -13,9 +13,6 @@ if (!isset($coming_from_common)) { exit; } -// Gets the default font sizes -PMA_setFontSizes(); - // timestamp for login timeout $current_time = time(); @@ -63,10 +60,7 @@ function PMA_cookie_cmp(&$a, $b) */ function PMA_auth() { - global $right_font_family, $font_size, $font_bigger; - global $cfg, $available_languages; - global $lang, $server, $convcharset; - global $conn_error; + global $cfg, $lang, $server, $convcharset, $conn_error; // Tries to get the username from cookie whatever are the values of the // 'register_globals' and the 'variables_order' directives if last login @@ -515,14 +509,14 @@ function PMA_auth_set_user() } } // end if if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') { - header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php?' . - PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', - isset($GLOBALS['table']) ? $GLOBALS['table'] : '', + header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php?' . + PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', + isset($GLOBALS['table']) ? $GLOBALS['table'] : '', '&')); } else { - header( 'Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php?' - . PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', + header( 'Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php?' + . PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', isset($GLOBALS['table']) ? $GLOBALS['table'] : '', '&') . '&' . SID ); } exit(); diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 97ef3a3986..9a78047bbe 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -20,7 +20,6 @@ * @access public */ function PMA_auth() { - global $right_font_family, $font_size, $font_bigger; header('WWW-Authenticate: Basic realm="phpMyAdmin ' . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'',$GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose']))) . '"'); header('HTTP/1.0 401 Unauthorized'); diff --git a/libraries/common.lib.php b/libraries/common.lib.php index f5c23418da..499fa8e78f 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -13,9 +13,6 @@ * some functions need the constants of libraries/defines.lib.php * and defines_mysql.lib.php * - * the PMA_setFontSizes() function must be before the call to the - * libraries/auth/cookie.auth.lib.php library - * * the include of libraries/defines_mysql.lib.php must be after the connection * to db to get the MySql version * @@ -38,7 +35,6 @@ * - definition of PMA_format_sql() * - definition of PMA_mysqlDie() * - definition of PMA_isInto() - * - definition of PMA_setFontSizes() * - loading of an authentication library * - db connection * - authentication work @@ -1088,94 +1084,6 @@ function PMA_safe_db_list($only_db_check, $controllink, $dblist_cnt, $rs, $userl return $dblist; } -/** - * Determines the font sizes to use depending on the os and browser of the - * user. - * - * This function is based on an article from phpBuilder (see - * http://www.phpbuilder.net/columns/tim20000821.php). - * - * @return boolean always true - * - * @global string the standard font size - * @global string the font size for titles - * @global string the small font size - * @global string the smallest font size - * - * @access public - * - * @version 1.1 - */ -function PMA_setFontSizes() -{ - global $font_size, $font_biggest, $font_bigger, $font_smaller, $font_smallest; - - // IE (<7)/Opera (<7) for win case: needs smaller fonts than anyone else - if (PMA_USR_OS == 'Win' - && ((PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 7) - || (PMA_USR_BROWSER_AGENT == 'OPERA' && PMA_USR_BROWSER_VER < 7))) { - $font_size = 'x-small'; - $font_biggest = 'large'; - $font_bigger = 'medium'; - $font_smaller = '90%'; - $font_smallest = '7pt'; - } - // IE6 and other browsers for win case - else if (PMA_USR_OS == 'Win') { - $font_size = 'small'; - $font_biggest = 'large'; - $font_bigger = 'medium'; - $font_smaller = (PMA_USR_BROWSER_AGENT == 'IE') - ? '90%' - : 'x-small'; - $font_smallest = 'x-small'; - } - // Some mac browsers need also smaller default fonts size (OmniWeb & - // Opera)... - // and a beta version of Safari did also, but not the final 1.0 version - // so I remove || PMA_USR_BROWSER_AGENT == 'SAFARI' - // but we got a report that Safari 1.0 build 85.5 needs it! - - else if (PMA_USR_OS == 'Mac' - && (PMA_USR_BROWSER_AGENT == 'OMNIWEB' || PMA_USR_BROWSER_AGENT == 'OPERA' || PMA_USR_BROWSER_AGENT == 'SAFARI')) { - $font_size = 'x-small'; - $font_biggest = 'large'; - $font_bigger = 'medium'; - $font_smaller = '90%'; - $font_smallest = '7pt'; - } - // ... but most of them (except IE 5+ & NS 6+) need bigger fonts - else if ((PMA_USR_OS == 'Mac' - && ((PMA_USR_BROWSER_AGENT != 'IE' && PMA_USR_BROWSER_AGENT != 'MOZILLA') - || PMA_USR_BROWSER_VER < 5)) - || PMA_USR_BROWSER_AGENT == 'KONQUEROR' - || PMA_USR_BROWSER_AGENT == 'MOZILLA') { - $font_size = 'medium'; - $font_biggest = 'x-large'; - $font_bigger = 'large'; - $font_smaller = 'small'; - $font_smallest = 'x-small'; - } - // OS/2 browser - else if (PMA_USR_OS == 'OS/2' - && PMA_USR_BROWSER_AGENT == 'OPERA') { - $font_size = 'small'; - $font_biggest = 'medium'; - $font_bigger = 'medium'; - $font_smaller = 'x-small'; - $font_smallest = 'x-small'; - } - else { - $font_size = 'small'; - $font_biggest = 'large'; - $font_bigger = 'medium'; - $font_smaller = 'x-small'; - $font_smallest = 'x-small'; - } - - return TRUE; -} // end of the 'PMA_setFontSizes()' function - if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) { /** diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php index 0728def126..962f5616e0 100644 --- a/libraries/header_meta_style.inc.php +++ b/libraries/header_meta_style.inc.php @@ -5,8 +5,6 @@ /** * Sends the beginning of the html page then returns to the calling script */ -// Gets the font sizes to use -PMA_setFontSizes(); // Defines the cell alignment values depending on text direction if ($GLOBALS['text_dir'] == 'ltr') { $GLOBALS['cell_align_left'] = 'left'; @@ -25,10 +23,10 @@ echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">"; <head> <link rel="icon" href="./favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" /> -<title><?php - if(!empty($page_title)) - echo htmlspecialchars($page_title); - else +<title><?php + if(!empty($page_title)) + echo htmlspecialchars($page_title); + else echo 'phpMyAdmin'; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> diff --git a/server_privileges.php b/server_privileges.php index 711a76b2d4..dddf5d8ddb 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1382,7 +1382,7 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { uksort( $array_initials, "strnatcasecmp" ); - echo '<table cellspacing="5" style="font-size:' . $font_bigger . '"><tr>'; + echo '<table cellspacing="5"><tr>'; foreach ($array_initials as $tmp_initial => $initial_was_found) { if ($initial_was_found) { echo '<td><a href="' . $PHP_SELF . '?' . $GLOBALS['url_query'] . '&initial=' . urlencode($tmp_initial) . '">' . $tmp_initial . '</a></td>' . "\n"; @@ -1593,11 +1593,11 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { // table body // get data - + // we also want privielgs for this user not in table `db` but in other table $tables = PMA_DBI_fetch_result('SHOW TABLES FROM `mysql`;'); if ( empty( $dbname ) ) { - + // no db name given, so we want all privs for the given user $tables_to_search_for_users = array( @@ -1668,16 +1668,16 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { } PMA_DBI_free_result( $res ); unset( $row, $res ); - + } else { - + // db name was given, // so we want all user specific rights for this db - + $user_host_condition .= ' AND ' . PMA_convert_using('`Db`') .' LIKE ' . PMA_convert_using( $dbname, 'quoted' ); - + $tables_to_search_for_users = array( 'columns_priv', ); @@ -1724,7 +1724,7 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { } PMA_DBI_free_result( $db_rights_result ); unset( $db_rights_sql, $db_rights_sqls, $db_rights_result, $db_rights_row ); - + $sql_query = 'SELECT `Table_name`,' .' `Table_priv`,' diff --git a/tbl_properties.inc.php b/tbl_properties.inc.php index c724c4fac0..0d46617ff7 100644 --- a/tbl_properties.inc.php +++ b/tbl_properties.inc.php @@ -12,7 +12,7 @@ require_once('./libraries/mysql_charsets.lib.php'); require_once('./libraries/storage_engines.lib.php'); if ($cfg['CtrlArrowsMoving']) { - ?> + ?> <script src="libraries/keyhandler.js" type="text/javascript" language="javascript"></script> <script type="text/javascript" language="javascript"> <!-- @@ -21,13 +21,13 @@ document.onkeydown = onKeyDownArrowsHandler; // --> </script> <?php -} +} // here, the div_x_7 represents a div id which contains -// the default CURRENT TIMESTAMP checkbox and label +// the default CURRENT TIMESTAMP checkbox and label // and, field_x_7a represents the checkbox itself if (PMA_MYSQL_INT_VERSION >= 40102) { - ?> + ?> <script type="text/javascript" language="javascript"> <!-- function display_field_options(field_type, i) { @@ -41,48 +41,48 @@ function display_field_options(field_type, i) { } // --> </script> -<?php } ?> +<?php } ?> <form method="post" action="<?php echo $action; ?>" onsubmit="return checkTableEditForm(this, <?php echo $num_fields; ?>)" > <?php echo PMA_generate_common_hidden_inputs($db, $table); if ($action == 'tbl_create.php') { - ?> + ?> <input type="hidden" name="reload" value="1" /> <?php } elseif ($action == 'tbl_addfield.php') { - ?> + ?> <input type="hidden" name="field_where" value="<?php echo $field_where; ?>" /> <input type="hidden" name="after_field" value="<?php echo $after_field; ?>" /> <?php } if (isset($num_fields)) { - ?> + ?> <input type="hidden" name="orig_num_fields" value="<?php echo $num_fields; ?>" /> <?php } if (isset($field_where)) { - ?> + ?> <input type="hidden" name="orig_field_where" value="<?php echo $field_where; ?>" /> <?php } if (isset($after_field)) { - ?> + ?> <input type="hidden" name="orig_after_field" value="<?php echo $after_field; ?>" /> <?php } if (isset($selected) && is_array($selected)) { foreach ($selected AS $o_fld_nr => $o_fld_val) { - ?> + ?> <input type="hidden" name="selected[<?php echo $o_fld_nr; ?>]" value="<?php echo urlencode($o_fld_val); ?>" /> <?php if (!isset($true_selected)) { - ?> + ?> <input type="hidden" name="true_selected[<?php echo $o_fld_nr; ?>]" value="<?php echo urlencode($o_fld_val); ?>" /> <?php } @@ -91,14 +91,14 @@ if (isset($selected) && is_array($selected)) { if (isset($true_selected) && is_array($true_selected)) { foreach ($true_selected AS $o_fld_nr => $o_fld_val) { - ?> + ?> <input type="hidden" name="true_selected[<?php echo $o_fld_nr; ?>]" value="<?php echo urlencode($o_fld_val); ?>" /> <?php } } } elseif (isset($field)) { - ?> + ?> <input type="hidden" name="orig_field" value="<?php echo urlencode($field); ?>" /> <input type="hidden" name="true_selected[] value="<?php echo (isset($orig_field) ? $orig_field : urlencode($field)); ?>" /> <?php @@ -197,9 +197,9 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { $submit_length = (isset($field_length) && isset($field_length[$i]) ? $field_length[$i] : FALSE); $submit_attribute = (isset($field_attribute) && isset($field_attribute[$i]) ? $field_attribute[$i] : FALSE); - + $submit_default_current_timestamp = (isset($field_default_current_timestamp) && isset($field_default_current_timestamp[$i]) ? TRUE : FALSE); - + if (isset($field_comments) && isset($field_comments[$i])) { $comments_map[$row['Field']] = $field_comments[$i]; } @@ -329,7 +329,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { $ci++; } - $content_cells[$i][$ci] = '<select style="font-size: ' . $font_smallest . ';" name="field_attribute[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">' . "\n"; + $content_cells[$i][$ci] = '<select style="font-size: 70%;" name="field_attribute[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">' . "\n"; $attribute = ''; if ($binary) { @@ -361,9 +361,9 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { } if ((isset($row['Field']) && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['default_current_timestamp'])) || (isset($submit_default_current_timestamp) && $submit_default_current_timestamp) ) { - $default_current_timestamp = TRUE; + $default_current_timestamp = TRUE; } else { - $default_current_timestamp = FALSE; + $default_current_timestamp = FALSE; } // Dynamically add ON UPDATE CURRENT_TIMESTAMP to the possible attributes @@ -414,7 +414,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { } // for a TIMESTAMP, do not show CURRENT_TIMESTAMP as a default value - if (PMA_MYSQL_INT_VERSION >= 40102 + if (PMA_MYSQL_INT_VERSION >= 40102 && $type_upper == 'TIMESTAMP' && $default_current_timestamp && isset($row) @@ -434,7 +434,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { if ($default_current_timestamp) { $content_cells[$i][$ci] .= ' checked="checked" '; } - $content_cells[$i][$ci] .= ' /><label for="field_' . $i . '_' . ($ci - $ci_offset) . 'a" style="font-size: ' . $font_smallest . ';">CURRENT_TIMESTAMP</label></div>'; + $content_cells[$i][$ci] .= ' /><label for="field_' . $i . '_' . ($ci - $ci_offset) . 'a" style="font-size: 70%;">CURRENT_TIMESTAMP</label></div>'; } $ci++; @@ -545,17 +545,17 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { if ( is_array( $content_cells ) && is_array( $header_cells ) ) { // last row is for javascript insert $empty_row = array_pop( $content_cells ); - + echo '<table id="table_columns">'; if ( $cfg['DefaultPropDisplay'] == 'horizontal' ) { - ?> + ?> <tr> - <?php foreach ( $header_cells as $header_val ) { ?> + <?php foreach ( $header_cells as $header_val ) { ?> <th><?php echo $header_val; ?></th> <?php } ?> </tr> <?php - + $odd_row = true; foreach ( $content_cells as $content_row ) { echo '<tr class="' . ( $odd_row ? 'odd' : 'even' ) . '">'; @@ -563,7 +563,7 @@ if ( is_array( $content_cells ) && is_array( $header_cells ) ) { if ( is_array( $content_row ) ) { foreach ($content_row as $content_row_val) { - ?> + ?> <td align="center"><?php echo $content_row_val; ?></td> <?php } @@ -576,12 +576,12 @@ if ( is_array( $content_cells ) && is_array( $header_cells ) ) { foreach ( $header_cells as $header_val ) { echo '<tr class="' . ( $odd_row ? 'odd' : 'even' ) . '">'; $odd_row = ! $odd_row; - ?> + ?> <th><?php echo $header_val; ?></th> <?php foreach ( $content_cells as $content_cell ) { if ( isset( $content_cell[$i] ) && $content_cell[$i] != '' ) { - ?> + ?> <td><?php echo $content_cell[$i]; ?></td> <?php } @@ -590,7 +590,7 @@ if ( is_array( $content_cells ) && is_array( $header_cells ) ) { $i++; } } - ?> + ?> </table> <br /> <?php @@ -598,8 +598,8 @@ if ( is_array( $content_cells ) && is_array( $header_cells ) ) { /** * needs to be finished - * - * + * + * if ( $cfg['DefaultPropDisplay'] == 'horizontal' ) { $new_field = ''; foreach ( $empty_row as $content_row_val ) { @@ -613,7 +613,7 @@ var odd_row = <?php echo $odd_row; ?>; function addField() { 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 new_field = '<?php echo preg_replace( '°\s+°', ' ', preg_replace( '°\'°', '\\\'', $new_field ) ); ?>'; var i = 0; for ( i = 0; i < new_fields; i++ ) { if ( odd_row ) { @@ -623,17 +623,17 @@ function addField() { } odd_row = ! odd_row; } - + return true; } // --> -</script> +</script> <?php } */ if ($action == 'tbl_create.php') { - ?> + ?> <table> <tr valign="top"> <th><?php echo $strTableComments; ?>: </th> @@ -644,7 +644,7 @@ if ($action == 'tbl_create.php') { echo ' <td width="25"> </td>' . "\n" . ' <th>' . $strCollation . ': </th>' . "\n"; } - ?> + ?> </tr> <tr><td><input type="text" name="comment" size="40" maxlength="80" value="<?php echo (isset($comment) ? $comment : ''); ?>" @@ -661,13 +661,13 @@ if ($action == 'tbl_create.php') { . 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; ?>" /> @@ -679,7 +679,7 @@ if ($action == 'tbl_create.php') { <?php /* onclick="if ( addField() ) return false;" */ ?> onclick="return checkFormElementInRange(this.form, 'added_fields', '<?php echo str_replace('\'', '\\\'', $GLOBALS['strInvalidFieldAddCount']); ?>', 1)" /> -<?php } ?> +<?php } ?> </fieldset> </form> @@ -692,12 +692,12 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) echo '<p> <a name="footnoote_mime"><sup>3</sup></a> ' . $strMIME_transformation_options_note . '</p>'; echo '<p> '; printf( $strMIME_transformation_note, - '<a href="libraries/transformations/overview.php?' + '<a href="libraries/transformations/overview.php?' . PMA_generate_common_url($db, $table) . '" target="_blank">', '</a>' ); echo '</p>'; } -?> +?> </div> <center><?php echo PMA_showMySQLDocu('SQL-Syntax', 'CREATE_TABLE'); ?></center> diff --git a/tbl_properties_structure.php b/tbl_properties_structure.php index a88ce838e7..f02784f75d 100644 --- a/tbl_properties_structure.php +++ b/tbl_properties_structure.php @@ -336,7 +336,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { <th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $field_name; ?></label></th> <td<?php echo $type_nowrap; ?>><?php echo $type; echo $type_mime; ?><bdo dir="ltr"></bdo></td> <?php echo PMA_MYSQL_INT_VERSION >= 40100 ? ' <td>' . (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>') . '</td>' . "\n" : '' ?> - <td nowrap="nowrap" style="font-size: <?php echo $font_smallest; ?>"><?php echo $attribute; ?></td> + <td nowrap="nowrap" style="font-size: 70%"><?php echo $attribute; ?></td> <td><?php echo (($row['Null'] == 'YES') ? $strYes : $strNo); ?></td> <td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?></td> <td nowrap="nowrap"><?php echo $row['Extra']; ?></td> diff --git a/tbl_relation.php b/tbl_relation.php index 6962d9184a..fbe13520b8 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -40,12 +40,9 @@ $options_array = array('CASCADE' => 'CASCADE', 'SET_NULL' => 'SET NULL', 'NO_ACT * @access public */ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected_value) { - global $font_smallest; echo $dropdown_question . ' '; - //echo '<select name="' . $radio_name . '" style="font-size: ' . $font_smallest . '">' . "\n"; - //echo '<option value="nix" style="font-size: ' . $font_smallest . '" >--</option>' . "\n"; echo '<select name="' . $radio_name . '">' . "\n"; echo '<option value="nix">--</option>' . "\n"; @@ -54,7 +51,6 @@ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected if ($selected_value == $one_value) { echo ' selected="selected" '; } - //echo ' style="font-size: ' . $font_smallest . '">' echo '>' . $one_label . '</option>' . "\n"; } echo '</select>' . "\n"; @@ -369,10 +365,10 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { $save_row[] = $row; } $saved_row_cnt = count($save_row); - ?> + ?> <fieldset> <legend><?php echo $strLinksTo; ?></legend> - + <table> <tr><th></th> <?php @@ -390,19 +386,19 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { } echo '</th>'; } - ?> + ?> </tr> <?php $odd_row = true; for ($i = 0; $i < $saved_row_cnt; $i++) { $myfield = $save_row[$i]['Field']; - ?> + ?> <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>"> <td align="center"> <b><?php echo $save_row[$i]['Field']; ?></b></td> <?php - if ($cfgRelation['relwork']) { - ?> + if ($cfgRelation['relwork']) { + ?> <td><select name="destination[<?php echo htmlspecialchars($save_row[$i]['Field']); ?>]"> <?php // PMA internal relations @@ -433,7 +429,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { .' selected="selected"' .'>' . $foreign_field . '</option>'. "\n"; } - ?> + ?> </select> </td> <?php @@ -442,7 +438,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { if ($tbl_type=='INNODB') { echo '<td>'; if (!empty($save_row[$i]['Key'])) { - ?> + ?> <span class="formelement"> <select name="destination_innodb[<?php echo htmlspecialchars($save_row[$i]['Field']); ?>]"> <?php @@ -474,7 +470,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { echo '>' . $foreign_field . '</option>' . "\n"; } - ?> + ?> </select> </span> <span class="formelement"> @@ -497,18 +493,18 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { } // end if (a key exists) echo ' </td>'; } // end if (InnoDB) - ?> + ?> </tr> <?php } // end for - + echo ' </table>' . "\n"; echo '</fieldset>' . "\n"; - + if ($cfgRelation['displaywork']) { // Get "display_field" infos $disp = PMA_getDisplayField($db, $table); - ?> + ?> <fieldset> <label><?php echo $strChangeDisplay . ': '; ?></label> <select name="display_field" style="vertical-align: middle"> @@ -521,12 +517,12 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { } echo '>' . htmlspecialchars($row['Field']) . '</option>'. "\n"; } // end while - ?> + ?> </select> </fieldset> <?php } // end if (displayworks) - ?> + ?> <fieldset class="tblFooters"> <input type="submit" value="<?php echo $strSave; ?>" /> </fieldset> diff --git a/themes.php b/themes.php index ea0fcf81a5..368f8a6de5 100644 --- a/themes.php +++ b/themes.php @@ -9,8 +9,6 @@ require_once('./libraries/select_theme.lib.php'); /* set language and charset */ require_once('./libraries/header_http.inc.php'); -/* Gets the font sizes to use */ -PMA_setFontSizes(); /* HTML header */ $page_title = 'phpMyAdmin - ' . $strTheme; require('./libraries/header_meta_style.inc.php'); diff --git a/themes/original/css/theme_left.css.php b/themes/original/css/theme_left.css.php index 1d127e1b62..608a809c56 100644 --- a/themes/original/css/theme_left.css.php +++ b/themes/original/css/theme_left.css.php @@ -1,6 +1,5 @@ body, input, select { font-family: <?php echo $left_font_family; ?>; - font-size: <?php echo $font_size; ?>; color: #000000 } @@ -46,7 +45,7 @@ div#left_tableList { list-style-position: outside; margin: 0; padding: 0; - font-size: <?php echo $font_smaller; ?>; + font-size: 80%; } div#left_tableList a { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 1415bc8ad7..2e4559a908 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -8,7 +8,6 @@ body { margin: 0.5em; padding: 0; font-family: <?php echo $right_font_family; ?>; - font-size: <?php echo $font_size; ?>; color: #000000; <?php if ($GLOBALS['cfg']['RightBgImage'] == '') { @@ -22,20 +21,19 @@ body { background-color: <?php echo $GLOBALS['cfg']['RightBgColor'] . "\n"; ?> } -pre, tt {font-size: <?php echo $font_size; ?>} -th {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>} -td {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>} -form {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; padding: 0px; margin: 0px;} -input {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>} -input.textfield {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF} -select {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF} -textarea {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF} -h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold} -h2 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold} -h3 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold} -a:link {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF} -a:visited {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF} -a:hover {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: underline; color: #FF0000} +th {font-family: <?php echo $right_font_family; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>} +td {font-family: <?php echo $right_font_family; ?>; } +form {font-family: <?php echo $right_font_family; ?>; padding: 0px; margin: 0px;} +input {font-family: <?php echo $right_font_family; ?>; } +input.textfield {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF} +select {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF} +textarea {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF} +h1 {font-family: <?php echo $right_font_family; ?>; font-size: 140%; font-weight: bold} +h2 {font-family: <?php echo $right_font_family; ?>; font-size: 120%; font-weight: bold} +h3 {font-family: <?php echo $right_font_family; ?>; font-weight: bold} +a:link {font-family: <?php echo $right_font_family; ?>; text-decoration: none; color: #0000FF} +a:visited {font-family: <?php echo $right_font_family; ?>; text-decoration: none; color: #0000FF} +a:hover {font-family: <?php echo $right_font_family; ?>; text-decoration: underline; color: #FF0000} dfn {font-style: normal} dfn:hover {font-style: normal; cursor: help} @@ -71,14 +69,14 @@ button.mult_submit { visibility: inherit; cursor: move; position: absolute; - font-size: <?php echo $font_smaller; ?>; + font-size: 80%; border: 1px dashed #000000; } .print{font-family:arial;font-size:8pt;} /* MySQL Parser */ -.syntax {font-family: sans-serif; font-size: <?php echo $font_smaller; ?>;} +.syntax {font-family: sans-serif; font-size: 80%;} .syntax_comment { padding-left: 4pt; padding-right: 4pt;} .syntax_digit {} .syntax_digit_hex {} @@ -304,7 +302,7 @@ fieldset.confirmation legend { /* end messageboxes */ -.tblcomment {font-size: <?php echo $font_smallest; ?>; font-weight: normal; color: #000099; } +.tblcomment {font-size: 70%; font-weight: normal; color: #000099; } .tblHeaders { background-color: <?php echo $cfg['LeftBgColor']; ?>; @@ -364,7 +362,6 @@ img, input, select, button { /* disabled text */ .disabled, .disabled a:link, disabled a:active, .disabled a:visited { font-family: <?php echo $right_font_family; ?>; - font-size: <?php echo $font_size; ?>; color: #666666; } .disabled a:hover { @@ -393,7 +390,6 @@ tr.disabled td, td.disabled { border: 0.1em solid #000000; padding: 0.5em; font-family: <?php echo $right_font_family; ?>; - font-size: <?php echo $font_size; ?>; } fieldset { |