当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_generateHiddenMaxFileSize函数代码示例

本文整理汇总了PHP中PMA_generateHiddenMaxFileSize函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_generateHiddenMaxFileSize函数的具体用法?PHP PMA_generateHiddenMaxFileSize怎么用?PHP PMA_generateHiddenMaxFileSize使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_generateHiddenMaxFileSize函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_generateHiddenMaxFileSize

 /**
  * @dataProvider dataProvider
  * @return void
  */
 function test_generateHiddenMaxFileSize($size)
 {
     $this->assertEquals(
         PMA_generateHiddenMaxFileSize($size),
         '<input type="hidden" name="MAX_FILE_SIZE" value="' . $size . '" />'
     );
 }
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:11,代码来源:PMA_generateHiddenMaxFileSize_test.php

示例2: PMA_generateHiddenMaxFileSize

?>
" id="buttonYes" />
            <input type="reset" value="<?php 
echo $strReset;
?>
" tabindex="<?php 
echo $tabindex + $tabindex_for_value + 7;
?>
" />
        </td>
    </tr>
    </table>
    </fieldset>
    <?php 
if ($biggest_max_file_size > 0) {
    echo '        ' . PMA_generateHiddenMaxFileSize($biggest_max_file_size) . "\n";
}
?>
</form>
<?php 
if ($insert_mode) {
    ?>
<!-- Restart insertion form -->
<form method="post" action="tbl_replace.php" name="restartForm" >
    <?php 
    echo PMA_generate_common_hidden_inputs($db, $table);
    ?>
    <input type="hidden" name="goto" value="<?php 
    echo htmlspecialchars($GLOBALS['goto']);
    ?>
" />
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:tbl_change.php

示例3: PMA_browseUploadFile

/**
 * Display the form used to browse anywhere on the local server for a file to import
 *
 * @param string $max_upload_size maximum upload size
 *
 * @return nothing
 */
function PMA_browseUploadFile($max_upload_size)
{
    echo '<label for="radio_import_file">' . __("Browse your computer:") . '</label>';
    echo '<div id="upload_form_status" style="display: none;"></div>';
    echo '<div id="upload_form_status_info" style="display: none;"></div>';
    echo '<input type="file" name="import_file" id="input_import_file" />';
    echo PMA_displayMaximumUploadSize($max_upload_size) . "\n";
    // some browsers should respect this :)
    echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:17,代码来源:common.lib.php

示例4: PMA_sqlQueryFormUpload

/**
 * prints bookmark fieldset
 *
 * @usedby  PMA_sqlQueryForm()
 * @uses    $GLOBALS['cfg']['GZipDump']
 * @uses    $GLOBALS['cfg']['BZipDump']
 * @uses    $GLOBALS['cfg']['UploadDir']
 * @uses    $GLOBALS['cfg']['AvailableCharsets']
 * @uses    $GLOBALS['cfg']['AllowAnywhereRecoding']
 * @uses    $GLOBALS['strAutodetect']
 * @uses    $GLOBALS['strBzip']
 * @uses    $GLOBALS['strCharsetOfFile']
 * @uses    $GLOBALS['strCompression']
 * @uses    $GLOBALS['strError']
 * @uses    $GLOBALS['strGo']
 * @uses    $GLOBALS['strGzip']
 * @uses    $GLOBALS['strLocationTextfile']
 * @uses    $GLOBALS['strWebServerUploadDirectory']
 * @uses    $GLOBALS['strWebServerUploadDirectoryError']
 * @uses    $GLOBALS['allow_recoding']
 * @uses    $GLOBALS['charset']
 * @uses    $GLOBALS['max_upload_size']
 * @uses    PMA_supportedDecompressions()
 * @uses    PMA_getFileSelectOptions()
 * @uses    PMA_displayMaximumUploadSize()
 * @uses    PMA_generateCharsetDropdownBox()
 * @uses    PMA_generateHiddenMaxFileSize()
 * @uses    PMA_MYSQL_INT_VERSION
 * @uses    PMA_CSDROPDOWN_CHARSET
 * @uses    empty()
 */
function PMA_sqlQueryFormUpload()
{
    $errors = array();
    $matcher = '@\\.sql(\\.(' . PMA_supportedDecompressions() . '))?$@';
    // we allow only SQL here
    if (!empty($GLOBALS['cfg']['UploadDir'])) {
        $files = PMA_getFileSelectOptions(PMA_userDir($GLOBALS['cfg']['UploadDir']), $matcher, isset($timeout_passed) && $timeout_passed && isset($local_import_file) ? $local_import_file : '');
    } else {
        $files = '';
    }
    // start output
    echo '<fieldset id="">';
    echo '<legend>';
    echo $GLOBALS['strLocationTextfile'] . '</legend>';
    echo '<div class="formelement">';
    echo '<input type="file" name="sql_file" class="textfield" /> ';
    echo PMA_displayMaximumUploadSize($GLOBALS['max_upload_size']);
    // some browsers should respect this :)
    echo PMA_generateHiddenMaxFileSize($GLOBALS['max_upload_size']) . "\n";
    echo '</div>';
    if ($files === FALSE) {
        $errors[$GLOBALS['strError']] = $GLOBALS['strWebServerUploadDirectoryError'];
    } elseif (!empty($files)) {
        echo '<div class="formelement">';
        echo '<strong>' . $GLOBALS['strWebServerUploadDirectory'] . ':</strong>' . "\n";
        echo '<select size="1" name="sql_localfile">' . "\n";
        echo '<option value="" selected="selected"></option>' . "\n";
        echo $files;
        echo '</select>' . "\n";
        echo '</div>';
    }
    echo '<div class="clearfloat"></div>' . "\n";
    echo '</fieldset>';
    echo '<fieldset id="" class="tblFooters">';
    if (PMA_MYSQL_INT_VERSION < 40100 && $GLOBALS['cfg']['AllowAnywhereRecoding'] && $GLOBALS['allow_recoding']) {
        echo $GLOBALS['strCharsetOfFile'] . "\n" . '<select name="charset_of_file" size="1">' . "\n";
        foreach ($GLOBALS['cfg']['AvailableCharsets'] as $temp_charset) {
            echo '<option value="' . $temp_charset . '"';
            if ($temp_charset == $GLOBALS['charset']) {
                echo ' selected="selected"';
            }
            echo '>' . $temp_charset . '</option>' . "\n";
        }
        echo '</select>' . "\n";
    } elseif (PMA_MYSQL_INT_VERSION >= 40100) {
        echo $GLOBALS['strCharsetOfFile'] . "\n";
        echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', null, 'utf8', FALSE);
    }
    // end if (recoding)
    echo '<input type="submit" name="SQL" value="' . $GLOBALS['strGo'] . '" />' . "\n";
    echo '<div class="clearfloat"></div>' . "\n";
    echo '</fieldset>';
    foreach ($errors as $error => $message) {
        echo '<div>' . $error . '</div>';
        echo '<div>' . $message . '</div>';
    }
}
开发者ID:hoogle,项目名称:ttt,代码行数:88,代码来源:sql_query_form.lib.php

示例5: PMA_sqlQueryFormUpload

/**
 * prints bookmark fieldset
 *
 * @usedby  PMA_sqlQueryForm()
 */
function PMA_sqlQueryFormUpload()
{
    $errors = array();
    $matcher = '@\\.sql(\\.(' . PMA_supportedDecompressions() . '))?$@';
    // we allow only SQL here
    if (!empty($GLOBALS['cfg']['UploadDir'])) {
        $files = PMA_getFileSelectOptions(PMA_userDir($GLOBALS['cfg']['UploadDir']), $matcher, isset($timeout_passed) && $timeout_passed && isset($local_import_file) ? $local_import_file : '');
    } else {
        $files = '';
    }
    // start output
    echo '<fieldset id="">';
    echo '<legend>';
    echo __('Browse your computer:') . '</legend>';
    echo '<div class="formelement">';
    echo '<input type="file" name="sql_file" class="textfield" /> ';
    echo PMA_displayMaximumUploadSize($GLOBALS['max_upload_size']);
    // some browsers should respect this :)
    echo PMA_generateHiddenMaxFileSize($GLOBALS['max_upload_size']) . "\n";
    echo '</div>';
    if ($files === false) {
        $errors[] = PMA_Message::error(__('The directory you set for upload work cannot be reached'));
    } elseif (!empty($files)) {
        echo '<div class="formelement">';
        echo '<strong>' . __('web server upload directory') . ':</strong>' . "\n";
        echo '<select size="1" name="sql_localfile">' . "\n";
        echo '<option value="" selected="selected"></option>' . "\n";
        echo $files;
        echo '</select>' . "\n";
        echo '</div>';
    }
    echo '<div class="clearfloat"></div>' . "\n";
    echo '</fieldset>';
    echo '<fieldset id="" class="tblFooters">';
    echo __('Character set of the file:') . "\n";
    echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', null, 'utf8', false);
    echo '<input type="submit" name="SQL" value="' . __('Go') . '" />' . "\n";
    echo '<div class="clearfloat"></div>' . "\n";
    echo '</fieldset>';
    foreach ($errors as $error) {
        $error->display();
    }
}
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:48,代码来源:sql_query_form.lib.php

示例6: PMA_displayMaximumUploadSize

        <b><?php 
    echo $strLocationTextfile;
    ?>
:</b>
    </td>
</tr>
<tr bgcolor="<?php 
    echo $cfg['BgcolorOne'];
    ?>
">
  <td colspan="2" align="center">
    <input type="file" name="sql_file" class="textfield" />&nbsp;
    <?php 
    echo PMA_displayMaximumUploadSize($max_upload_size) . '<br />';
    // some browsers should respect this :)
    echo '    ' . PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
    $is_gzip = $cfg['GZipDump'] && @function_exists('gzopen');
    $is_bzip = $cfg['BZipDump'] && @function_exists('bzdecompress');
    if ($is_bzip || $is_gzip) {
        echo '    </td>' . "\n" . '</tr>' . "\n" . '<tr bgcolor="' . $cfg['BgcolorOne'] . '">' . "\n" . '    <td colspan="2">' . "\n";
        echo '        &nbsp;&nbsp;' . $strCompression . ':<br />&nbsp;&nbsp;&nbsp;' . "\n" . '            <input type="radio" id="radio_sql_file_compression_auto" name="sql_file_compression" value="" checked="checked" /><label for="radio_sql_file_compression_auto">' . $strAutodetect . '</label>&nbsp;&nbsp;' . "\n" . '            <input type="radio" id="radio_sql_file_compression_plain" name="sql_file_compression" value="text/plain" /><label for="radio_sql_file_compression_plain">' . $strNone . '</label>&nbsp;&nbsp' . "\n";
        if ($is_gzip) {
            echo '            <input type="radio" id="radio_sql_file_compression_gzip" name="sql_file_compression" value="application/x-gzip" /><label for="radio_sql_file_compression_gzip">' . $strGzip . '</label>&nbsp;&nbsp;' . "\n";
        }
        if ($is_bzip) {
            echo '            <input type="radio" id="radio_sql_file_compression_bzip" name="sql_file_compression" value="application/x-bzip" /><label for="radio_sql_file_compression_bzip">' . $strBzip . '</label>&nbsp;&nbsp;' . "\n";
        }
    } else {
        ?>
        <input type="hidden" name="sql_file_compression" value="text/plain" />
    </td>
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:db_details.php

示例7: urlencode

 // end if...elseif...else
 // Upload choice (only for BLOBs because the binary
 // attribute does not imply binary contents)
 // (displayed whatever value the ProtectBinary has)
 if ($is_upload && $is_blob) {
     echo '<input type="file" name="fields_upload_' . urlencode($field) . $vkey . '" class="textfield" id="field_' . $idindex . '_3" size="10" />&nbsp;';
     // find maximum upload size, based on field type
     $max_field_sizes = array('tinyblob' => '256', 'blob' => '65536', 'mediumblob' => '16777216', 'longblob' => '4294967296');
     // yeah, really
     $this_field_max_size = $max_upload_size;
     // from PHP max
     if ($this_field_max_size > $max_field_sizes[$type]) {
         $this_field_max_size = $max_field_sizes[$type];
     }
     echo PMA_displayMaximumUploadSize($this_field_max_size) . "\n";
     echo '                ' . PMA_generateHiddenMaxFileSize($this_field_max_size) . "\n";
 }
 if (!empty($cfg['UploadDir'])) {
     if (substr($cfg['UploadDir'], -1) != '/') {
         $cfg['UploadDir'] .= '/';
     }
     if ($handle = @opendir($cfg['UploadDir'])) {
         $is_first = 0;
         while ($file = @readdir($handle)) {
             if (is_file($cfg['UploadDir'] . $file) && !PMA_checkFileExtensions($file, '.sql')) {
                 if ($is_first == 0) {
                     echo "<br />\n";
                     echo '    <i>' . $strOr . '</i>' . ' ' . $strWebServerUploadDirectory . ':<br />' . "\n";
                     echo '        <select size="1" name="fields_uploadlocal_' . urlencode($field) . $vkey . '">' . "\n";
                     echo '            <option value="" selected="selected"></option>' . "\n";
                 }
开发者ID:Apxe,项目名称:Rubin_final,代码行数:31,代码来源:tbl_change.php

示例8: PMA_browseUploadFile

/**
 * Display the form used to browse anywhere on the local server for a file to
 * import
 *
 * @param string $max_upload_size maximum upload size
 *
 * @return void
 */
function PMA_browseUploadFile($max_upload_size)
{
    if ($GLOBALS['is_upload'] && !empty($GLOBALS['cfg']['UploadDir'])) {
        echo '<label for="radio_import_file">';
    } else {
        echo '<label for="input_import_file">';
    }
    echo __("Browse your computer:") . '</label>';
    echo '<div id="upload_form_status" style="display: none;"></div>';
    echo '<div id="upload_form_status_info" style="display: none;"></div>';
    echo '<input type="file" name="import_file" id="input_import_file" />';
    echo PMA_getFormattedMaximumUploadSize($max_upload_size) . "\n";
    // some browsers should respect this :)
    echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
}
开发者ID:rizwanaabbas,项目名称:phpmyadmin,代码行数:23,代码来源:common.lib.php


注:本文中的PMA_generateHiddenMaxFileSize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。