added htmlspecialchars()

This commit is contained in:
Sebastian Mendel
2005-11-22 12:14:59 +00:00
parent c4e1207e2c
commit 8cd4e67d59

View File

@@ -3,7 +3,7 @@
// vim: expandtab sw=4 ts=4 sts=4: // vim: expandtab sw=4 ts=4 sts=4:
/** /**
* theme test * theme test
* *
* @uses libraries/common.lib.php global fnctions * @uses libraries/common.lib.php global fnctions
* @uses libraries/select_theme.lib.php theme manager * @uses libraries/select_theme.lib.php theme manager
*/ */
@@ -31,20 +31,27 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
lang="<?php echo $lang_iso_code; ?>" lang="<?php echo $lang_iso_code; ?>"
dir="<?php echo $GLOBALS['text_dir']; ?>"> dir="<?php echo $GLOBALS['text_dir']; ?>">
<head> <head>
<title>phpMyAdmin <?php echo PMA_VERSION; ?> - <?php echo $HTTP_HOST; ?> - Theme Test</title> <title>phpMyAdmin <?php echo PMA_VERSION; ?> -
<?php echo htmlspecialchars( $HTTP_HOST ); ?> - Theme Test</title>
<meta http-equiv="Content-Type" <meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<link rel="stylesheet" type="text/css" href="../css/phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>" /> <link rel="stylesheet" type="text/css"
<link rel="stylesheet" type="text/css" href="../css/print.css?<?php echo PMA_generate_common_url(); ?>" media="print" /> href="../css/phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;js_frame=right" />
<script src="../libraries/functions.js" type="text/javascript" language="javascript"></script> <link rel="stylesheet" type="text/css" media="print"
href="../css/print.css?<?php echo PMA_generate_common_url(); ?>" />
<script src="../libraries/functions.js" type="text/javascript"
language="javascript"></script>
</head> </head>
<body> <body>
<?php <?php
$separator = ' <span class="separator"><img class="icon" src=../"' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n"; $separator = '<span class="separator">'
.'<img class="icon" src=../"' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png"'
.' width="5" height="9" alt="-" /></span>' . "\n";
$item = '<a href="%1$s?%2$s" class="item">' $item = '<a href="%1$s?%2$s" class="item">'
.' <img class="icon" src="../' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" /> ' . "\n" .' <img class="icon" src="../' . $GLOBALS['pmaThemeImage'] . '%5$s"'
.' width="16" height="16" alt="" /> ' . "\n"
.'%4$s: %3$s</a>' . "\n"; .'%4$s: %3$s</a>' . "\n";
echo '<div id="serverinfo">' . "\n"; echo '<div id="serverinfo">' . "\n";
@@ -68,8 +75,12 @@ printf( $item,
$GLOBALS['cfg']['DefaultTabTable'], $GLOBALS['cfg']['DefaultTabTable'],
'', '',
'Table', 'Table',
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']), (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png' ); ? $GLOBALS['strView']
: $GLOBALS['strTable']),
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']
? 'b_views'
: 's_tbl') . '.png' );
echo '<span class="table_comment" id="span_table_comment">' echo '<span class="table_comment" id="span_table_comment">'
.'&quot;Table comment&quot</span>' . "\n"; .'&quot;Table comment&quot</span>' . "\n";
@@ -135,17 +146,17 @@ echo PMA_getTabs( $tabs );
unset( $tabs ); unset( $tabs );
if ( @file_exists( $pmaThemeImage . 'logo_right.png') ) { if ( @file_exists( $pmaThemeImage . 'logo_right.png') ) {
?> ?>
<img id="pmalogoright" src="../<?php echo $pmaThemeImage; ?>logo_right.png" <img id="pmalogoright" src="../<?php echo $pmaThemeImage; ?>logo_right.png"
alt="phpMyAdmin" /> alt="phpMyAdmin" />
<?php <?php
} }
?> ?>
<h1> <h1>
<?php <?php
echo sprintf( $strWelcome, echo sprintf( $strWelcome,
'<bdo dir="ltr" xml:lang="en">phpMyAdmin ' . PMA_VERSION . '</bdo>'); '<bdo dir="ltr" xml:lang="en">phpMyAdmin ' . PMA_VERSION . '</bdo>');
?> ?>
</h1> </h1>
<hr class="clearfloat" /> <hr class="clearfloat" />
@@ -163,7 +174,7 @@ foreach ($available_themes_choices AS $cur_theme) {
if ( $cur_theme == $theme ) { if ( $cur_theme == $theme ) {
echo ' selected="selected"'; echo ' selected="selected"';
} }
echo '>' . htmlspecialchars( $available_themes_choices_names[$cur_theme] ) echo '>' . htmlspecialchars( $available_themes_choices_names[$cur_theme] )
. '</option>' . "\n"; . '</option>' . "\n";
} }
?> ?>
@@ -235,39 +246,55 @@ foreach ($available_themes_choices AS $cur_theme) {
</tfoot> </tfoot>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td><input type="checkbox" id="checkbox_1" name="checkbox_1" value="1" /></td> <td><input type="checkbox" id="checkbox_1" name="checkbox_1"
value="1" /></td>
<th><label for="checkbox_1">th label</label</th> <th><label for="checkbox_1">th label</label</th>
<td class="value">td.value</td> <td class="value">td.value</td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td>table.data tbody tr.odd td</td> <td>table.data tbody tr.odd td</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td><input type="checkbox" id="checkbox_2" name="checkbox_2" value="1" /></td> <td><input type="checkbox" id="checkbox_2" name="checkbox_2"
value="1" /></td>
<th><label for="checkbox_2">th label</label</th> <th><label for="checkbox_2">th label</label</th>
<td class="value">td.value</td> <td class="value">td.value</td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td>table.data tbody tr.even td</td> <td>table.data tbody tr.even td</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td><input type="checkbox" id="checkbox_3" name="checkbox_3" value="1" /></td> <td><input type="checkbox" id="checkbox_3" name="checkbox_3"
value="1" /></td>
<th><label for="checkbox_3">th label</label</th> <th><label for="checkbox_3">th label</label</th>
<td class="value">td.value</td> <td class="value">td.value</td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td>table.data tbody tr.odd td</td> <td>table.data tbody tr.odd td</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td><input type="checkbox" id="checkbox_4" name="checkbox_4" value="1" /></td> <td><input type="checkbox" id="checkbox_4" name="checkbox_4"
value="1" /></td>
<th><label for="checkbox_4">th label</label</th> <th><label for="checkbox_4">th label</label</th>
<td class="value">td.value</td> <td class="value">td.value</td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png" width="16" height="16" alt="drop" /></td> <td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td><img class="icon" src="../themes/original/img/bd_drop.png"
width="16" height="16" alt="drop" /></td>
<td>table.data tbody tr.even td</td> <td>table.data tbody tr.even td</td>
</tr> </tr>
</tbody> </tbody>