本文整理汇总了PHP中html::escapeJS方法的典型用法代码示例。如果您正苦于以下问题:PHP html::escapeJS方法的具体用法?PHP html::escapeJS怎么用?PHP html::escapeJS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::escapeJS方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jsToolBar
protected static function jsToolBar()
{
$res = dcPage::cssLoad(dcPage::getPF('dcLegacyEditor/css/jsToolBar/jsToolBar.css')) . dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.js'));
if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
$res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js'));
}
$res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "jsToolBar.prototype.dialog_url = 'popup.php'; " . "jsToolBar.prototype.iframe_css = '" . 'body{' . 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;' . 'color : #000;' . 'background: #f9f9f9;' . 'margin: 0;' . 'padding : 2px;' . 'border: none;' . (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '') . '}' . 'pre, code, kbd, samp {' . 'font-family:"Courier New",Courier,monospace;' . 'font-size : 1.1em;' . '}' . 'code {' . 'color : #666;' . 'font-weight : bold;' . '}' . 'body > p:first-child {' . 'margin-top: 0;' . '}' . "'; " . "jsToolBar.prototype.base_url = '" . html::escapeJS($GLOBALS['core']->blog->host) . "'; " . "jsToolBar.prototype.switcher_visual_title = '" . html::escapeJS(__('visual')) . "'; " . "jsToolBar.prototype.switcher_source_title = '" . html::escapeJS(__('source')) . "'; " . "jsToolBar.prototype.legend_msg = '" . html::escapeJS(__('You can use the following shortcuts to format your text.')) . "'; " . "jsToolBar.prototype.elements.blocks.options.none = '" . html::escapeJS(__('-- none --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.nonebis = '" . html::escapeJS(__('-- block format --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.p = '" . html::escapeJS(__('Paragraph')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h1 = '" . html::escapeJS(__('Level 1 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h2 = '" . html::escapeJS(__('Level 2 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h3 = '" . html::escapeJS(__('Level 3 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h4 = '" . html::escapeJS(__('Level 4 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h5 = '" . html::escapeJS(__('Level 5 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h6 = '" . html::escapeJS(__('Level 6 header')) . "'; " . "jsToolBar.prototype.elements.strong.title = '" . html::escapeJS(__('Strong emphasis')) . "'; " . "jsToolBar.prototype.elements.em.title = '" . html::escapeJS(__('Emphasis')) . "'; " . "jsToolBar.prototype.elements.ins.title = '" . html::escapeJS(__('Inserted')) . "'; " . "jsToolBar.prototype.elements.del.title = '" . html::escapeJS(__('Deleted')) . "'; " . "jsToolBar.prototype.elements.quote.title = '" . html::escapeJS(__('Inline quote')) . "'; " . "jsToolBar.prototype.elements.code.title = '" . html::escapeJS(__('Code')) . "'; " . "jsToolBar.prototype.elements.br.title = '" . html::escapeJS(__('Line break')) . "'; " . "jsToolBar.prototype.elements.blockquote.title = '" . html::escapeJS(__('Blockquote')) . "'; " . "jsToolBar.prototype.elements.pre.title = '" . html::escapeJS(__('Preformated text')) . "'; " . "jsToolBar.prototype.elements.ul.title = '" . html::escapeJS(__('Unordered list')) . "'; " . "jsToolBar.prototype.elements.ol.title = '" . html::escapeJS(__('Ordered list')) . "'; " . "jsToolBar.prototype.elements.link.title = '" . html::escapeJS(__('Link')) . "'; " . "jsToolBar.prototype.elements.link.href_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.link.hreflang_prompt = '" . html::escapeJS(__('Language?')) . "'; " . "jsToolBar.prototype.elements.img.title = '" . html::escapeJS(__('External image')) . "'; " . "jsToolBar.prototype.elements.img.src_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.img_select.title = '" . html::escapeJS(__('Media chooser')) . "'; " . "jsToolBar.prototype.elements.post_link.title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "jsToolBar.prototype.elements.removeFormat = jsToolBar.prototype.elements.removeFormat || {}; " . "jsToolBar.prototype.elements.removeFormat.title = '" . html::escapeJS(__('Remove text formating')) . "'; ";
if (!$GLOBALS['core']->auth->check('media,media_admin', $GLOBALS['core']->blog->id)) {
$res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
}
$res .= "jsToolBar.prototype.toolbar_bottom = " . (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('toolbar_bottom') ? 'true' : 'false') . ";\n";
$res .= "\n//]]>\n" . "</script>\n";
return $res;
}
示例2: adminPostEditor
/**
* adminPostEditor add javascript to the DOM to load ckeditor depending on context
*
* @param editor <b>string</b> wanted editor
* @param context <b>string</b> page context (post,page,comment,event,...)
* @param tags <b>array</b> array of ids into inject editor
* @param syntax <b>string</b> wanted syntax (xhtml)
*/
public static function adminPostEditor($editor = '', $context = '', array $tags = array(), $syntax = 'xhtml')
{
if (empty($editor) || $editor != 'dcCKEditor' || $syntax != 'xhtml') {
return;
}
$config_js = self::$config_url;
if (!empty($context)) {
$config_js .= '&context=' . $context;
}
return '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.ckeditor_context', $context) . 'dotclear.ckeditor_tags_context = ' . sprintf('{%s:["%s"]};' . "\n", $context, implode('","', $tags)) . 'var CKEDITOR_BASEPATH = "' . DC_ADMIN_URL . self::$p_url . '/js/ckeditor/";' . "\n" . dcPage::jsVar('dotclear.admin_base_url', DC_ADMIN_URL) . dcPage::jsVar('dotclear.base_url', $GLOBALS['core']->blog->host) . dcPage::jsVar('dotclear.dcckeditor_plugin_url', DC_ADMIN_URL . self::$p_url) . 'CKEDITOR_GETURL = function(resource) {
// If this is not a full or absolute path.
if ( resource.indexOf(":/") == -1 && resource.indexOf("/") !== 0 ) {
resource = this.basePath + resource;
}
return resource;
};' . "dotclear.msg.img_select_title = '" . html::escapeJS(__('Media chooser')) . "'; " . "dotclear.msg.post_link_title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "dotclear.msg.link_title = '" . html::escapeJS(__('Link')) . "'; " . "dotclear.msg.img_title = '" . html::escapeJS(__('External image')) . "'; " . "dotclear.msg.url_cannot_be_empty = '" . html::escapeJS(__('URL field cannot be empty.')) . "';" . "\n//]]>\n" . "</script>\n" . dcPage::jsLoad(self::$p_url . '/js/ckeditor/ckeditor.js') . dcPage::jsLoad(self::$p_url . '/js/ckeditor/adapters/jquery.js') . dcPage::jsLoad($config_js);
}
示例3: url
font-size: 0.8em;
line-height: 1em;
height: 1em;
padding: 2px 0;
text-align: right;
background: green url(index.php?pf=importExport/progress.png) repeat-x top left;
color: white;
font-weight: bold;
-moz-border-radius: 2px;
}
</style>
<script type="text/javascript" src="index.php?pf=importExport/script.js"></script>
<script type="text/javascript">
//<![CDATA[
dotclear.msg.please_wait = '<?php
echo html::escapeJS(__("Please wait..."));
?>
';
//]]>
</script>
</head>
<body>
<?php
if ($type && $current_module !== null) {
echo '<h2><a href="' . $p_url . '">' . __('Import/Export') . '</a>' . ' › ' . html::escapeHTML($current_module->name) . '</h2>';
echo '<div id="ie-gui">';
$current_module->gui();
echo '</div>';
} else {
echo '<h2>' . __('Import/Export') . '</h2>';
示例4: _e
"
title="<?php
echo util::escapeAttrHTML(sprintf(__('c_c_action_Edit_%s'), $rsLanguages->title));
?>
"
class="icon pencil"><?php
_e('c_c_action_Edit');
?>
</a>
- <a href="configuration.php?action=languages&delete=<?php
echo $rsLanguages->id;
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('c_a_config_l10n_confirm_delete'));
?>
')"
title="<?php
echo util::escapeAttrHTML(sprintf(__('c_c_action_Delete_%s'), $rsLanguages->title));
?>
"
class="icon delete"><?php
_e('c_c_action_Delete');
?>
</a>
</li>
<?php
}
?>
示例5: printf
?>
')"
title="<?php
printf(__('c_c_action_Delete_%s'), html::escapeHTML($sFile));
?>
"
class="icon delete"><?php
_e('c_c_action_Delete');
?>
</a>
</li>
</ul>
</td>
</tr>
<?php
$iCountLine++;
}
?>
</tbody>
</table>
<p><a href="configuration.php?action=tools&all_cache_file=1"
onclick="return window.confirm('<?php
echo html::escapeJS(__('c_a_tools_cache_confirm_delete_all'));
?>
')"
class="icon cross"><?php
_e('c_a_tools_cache_delete_all');
?>
</a></p>
示例6:
<?php
# début Okatea : Gmap3 loader
$sJsGmap3Loader = '$("#google_map").gmap3({
map: {
address: "' . html::escapeJS($okt->contact->getAdressForGmap()) . '",
options: {
center: true,
zoom: ' . html::escapeJS($okt->contact->config->google_map['options']['zoom']) . ',
mapTypeId: google.maps.MapTypeId.' . html::escapeJS($okt->contact->config->google_map['options']['mode']) . '
}
},
infowindow:{
address: "' . html::escapeJS($okt->contact->getAdressForGmap()) . '",
options: {
content: "<div id=\\"infobulle\\"><strong>' . html::escapeJS(!empty($okt->config->company['com_name']) ? $okt->config->company['com_name'] : $okt->config->company['name']) . '</strong><br/> ' . html::escapeJS($okt->config->address['street']) . '<br/> ' . ($okt->config->address['street_2'] != '' ? html::escapeJS($okt->config->address['street_2']) . '<br/>' : '') . html::escapeJS($okt->config->address['code']) . ' ' . html::escapeJS($okt->config->address['city']) . '<br/> ' . html::escapeJS($okt->config->address['country']) . '</div>"
}
}
});';
# fin Okatea : Gmap3 loader
?>
<?php
# début Okatea : affichage du plan dans la page
if ($okt->contact->config->google_map['display'] == 'inside') {
$okt->page->js->addReady($sJsGmap3Loader);
}
# fin Okatea : affichage du plan dans la page
?>
<?php
示例7: _e
?>
<?php
echo html::escapeHTML($rsFields->title);
?>
"
class="icon paintbrush"><?php
_e('m_users_modify_value');
?>
</a>
- <a href="module.php?m=users&action=fields&delete=<?php
echo $rsFields->id;
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('m_users_confirm_field_deletion'));
?>
')"
title="Supprimer le champ <?php
echo html::escapeHTML($rsFields->title);
?>
"
class="icon delete"><?php
_e('c_c_action_Delete');
?>
</a>
</div>
</li>
<?php
}
示例8: __
$aActions[20] = '<a href="configuration.php?action=themes&use_mobile=' . $aTheme['id'] . '" class="button-mobile-used">' . __('c_a_themes_current_mobile') . '</a>';
} else {
$aActions[20] = '<a href="configuration.php?action=themes&use_mobile=' . $aTheme['id'] . '" class="button-use-mobile">' . __('c_a_themes_use_mobile') . '</a>';
}
if ($aTheme['is_tablet']) {
$aActions[30] = '<a href="configuration.php?action=themes&use_tablet=' . $aTheme['id'] . '" class="button-tablet-used">' . __('c_a_themes_current_tablet') . '</a>';
} else {
$aActions[30] = '<a href="configuration.php?action=themes&use_tablet=' . $aTheme['id'] . '" class="button-use-tablet">' . __('c_a_themes_use_tablet') . '</a>';
}
$aActions[40] = '<a href="configuration.php?action=theme_editor&theme=' . $aTheme['id'] . '" class="button-edit"></span>' . __('c_c_action_Edit') . '</a>';
$aActions[50] = '<a href="configuration.php?action=theme&theme_id=' . $aTheme['id'] . '" class="button-config">' . __('c_a_themes_config') . '</a>';
if (file_exists(OKT_THEMES_PATH . '/' . $aTheme['id'] . '/notes.md')) {
$aActions[60] = '<a href="configuration.php?action=themes&notes=' . $aTheme['id'] . '" class="button-notes">' . __('c_a_themes_notes') . '</a>';
}
if (!$aTheme['is_active'] && !$aTheme['is_mobile'] && !$aTheme['is_tablet']) {
$aActions[90] = '<a href="configuration.php?action=themes&delete=' . $aTheme['id'] . '" class="button-delete" onclick="return window.confirm(\'' . html::escapeJS(__('c_a_themes_delete_confirm')) . '\')"></span>' . __('c_c_action_Delete') . '</a>';
}
ksort($aActions);
?>
<div class="themeActions">
<?php
echo implode("\n", $aActions);
?>
</div>
</div>
</div>
<?php
}
?>
示例9: printf
title="<?php
printf(__('c_c_action_Edit_%s'), util::escapeAttrHTML($rsAccessories->title));
?>
"
class="icon pencil"><?php
_e('c_c_action_edit');
?>
</a>
</li>
<li>
<a href="module.php?m=estimate&action=accessories&delete_accessory=<?php
echo $rsAccessories->id;
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('m_estimate_estimate_accessory_delete_confirm'));
?>
')"
title="<?php
printf(__('c_c_action_Delete_%s'), util::escapeAttrHTML($rsAccessories->title));
?>
"
class="icon delete"><?php
_e('c_c_action_delete');
?>
</a>
</li>
</ul>
</td>
</tr>
<?php
示例10: foreach
foreach ($user_fav as $id) {
$fav = $core->favs->getFavorite($id);
if ($fav != false) {
// User favorites only
if ($count == 0) {
echo '<ul class="fav-list">';
}
$count++;
echo '<li id="fu-' . $id . '">' . '<label for="fuk-' . $id . '">' . '<img src="' . dc_admin_icon_url($fav['small-icon']) . '" alt="" /> ' . '<span class="zoom"><img src="' . dc_admin_icon_url($fav['large-icon']) . '" alt="" /></span>' . form::field(array('order[' . $id . ']'), 2, 3, $count, 'position', '', false, 'title="' . sprintf(__('position of %s'), $fav['title']) . '"') . form::hidden(array('dynorder[]', 'dynorder-' . $id . ''), $id) . form::checkbox(array('remove[]', 'fuk-' . $id), $id) . __($fav['title']) . '</label>' . '</li>';
}
}
if ($count > 0) {
echo '</ul>';
}
if ($count > 0) {
echo '<div class="clear">' . '<p>' . form::hidden('favs_order', '') . $core->formNonce() . '<input type="submit" name="saveorder" value="' . __('Save order') . '" /> ' . '<input type="submit" class="delete" name="removeaction" ' . 'value="' . __('Delete selected favorites') . '" ' . 'onclick="return window.confirm(\'' . html::escapeJS(__('Are you sure you want to remove selected favorites?')) . '\');" /></p>' . ($core->auth->isSuperAdmin() ? '<div class="info">' . '<p>' . __('If you are a super administrator, you may define this set of favorites to be used by default on all blogs of this installation.') . '</p>' . '<p><input class="reset" type="submit" name="replace" value="' . __('Define as default favorites') . '" />' . '</p>' . '</div>' : '') . '</div>';
} else {
echo '<p>' . __('Currently no personal favorites.') . '</p>';
}
$avail_fav = $core->favs->getFavorites($core->favs->getAvailableFavoritesIDs());
$default_fav_ids = array();
foreach ($core->favs->getFavoriteIDs(true) as $v) {
$default_fav_ids[$v] = true;
}
echo '</div>';
# /box my-fav
echo '<div class="fieldset" id="available-favs">';
# Available favorites
echo '<h5 class="pretty-title">' . __('Other available favorites') . '</h5>';
$count = 0;
function cmp($a, $b)
示例11: _e
class="icon pencil"><?php
_e('c_c_action_Edit');
?>
</a>
</li>
<?php
if ($okt->checkPerm('diary_remove')) {
?>
<li>
<a href="module.php?m=diary&action=delete&event_id=<?php
echo $rsEvents->id;
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('m_diary_confirm_deleting'));
?>
')"
title="<?php
printf(__('m_diary_delete_event_%s'), html::escapeHTML($rsEvents->title));
?>
"
class="icon delete"><?php
_e('c_c_action_Delete');
?>
</a>
</li>
<?php
}
?>
</ul>
示例12:
# fin Okatea : ajout du JS de scrollToTopOfPage
?>
<?php
# début Okatea : ajout du modal
$okt->page->applyLbl($okt->catalog->config->lightbox_type);
# fin Okatea : ajout du modal
?>
<?php
# début Okatea : javascript pour afficher les filtres s'ils sont repliés
if ($okt->catalog->config->enable_filters && !$okt->catalog->filters->params->show_filters) {
$okt->page->js->addReady('
var c = $("#catalog-filter-control").html("<a href=\\"#\\">' . html::escapeJS(__('m_catalog_display_filters')) . '</a>");
c.css("display","block");
$("#' . $okt->catalog->filters->getFilterFormId() . '").hide();
c.click(function() {
$("#' . $okt->catalog->filters->getFilterFormId() . '").slideDown("slow");
$(this).hide();
return false;
});
');
}
# fin Okatea : javascript pour afficher les filtres s'ils sont repliés
?>
示例13: __
echo form::hidden('links_order', '');
echo form::hidden(array('p'), 'menuFreshy');
echo $core->formNonce();
?>
<input type="submit" name="saveorder" value="<?php
echo __('Save order');
?>
" /></p>
<p class="col right"><input type="submit" name="removeaction"
value="<?php
echo __('Delete selected links');
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('Are you sure you you want to delete selected links?'));
?>
');" /></p>
</div>
</form>
</div>
<?php
echo '<div class="multi-part" id="add-link" title="' . __('Add a link') . '">' . '<form action="plugin.php" method="post" id="add-link-form">' . '<fieldset class="two-cols"><legend>' . __('Add a new link') . '</legend>' . '<p class="col"><label class="required" title="' . __('Required field') . '">' . __('Title:') . ' ' . form::field('link_title', 30, 255, $link_title, '', 2) . '</label></p>' . '<p class="col"><label class="required" title="' . __('Required field') . '">' . __('URL:') . ' ' . form::field('link_href', 30, 255, $link_href, '', 3) . '</label></p>' . '<p class="col"><label>' . __('Description:') . ' ' . form::field('link_desc', 30, 255, $link_desc, '', 4) . '</label></p>' . '<p class="col"><label>' . __('Language:') . ' ' . form::field('link_lang', 5, 5, $link_lang, '', 5) . '</label></p>' . '<p>' . form::hidden(array('p'), 'menuFreshy') . $core->formNonce() . '<input type="submit" name="add_link" value="' . __('save') . '" tabindex="6" /></p>' . '</fieldset>' . '</form>' . '</div>';
/*
echo
'<div class="multi-part" id="add-cat" title="'.__('Add a category').'">'.
'<form action="plugin.php" method="post" id="add-category-form">'.
'<fieldset><legend>'.__('Add a new category').'</legend>'.
'<p><label class=" classic required" title="'.__('Required field').'">'.__('Title:').' '.
示例14:
$combo_action[__('delete')] = 'delete';
}
$combo_action[__('add tags')] = 'tags';
if ($core->auth->check('delete,contentadmin', $core->blog->id)) {
$combo_action[__('remove tags')] = 'tags_remove';
}
?>
<html>
<head>
<title>Tags</title>
<link rel="stylesheet" type="text/css" href="index.php?pf=metadata/style.css" />
<script type="text/javascript" src="js/_posts_list.js"></script>
<script type="text/javascript">
//<![CDATA[
dotclear.msg.confirm_tag_delete = '<?php
echo html::escapeJS(sprintf(__('Are you sure you want to remove this %s?'), 'tag'));
?>
';
$(function() {
$('#tag_delete').submit(function() {
return window.confirm(dotclear.msg.confirm_tag_delete);
});
});
//]]>
</script>
</head>
<body>
<h2><?php
echo html::escapeHTML($core->blog->name);
?>
示例15:
<?php
# début Okatea : ajout du JS de gestion du formulaire de demande de devis
$okt->page->js->addFile(OKT_THEME . '/modules/estimate/estimate.form.js');
$okt->page->js->addReady('
$("#estimate_form").oktEstimateForm({
text: {
productTitle: "' . html::escapeJS(__('m_estimate_form_product_%s')) . '",
addProduct: "' . html::escapeJS(__('m_estimate_form_add_product')) . '",
removeProduct: "' . html::escapeJS(__('m_estimate_form_remove_product')) . '",
productLabel: "' . html::escapeJS(__('m_estimate_form_choose_product')) . '",
quantityLabel: "' . html::escapeJS(__('m_estimate_form_quantity')) . '",
accessoryLabel: "' . html::escapeJS(__('m_estimate_form_accessory_%s')) . '",
addAccessory: "' . html::escapeJS(__('m_estimate_form_add_accessory')) . '",
removeAccessory: "' . html::escapeJS(__('m_estimate_form_remove_accessory')) . '"
},
html: {
productsWrapper: "products_wrapper",
productWrapper: "product_wrapper",
productLine: "product_line",
productField: "p_product",
productQuantityField: "p_product_quantity",
addProductWrapper: "add_product_wrapper",
addProductLink: "add_product_link",
removeProductWrapper: "remove_product_wrapper",
removeProductLink: "remove_product_link",
accessoriesWrapper: "accessories_wrapper",
accessoryWrapper: "accessory_wrapper",
accessoryField: "p_accessory",
accessoryQuantityField: "p_accessory_quantity",