Esempio n. 1
0
 function testGetDbLinkWithSpecialChars()
 {
     global $cfg;
     $database = 'test&data\'base';
     $this->assertEquals(
         '<a href="' . $cfg['DefaultTabDatabase'] . '?db='
         . htmlspecialchars(urlencode($database))
         . '&amp;server=99&amp;lang=en&amp;token=token" title="Jump to database &quot;'
         . htmlspecialchars($database) . '&quot;.">'
         . htmlspecialchars($database) . '</a>', PMA_getDbLink($database)
     );
 }
} // end foreach
unset($i, $max_position, $chunk, $pattern);
*/
?>
<form method="post" action="tbl_create.php"
    onsubmit="return (emptyFormElements(this, 'table') &amp;&amp; checkFormElementInRange(this, 'num_fields', '<?php 
echo str_replace('\'', '\\\'', $GLOBALS['strInvalidFieldCount']);
?>
', 1))">
<fieldset>
    <legend>
<?php 
if ($GLOBALS['cfg']['PropertiesIconic']) {
    echo '<img class="icon" src="' . $pmaThemeImage . 'b_newtbl.png" width="16" height="16" alt="" />';
}
echo sprintf($strCreateNewTable, PMA_getDbLink());
?>
    </legend>
<?php 
if ($is_create_table_priv) {
    ?>
    <?php 
    echo PMA_generate_common_hidden_inputs($db);
    ?>
    <div class="formelement">
        <?php 
    echo $strName;
    ?>
:
        <input type="text" name="table" maxlength="64" size="30" />
    </div>
echo $strTableListOptions;
?>
            </select>
        </fieldset>
        <fieldset class="tblFooters">
            <input type="submit" name="modify" value="<?php 
echo $strUpdateQuery;
?>
" />
        </fieldset>
    </td>
    <td width="20">&nbsp;</td>
    <td>
        <fieldset>
            <legend><?php 
echo sprintf($strQueryOnDb, PMA_getDbLink($db));
?>
                </legend>
            <textarea cols="30" name="sql_query" id="textSqlquery"
                rows="<?php 
echo $numTableListOptions > 30 ? '15' : '7';
?>
"
                dir="<?php 
echo $text_dir;
?>
">
<?php 
// 1. SELECT
$last_select = 0;
$encoded_qry = '';
 *
 */
require_once './libraries/check_user_privileges.lib.php';
$is_create_table_priv = true;
?>
    <form id="create_table_form_minimal" method="post" action="tbl_create.php"<?php 
echo $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '';
?>
>
<fieldset>
    <legend>
<?php 
if ($GLOBALS['cfg']['PropertiesIconic']) {
    echo '<img class="icon" src="' . $pmaThemeImage . 'b_newtbl.png" width="16" height="16" alt="" />';
}
echo sprintf(__('Create table on database %s'), PMA_getDbLink());
?>
    </legend>
    <?php 
echo PMA_generate_common_hidden_inputs($db);
?>
    <div class="formelement">
        <?php 
echo __('Name');
?>
:
        <input type="text" name="table" maxlength="64" size="30" />
    </div>
    <div class="formelement">
        <?php 
echo __('Number of columns');
Esempio n. 5
0
    $numTableListOptions++;
}
?>
            <select name="TableList[]" multiple="multiple" id="listTable"
                size="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>">
                <?php echo $strTableListOptions; ?>
            </select>
        </fieldset>
        <fieldset class="tblFooters">
            <input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" />
        </fieldset>
    </td>
    <td width="20">&nbsp;</td>
    <td>
        <fieldset>
            <legend><?php echo sprintf($strQueryOnDb, PMA_getDbLink($db)); ?>
                </legend>
            <textarea cols="80" name="sql_query" id="textSqlquery"
                rows="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>"
                dir="<?php echo $text_dir; ?>">
<?php
// 1. SELECT
$last_select = 0;
if (!isset($qry_select)) {
    $qry_select         = '';
}
for ($x = 0; $x < $col; $x++) {
    if (!empty($curField[$x]) && isset($curShow[$x]) && $curShow[$x] == 'on') {
        if ($last_select) {
            $qry_select .=  ', ';
        }
echo $options;
?>
            </select>
        </fieldset>
        <fieldset class="tblFooters">
            <input type="submit" name="modify" value="<?php 
echo __('Update Query');
?>
" />
        </fieldset>
    </td>
    <td width="20">&nbsp;</td>
    <td>
        <fieldset>
            <legend><?php 
echo sprintf(__('SQL query on database <b>%s</b>:'), PMA_getDbLink($db));
?>
                </legend>
            <textarea cols="80" name="sql_query" id="textSqlquery"
                rows="<?php 
echo $numTableListOptions > 30 ? '15' : '7';
?>
"
                dir="<?php 
echo $text_dir;
?>
">
<?php 
// 1. SELECT
$last_select = 0;
if (!isset($qry_select)) {