本文整理汇总了PHP中PMA_escapeJsString函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_escapeJsString函数的具体用法?PHP PMA_escapeJsString怎么用?PHP PMA_escapeJsString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_escapeJsString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _addDefaultScripts
/**
* Loads common scripts
*
* @return void
*/
private function _addDefaultScripts()
{
if (empty($GLOBALS['error_message'])) {
$this->_scripts->addCode("\n \$(function() {\n // updates current settings\n if (window.parent.setAll) {\n window.parent.setAll(\n '" . PMA_escapeJsString($GLOBALS['lang']) . "',\n '" . PMA_escapeJsString($GLOBALS['collation_connection']) . "',\n '" . PMA_escapeJsString($GLOBALS['server']) . "',\n '" . PMA_escapeJsString(PMA_ifSetOr($GLOBALS['db'], '')) . "',\n '" . PMA_escapeJsString(PMA_ifSetOr($GLOBALS['table'], '')) . "',\n '" . PMA_escapeJsString($_SESSION[' PMA_token ']) . "'\n );\n }\n });\n ");
if (!empty($GLOBALS['reload'])) {
$this->_scripts->addCode("\n // refresh navigation frame content\n if (window.parent.refreshNavigation) {\n window.parent.refreshNavigation();\n }\n ");
} else {
if (isset($_GET['reload_left_frame']) && $_GET['reload_left_frame'] == '1') {
// reload left frame (used by user preferences)
$this->_scripts->addCode("\n if (window.parent && window.parent.frame_navigation) {\n window.parent.frame_navigation.location.reload();\n }\n ");
}
}
// set current db, table and sql query in the querywindow
$query = '';
if (isset($GLOBALS['sql_query']) && strlen($GLOBALS['sql_query']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$query = PMA_escapeJsString($GLOBALS['sql_query']);
}
$this->_scripts->addCode("\n if (window.parent.reload_querywindow) {\n window.parent.reload_querywindow(\n '" . PMA_escapeJsString(PMA_ifSetOr($GLOBALS['db'], '')) . "',\n '" . PMA_escapeJsString(PMA_ifSetOr($GLOBALS['table'], '')) . "',\n '" . $query . "'\n );\n }\n ");
if (!empty($GLOBALS['focus_querywindow'])) {
// set focus to the querywindow
$this->_scripts->addCode("\n if (parent.querywindow && !parent.querywindow.closed\n && parent.querywindow.location\n ) {\n self.focus();\n }\n ");
}
$this->_scripts->addCode("\n if (window.parent.frame_content) {\n // reset content frame name, as querywindow needs\n // to set a unique name before submitting form data,\n // and navigation frame needs the original name\n if (typeof(window.parent.frame_content.name) != 'undefined'\n && window.parent.frame_content.name != 'frame_content') {\n window.parent.frame_content.name = 'frame_content';\n }\n if (typeof(window.parent.frame_content.id) != 'undefined'\n && window.parent.frame_content.id != 'frame_content') {\n window.parent.frame_content.id = 'frame_content';\n }\n //window.parent.frame_content.setAttribute('name', 'frame_content');\n //window.parent.frame_content.setAttribute('id', 'frame_content');\n }\n ");
}
}
示例2: PMA_jsFormat
/**
* Format a string so it can be a string inside JavaScript code inside an
* eventhandler (onclick, onchange, on..., ).
* This function is used to displays a javascript confirmation box for
* "DROP/DELETE/ALTER" queries.
*
* @uses PMA_escapeJsString()
* @uses PMA_backquote()
* @uses is_string()
* @uses htmlspecialchars()
* @uses str_replace()
* @param string $a_string the string to format
* @param boolean $add_backquotes whether to add backquotes to the string or not
*
* @return string the formatted string
*
* @access public
*/
function PMA_jsFormat($a_string = '', $add_backquotes = true)
{
if (is_string($a_string)) {
$a_string = htmlspecialchars($a_string);
$a_string = PMA_escapeJsString($a_string);
/**
* @todo what is this good for?
*/
$a_string = str_replace('#', '\\#', $a_string);
}
return $add_backquotes ? PMA_backquote($a_string) : $a_string;
}
示例3: PMA_printJsValue
/**
* Prints an javascript assignment with proper escaping of a value
* and support for assigning array of strings.
*
* @param string $key Name of value to set
* @param mixed $value Value to set, can be either string or array of strings
*/
function PMA_printJsValue($key, $value)
{
echo $key . ' = ';
if (is_array($value)) {
echo '[';
foreach ($value as $id => $val) {
echo "'" . PMA_escapeJsString($val) . "',";
}
echo "];\n";
} else {
echo "'" . PMA_escapeJsString($value) . "';\n";
}
}
示例4: PMA_formatJsVal
/**
* Formats a value for javascript code.
*
* @param string $value String to be formatted.
*
* @return string formatted value.
*/
function PMA_formatJsVal($value)
{
if (is_bool($value)) {
if ($value) {
return 'true';
}
return 'false';
}
if (is_int($value)) {
return (int) $value;
}
return '"' . PMA_escapeJsString($value) . '"';
}
示例5: PMA_getHtmlForInsertEditFormColumn
/**
* Function to get html for each insert/edit column
*
* @param array $table_columns table columns
* @param int $column_number column index in table_columns
* @param array $comments_map comments map
* @param bool $timestamp_seen whether timestamp seen
* @param array $current_result current result
* @param string $chg_evt_handler javascript change event handler
* @param string $jsvkey javascript validation key
* @param string $vkey validation key
* @param bool $insert_mode whether insert mode
* @param array $current_row current row
* @param bool $odd_row whether odd row
* @param int &$o_rows row offset
* @param int &$tabindex tab index
* @param int $columns_cnt columns count
* @param bool $is_upload whether upload
* @param int $tabindex_for_function tab index offset for function
* @param array $foreigners foreigners
* @param int $tabindex_for_null tab index offset for null
* @param int $tabindex_for_value tab index offset for value
* @param string $table table
* @param string $db database
* @param int $row_id row id
* @param array $titles titles
* @param int $biggest_max_file_size biggest max file size
* @param string $default_char_editing default char editing mode which is stored
* in the config.inc.php script
* @param string $text_dir text direction
* @param array $repopulate the data to be repopulated
* @param array $column_mime the mime information of column
* @param string $where_clause the where clause
*
* @return string
*/
function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number, $comments_map, $timestamp_seen, $current_result, $chg_evt_handler, $jsvkey, $vkey, $insert_mode, $current_row, $odd_row, &$o_rows, &$tabindex, $columns_cnt, $is_upload, $tabindex_for_function, $foreigners, $tabindex_for_null, $tabindex_for_value, $table, $db, $row_id, $titles, $biggest_max_file_size, $default_char_editing, $text_dir, $repopulate, $column_mime, $where_clause)
{
$column = $table_columns[$column_number];
if (!isset($column['processed'])) {
$column = PMA_analyzeTableColumnsArray($column, $comments_map, $timestamp_seen);
}
$as_is = false;
if (!empty($repopulate) && !empty($current_row)) {
$current_row[$column['Field']] = $repopulate[$column['Field_md5']];
$as_is = true;
}
$extracted_columnspec = PMA_Util::extractColumnSpec($column['Type']);
if (-1 === $column['len']) {
$column['len'] = $GLOBALS['dbi']->fieldLen($current_result, $column_number);
// length is unknown for geometry fields,
// make enough space to edit very simple WKTs
if (-1 === $column['len']) {
$column['len'] = 30;
}
}
//Call validation when the form submitted...
$onChangeClause = $chg_evt_handler . "=\"return verificationsAfterFieldChange('" . PMA_escapeJsString($column['Field_md5']) . "', '" . PMA_escapeJsString($jsvkey) . "','" . $column['pma_type'] . "')\"";
// Use an MD5 as an array index to avoid having special characters
// in the name attribute (see bug #1746964 )
$column_name_appendix = $vkey . '[' . $column['Field_md5'] . ']';
if ($column['Type'] === 'datetime' && !isset($column['Default']) && !is_null($column['Default']) && $insert_mode) {
$column['Default'] = date('Y-m-d H:i:s', time());
}
$html_output = PMA_getHtmlForFunctionOption($odd_row, $column, $column_name_appendix);
if ($GLOBALS['cfg']['ShowFieldTypesInDataEditView']) {
$html_output .= PMA_getHtmlForInsertEditColumnType($column);
}
//End if
// Get a list of GIS data types.
$gis_data_types = PMA_Util::getGISDatatypes();
// Prepares the field value
$real_null_value = false;
$special_chars_encoded = '';
if (!empty($current_row)) {
// (we are editing)
list($real_null_value, $special_chars_encoded, $special_chars, $data, $backup_field) = PMA_getSpecialCharsAndBackupFieldForExistingRow($current_row, $column, $extracted_columnspec, $real_null_value, $gis_data_types, $column_name_appendix, $as_is);
} else {
// (we are inserting)
// display default values
$tmp = $column;
if (isset($repopulate[$column['Field_md5']])) {
$tmp['Default'] = $repopulate[$column['Field_md5']];
}
list($real_null_value, $data, $special_chars, $backup_field, $special_chars_encoded) = PMA_getSpecialCharsAndBackupFieldForInsertingMode($tmp, $real_null_value);
unset($tmp);
}
$idindex = $o_rows * $columns_cnt + $column_number + 1;
$tabindex = $idindex;
// Get a list of data types that are not yet supported.
$no_support_types = PMA_Util::unsupportedDatatypes();
// The function column
// -------------------
if ($GLOBALS['cfg']['ShowFunctionFields']) {
$html_output .= PMA_getFunctionColumn($column, $is_upload, $column_name_appendix, $onChangeClause, $no_support_types, $tabindex_for_function, $tabindex, $idindex, $insert_mode);
}
// The null column
// ---------------
$foreignData = PMA_getForeignData($foreigners, $column['Field'], false, '', '');
$html_output .= PMA_getNullColumn($column, $column_name_appendix, $real_null_value, $tabindex, $tabindex_for_null, $idindex, $vkey, $foreigners, $foreignData);
//.........这里部分代码省略.........
示例6: PMA_addJsValidate
/**
* Appends JS validation code to $js_array
*
* @param string $field_id ID of field to validate
* @param string|array $validators validators callback
* @param array &$js_array will be updated with javascript code
*
* @return void
*/
function PMA_addJsValidate($field_id, $validators, &$js_array)
{
foreach ((array) $validators as $validator) {
$validator = (array) $validator;
$v_name = array_shift($validator);
$v_name = "PMA_" . $v_name;
$v_args = array();
foreach ($validator as $arg) {
$v_args[] = PMA_escapeJsString($arg);
}
$v_args = $v_args ? ", ['" . implode("', '", $v_args) . "']" : '';
$js_array[] = "validateField('{$field_id}', '{$v_name}', true{$v_args})";
}
}
示例7: __
require_once './libraries/js_escape.lib.php';
$js_messages['strClickToSelect'] = __('Click to select');
$js_messages['strClickToUnselect'] = __('Click to unselect');
$js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled.');
/* For confirmations */
$js_messages['strDoYouReally'] = __('Do you really want to ');
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
$js_messages['strDroppingEvent'] = __('Dropping Event');
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
$js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
$js_messages['strDroppingPrimaryKeyIndex'] = __('Dropping Primary Key/Index');
$js_messages['strOperationTakesLongTime'] = __('This operation could take a long time. Proceed anyway?');
/* For blobstreaming */
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
$js_messages['strBLOBRepositoryDisableAreYouSure'] = sprintf(__('Are you sure you want to disable all BLOB references for database %s?'), PMA_escapeJsString($GLOBALS['db']));
/* For indexes */
$js_messages['strFormEmpty'] = __('Missing value in the form!');
$js_messages['strNotNumber'] = __('This is not a number!');
/* For server_privileges.js */
$js_messages['strHostEmpty'] = __('The host name is empty!');
$js_messages['strUserEmpty'] = __('The user name is empty!');
$js_messages['strPasswordEmpty'] = __('The password is empty!');
$js_messages['strPasswordNotSame'] = __('The passwords aren\'t the same!');
$js_messages['strAddNewUser'] = __('Add a New User');
$js_messages['strCreateUser'] = __('Create User');
$js_messages['strReloadingPrivileges'] = __('Reloading Privileges');
$js_messages['strRemovingSelectedUsers'] = __('Removing Selected Users');
$js_messages['strClose'] = __('Close');
/* For inline query editing */
$js_messages['strGo'] = __('Go');
示例8: getJsParamsCode
/**
* Returns, as a string, a list of parameters
* used on the client side
*
* @return string
*/
public function getJsParamsCode()
{
$params = $this->getJsParams();
foreach ($params as $key => $value) {
$params[$key] = $key . ':"' . PMA_escapeJsString($value) . '"';
}
return 'PMA_commonParams.setAll({' . implode(',', $params) . '});';
}
示例9: htmlspecialchars
?>
_3"
value="<?php
echo htmlspecialchars($data);
?>
" />
<script type="text/javascript">
//<![CDATA[
document.writeln('<a target="_blank" onclick="window.open(this.href, \'foreigners\', \'width=640,height=240,scrollbars=yes,resizable=yes\'); return false"');
document.write(' href="browse_foreigners.php?');
document.write('<?php
echo PMA_generate_common_url($db, $table);
?>
');
document.writeln('&field=<?php
echo PMA_escapeJsString(urlencode($field['Field']) . $browse_foreigners_uri);
?>
">');
document.writeln('<?php
echo str_replace("'", "\\'", $titles['Browse']);
?>
</a>');
//]]>
</script>
<?php
} elseif (is_array($foreignData['disp_row'])) {
echo $backup_field . "\n";
?>
<input type="hidden" name="fields_type<?php
echo $field_name_appendix;
?>
示例10: array_unique
* Here we add a timestamp when loading the file, so that users who
* upgrade phpMyAdmin are not stuck with older .js files in their
* browser cache. This produces an HTTP 304 request for each file.
*/
// avoid loading twice a js file
$GLOBALS['js_include'] = array_unique($GLOBALS['js_include']);
foreach ($GLOBALS['js_include'] as $js_script_file) {
echo PMA_includeJS($js_script_file);
}
?>
<script type="text/javascript">
// <![CDATA[
// Updates the title of the frameset if possible (ns4 does not allow this)
if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
&& typeof(parent.document.title) == 'string') {
parent.document.title = '<?php
echo isset($title) ? PMA_sanitize(PMA_escapeJsString(htmlspecialchars($title))) : '';
?>
';
}
<?php
foreach ($GLOBALS['js_events'] as $js_event) {
echo "\$(window.parent).bind('" . $js_event['event'] . "', " . $js_event['function'] . ");\n";
}
?>
// ]]>
</script>
<?php
// Reloads the navigation frame via JavaScript if required
PMA_reloadNavigation();
示例11: PMA_getHtmlForTrackingReportExportForm2
/**
* Generate HTML for export form
*
* @param array $url_params Parameters
* @param string $str1 HTML for logtype select
* @param string $str2 HTML for "from date"
* @param string $str3 HTML for "to date"
* @param string $str4 HTML for user
* @param string $str5 HTML for "list report"
*
* @return string HTML for form
*/
function PMA_getHtmlForTrackingReportExportForm2($url_params, $str1, $str2, $str3, $str4, $str5)
{
$html = '<form method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$html .= sprintf(__('Show %1$s with dates from %2$s to %3$s by user %4$s %5$s'), $str1, $str2, $str3, $str4, $str5);
$html .= '</form>';
$html .= '<form class="disableAjax" method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$html .= '<input type="hidden" name="logtype" value="' . htmlspecialchars($_REQUEST['logtype']) . '" />';
$html .= '<input type="hidden" name="date_from" value="' . htmlspecialchars($_REQUEST['date_from']) . '" />';
$html .= '<input type="hidden" name="date_to" value="' . htmlspecialchars($_REQUEST['date_to']) . '" />';
$html .= '<input type="hidden" name="users" value="' . htmlspecialchars($_REQUEST['users']) . '" />';
$str_export1 = '<select name="export_type">' . '<option value="sqldumpfile">' . __('SQL dump (file download)') . '</option>' . '<option value="sqldump">' . __('SQL dump') . '</option>' . '<option value="execution" onclick="alert(\'' . PMA_escapeJsString(__('This option will replace your table and contained data.')) . '\')">' . __('SQL execution') . '</option>' . '</select>';
$str_export2 = '<input type="hidden" name="report_export" value="1" />' . '<input type="submit" value="' . __('Go') . '" />';
$html .= "<br/>" . sprintf(__('Export as %s'), $str_export1) . $str_export2 . "<br/>";
$html .= '</form>';
return $html;
}
示例12: PMA_escapeJsString
var token = "' . PMA_escapeJsString($token) . '";
var LangSelectReferencedKey = "' . PMA_escapeJsString($strSelectReferencedKey) . '";
var LangSelectForeignKey = "' . PMA_escapeJsString($strSelectForeignKey) . '";
var LangPleaseSelectPrimaryOrUniqueKey = "' . PMA_escapeJsString($strPleaseSelectPrimaryOrUniqueKey) . '";
var LangIEnotSupport = "' . PMA_escapeJsString($strIEUnsupported) . '";
var LangChangeDisplay = "' . PMA_escapeJsString($strChangeDisplay) . '";
var strLang = Array();
strLang["strModifications"] = "' . PMA_escapeJsString($strModifications) . '";
strLang["strRelationDeleted"] = "' . PMA_escapeJsString($strRelationDeleted) . '";
strLang["strForeignKeyRelationAdded"] = "' . PMA_escapeJsString($strForeignKeyRelationAdded) . '";
strLang["strGeneralRelationFeat:strDisabled"] = "' . PMA_escapeJsString($strGeneralRelationFeat . ' : ' . $strDisabled) . '";
strLang["strInternalRelationAdded"] = "' . PMA_escapeJsString($strInternalRelationAdded) . '";
strLang["strErrorRelationAdded"] = "' . PMA_escapeJsString($strErrorRelationAdded) . '";
strLang["strErrorRelationExists"] = "' . PMA_escapeJsString($strErrorRelationExists) . '";
strLang["strErrorSaveTable"] = "' . PMA_escapeJsString($strErrorSaveTable) . '";';
?>
// ]]>
</script>
<script src="pmd/scripts/ajax.js" type="text/javascript"></script>
<script src="pmd/scripts/move.js" type="text/javascript"></script>
<!--[if IE]>
<script src="pmd/scripts/iecanvas.js" type="text/javascript"></script>
<![endif]-->
<?php
echo $script_tabs . $script_contr . $script_display_field;
?>
</head>
<body onload="Main()" class="general_body" id="pmd_body">
示例13: define
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* URL redirector to avoid leaking Referer with some sensitive information.
*
* @package PhpMyAdmin
*/
/**
* Gets core libraries and defines some variables
*/
define('PMA_MINIMUM_COMMON', true);
require_once './libraries/common.inc.php';
/**
* JavaScript escaping.
*/
require_once './libraries/js_escape.lib.php';
if (!PMA_isValid($_GET['url']) || !preg_match('/^https?:\\/\\/[^\\n\\r]*$/', $_GET['url']) || !PMA_isAllowedDomain($_GET['url'])) {
header('Location: ' . $cfg['PmaAbsoluteUri']);
} else {
// JavaScript redirection is necessary. Because if header() is used
// then web browser sometimes does not change the HTTP_REFERER
// field and so with old URL as Referer, token also goes to
// external site.
echo "<script type='text/javascript'>\n window.onload=function(){\n window.location='" . PMA_escapeJsString($_GET['url']) . "';\n }\n </script>";
// Display redirecting msg on screen.
printf(__('Taking you to %s.'), htmlspecialchars($_GET['url']));
}
die;
示例14: PMA_linkOrButton
/**
* Displays a link, or a button if the link's URL is too large, to
* accommodate some browsers' limitations
*
* @param string the URL
* @param string the link message
* @param mixed $tag_params string: js confirmation
* array: additional tag params (f.e. style="")
* @param boolean $new_form we set this to false when we are already in
* a form, to avoid generating nested forms
*
* @return string the results to be echoed or saved in an array
*/
function PMA_linkOrButton($url, $message, $tag_params = array(), $new_form = true, $strip_img = false, $target = '')
{
$url_length = strlen($url);
// with this we should be able to catch case of image upload
// into a (MEDIUM) BLOB; not worth generating even a form for these
if ($url_length > $GLOBALS['cfg']['LinkLengthLimit'] * 100) {
return '';
}
if (!is_array($tag_params)) {
$tmp = $tag_params;
$tag_params = array();
if (!empty($tmp)) {
$tag_params['onclick'] = 'return confirmLink(this, \'' . PMA_escapeJsString($tmp) . '\')';
}
unset($tmp);
}
if (!empty($target)) {
$tag_params['target'] = htmlentities($target);
}
$tag_params_strings = array();
foreach ($tag_params as $par_name => $par_value) {
// htmlspecialchars() only on non javascript
$par_value = substr($par_name, 0, 2) == 'on' ? $par_value : htmlspecialchars($par_value);
$tag_params_strings[] = $par_name . '="' . $par_value . '"';
}
if ($url_length <= $GLOBALS['cfg']['LinkLengthLimit']) {
// no whitespace within an <a> else Safari will make it part of the link
$ret = "\n" . '<a href="' . $url . '" ' . implode(' ', $tag_params_strings) . '>' . $message . '</a>' . "\n";
} else {
// no spaces (linebreaks) at all
// or after the hidden fields
// IE will display them all
// add class=link to submit button
if (empty($tag_params['class'])) {
$tag_params['class'] = 'link';
}
// decode encoded url separators
$separator = PMA_get_arg_separator();
// on most places separator is still hard coded ...
if ($separator !== '&') {
// ... so always replace & with $separator
$url = str_replace(htmlentities('&'), $separator, $url);
$url = str_replace('&', $separator, $url);
}
$url = str_replace(htmlentities($separator), $separator, $url);
// end decode
$url_parts = parse_url($url);
$query_parts = explode($separator, $url_parts['query']);
if ($new_form) {
$ret = '<form action="' . $url_parts['path'] . '" class="link"' . ' method="post"' . $target . ' style="display: inline;">';
$subname_open = '';
$subname_close = '';
$submit_name = '';
} else {
$query_parts[] = 'redirect=' . $url_parts['path'];
if (empty($GLOBALS['subform_counter'])) {
$GLOBALS['subform_counter'] = 0;
}
$GLOBALS['subform_counter']++;
$ret = '';
$subname_open = 'subform[' . $GLOBALS['subform_counter'] . '][';
$subname_close = ']';
$submit_name = ' name="usesubform[' . $GLOBALS['subform_counter'] . ']"';
}
foreach ($query_parts as $query_pair) {
list($eachvar, $eachval) = explode('=', $query_pair);
$ret .= '<input type="hidden" name="' . $subname_open . $eachvar . $subname_close . '" value="' . htmlspecialchars(urldecode($eachval)) . '" />';
}
// end while
if (stristr($message, '<img')) {
if ($strip_img) {
$message = trim(strip_tags($message));
$ret .= '<input type="submit"' . $submit_name . ' ' . implode(' ', $tag_params_strings) . ' value="' . htmlspecialchars($message) . '" />';
} else {
$displayed_message = htmlspecialchars(preg_replace('/^.*\\salt="([^"]*)".*$/si', '\\1', $message));
$ret .= '<input type="image"' . $submit_name . ' ' . implode(' ', $tag_params_strings) . ' src="' . preg_replace('/^.*\\ssrc="([^"]*)".*$/si', '\\1', $message) . '"' . ' value="' . $displayed_message . '" title="' . $displayed_message . '" />';
// Here we cannot obey PropertiesIconic completely as a
// generated link would have a length over LinkLengthLimit
// but we can at least show the message.
// If PropertiesIconic is false or 'both'
if ($GLOBALS['cfg']['PropertiesIconic'] !== true) {
$ret .= ' <span class="clickprevimage">' . $displayed_message . '</span>';
}
}
} else {
$message = trim(strip_tags($message));
$ret .= '<input type="submit"' . $submit_name . ' ' . implode(' ', $tag_params_strings) . ' value="' . htmlspecialchars($message) . '" />';
//.........这里部分代码省略.........
示例15: PMA_jsFormat
$('#upload_form_status_info').html('<img src="<?php
echo $GLOBALS['pmaThemeImage'];
?>
ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> <?php
echo PMA_jsFormat(__('The file being uploaded is probably larger than the maximum allowed size or this is a known bug in webkit based (Safari, Google Chrome, Arora etc.) browsers.'), false);
?>
');
$('#upload_form_status').css("display", "none");
} else {
var now = new Date();
now = Date.UTC(
now.getFullYear(), now.getMonth(), now.getDate(),
now.getHours(), now.getMinutes(), now.getSeconds())
+ now.getMilliseconds() - 1000;
var statustext = $.sprintf('<?php
echo PMA_escapeJsString(__('%s of %s'));
?>
',
formatBytes(complete, 1, PMA_messages.strDecimalSeparator),
formatBytes(total, 1, PMA_messages.strDecimalSeparator)
);
if ($('#importmain').is(':visible')) {
// show progress UI
$('#importmain').hide();
$('#import_form_status')
.html('<div class="upload_progress"><div class="upload_progress_bar_outer"><div class="percentage"></div><div id="status" class="upload_progress_bar_inner"><div class="percentage"></div></div></div><div><img src="<?php
echo $GLOBALS['pmaThemeImage'];
?>
ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> <?php
echo PMA_jsFormat(__('Uploading your import file...'), false);