本文整理汇总了PHP中js_encode函数的典型用法代码示例。如果您正苦于以下问题:PHP js_encode函数的具体用法?PHP js_encode怎么用?PHP js_encode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了js_encode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: js_encode
/**
* Formatter data så det kan brukes i JavaScript variabler osv
* Ikke UTF-8 (slik som json_encode)
*
* @param string $value
*/
function js_encode($value)
{
if (is_null($value)) {
return 'null';
}
if ($value === false) {
return 'false';
}
if ($value === true) {
return 'true';
}
if (is_scalar($value)) {
if (is_string($value)) {
static $json_replace_from = array("\\", '"', "/", "", "\f", "\n", "\r", "\t");
static $json_replace_to = array("\\\\", '\\"', "\\/", "\\b", "\\f", "\\n", "\\r", "\\t");
return '"' . str_replace($json_replace_from, $json_replace_to, $value) . '"';
}
return $value;
}
if (!is_array($value) && !is_object($value)) {
return false;
}
$object = false;
for ($i = 0, reset($value), $len = count($value); $i < $len; $i++, next($value)) {
if (key($value) !== $i) {
$object = true;
break;
}
}
$result = array();
if ($object) {
foreach ($value as $k => $v) {
$result[] = js_encode($k) . ':' . js_encode($v);
}
return '{' . implode(",", $result) . '}';
}
foreach ($value as $v) {
$result[] = js_encode($v);
}
return '[' . implode(",", $result) . ']';
}
示例2: to_js
function to_js($var, $tabs = 0)
{
if (is_numeric($var)) {
return $var;
}
if (is_string($var)) {
return "'" . js_encode($var) . "'";
}
if (is_array($var)) {
$useObject = false;
foreach (array_keys($var) as $k) {
if (!is_numeric($k)) {
$useObject = true;
}
}
$js = array();
foreach ($var as $k => $v) {
$i = "";
if ($useObject) {
if (preg_match('#[a-zA-Z]+[a-zA-Z0-9]*#', $k)) {
$i .= "{$k}: ";
} else {
$i .= "'{$k}': ";
}
}
$i .= to_js($v, $tabs + 1);
$js[] = $i;
}
if ($useObject) {
$ret = "{\n" . tabify(implode(",\n", $js), $tabs) . "\n}";
} else {
$ret = "[\n" . tabify(implode(",\n", $js), $tabs) . "\n]";
}
return $ret;
}
return 'null';
}
示例3: array
require "../../app/ajax.php";
ajax::require_user();
// kontroller lås
ajax::validate_lock();
// hent alle utfordringer
$result = \Kofradia\DB::get()->query("SELECT poker_id, poker_starter_up_id, poker_time_start, poker_starter_cards, poker_cash FROM poker WHERE poker_state = 2 ORDER BY poker_cash");
$i = 0;
$data = array();
$html_to_parse = array();
while ($row = $result->fetch()) {
$d = array();
$d['self'] = $row['poker_starter_up_id'] == login::$user->player->id;
$html_to_parse[$i] = (!$d['self'] ? '<input type="radio" name="id" value="' . $row['poker_id'] . '" />' : '') . '<user id="' . $row['poker_starter_up_id'] . '" />';
$d['cash'] = game::format_cash($row['poker_cash']);
$d['reltime'] = poker_round::get_time_text($row['poker_time_start']);
if (access::has("admin")) {
$cards = new CardsPoker(explode(",", $row['poker_starter_cards']));
$d['cards'] = $cards->solve_text($cards->solve());
}
$data[$i++] = $d;
}
// parse html
if (count($html_to_parse) > 0) {
$html_to_parse = parse_html_array($html_to_parse);
foreach ($html_to_parse as $i => $value) {
$data[$i]['player'] = $value;
}
}
ajax::text(js_encode($data), ajax::TYPE_OK);
示例4: js_encode
$('#link').removeAttr('disabled');
$('#titleinput').show();
$('#include_li_label').show();
break;
case 'html':
$('#albumselector,#pageselector,#categoryselector,#custompageselector,#span_row').hide();
$('#selector').html('<?php
echo js_encode(gettext("HTML"));
?>
');
$('#description').html('<?php
echo js_encode(gettext('Inserts custom HTML.'));
?>
');
$('#link_label').html('<?php
echo js_encode(gettext('HTML'));
?>
');
$('#link').removeAttr('disabled');
$('#titleinput').show();
$('#include_li_label').show();
break;
case "":
$("#selector").html("");
$("#add").hide();
break;
}
}
//]]> -->
</script>
<script type="text/javascript">
示例5: js_echo
/**
* Echo js_encode string;
*
* @param string $text
* @return string
*/
function js_echo($text)
{
echo js_encode($text);
}
示例6: js_encode
?>
;
var newuser = $('#adminuser' + newuserid).val().replace(/^\s+|\s+$/g, "");
if (newuser == '')
return true;
if (newuser.indexOf('?') >= 0 || newuser.indexOf('&') >= 0 || newuser.indexOf('"') >= 0 || newuser.indexOf('\'') >= 0) {
alert('<?php
echo js_encode(gettext('User names may not contain “?”, “&", or quotation marks.'));
?>
');
return false;
}
for (i = 0; i < admins.length; i++) {
if (admins[i] == newuser) {
alert(sprintf('<?php
echo js_encode(gettext('The user “%s” already exists.'));
?>
', newuser));
return false;
}
}
return true;
}
// ]]> -->
</script>
<br class="clearall" />
<br />
</div><!-- end of tab_admin div -->
</div><!-- end of container -->
示例7: toggleTitlelink
return true;
}
}
function toggleTitlelink() {
if(jQuery('#edittitlelink:checked').val() == 1) {
$('#titlelink').removeAttr("disabled");
} else {
$('#titlelink').attr("disabled", true);
}
};
$(document).ready(function() {
$('form [name=checkeditems] #checkallaction').change(function(){
if($(this).val() == 'deleteall') {
// general text about "items" so it can be reused!
alert('<?php
echo js_encode(gettext('Are you sure you want to delete all selected items? THIS CANNOT BE UNDONE!'));
?>
');
}
});
});
// ]]> -->
</script>
</head>
<body>
<?php
printLogoAndLinks();
?>
<div id="main">
<?php
printTabs();
示例8: printAlbumEditRow
//.........这里部分代码省略.........
?>
</div>
<?php
if (extensionEnabled('hitcounter')) {
?>
<div class="page-list_icon">
<?php
if (!$enableEdit) {
?>
<img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php
echo gettext('unavailable');
?>
" />
<?php
} else {
?>
<a class="reset" href="?action=reset_hitcounters&albumid=<?php
echo $album->getID();
?>
&album=<?php
echo html_encode(pathurlencode($album->name));
?>
&subalbum=true&return=*<?php
echo html_encode(pathurlencode($owner));
?>
&XSRFToken=<?php
echo getXSRFToken('hitcounter');
?>
" title="<?php
echo sprintf(gettext('Reset hit counters for album %s'), $album->name);
?>
">
<img src="images/reset.png" style="border: 0px;" alt="" title="<?php
echo sprintf(gettext('Reset hit counters for the album %s'), $album->name);
?>
" />
</a>
<?php
}
?>
</div>
<?php
}
?>
<div class="page-list_icon">
<?php
$myalbum = $_zp_current_admin_obj->getAlbum();
$supress = !zp_loggedin(MANAGE_ALL_ALBUM_RIGHTS) && $myalbum && $album->getID() == $myalbum->getID();
if (!$enableEdit || $supress) {
?>
<img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php
echo gettext('unavailable');
?>
" />
<?php
} else {
?>
<a class="delete" href="javascript:confirmDeleteAlbum('?page=edit&action=deletealbum&album=<?php
echo urlencode(pathurlencode($album->name));
?>
&return=<?php
echo html_encode(pathurlencode($owner));
?>
&XSRFToken=<?php
echo getXSRFToken('delete');
?>
');" title="<?php
echo sprintf(gettext("Delete the album %s"), js_encode($album->name));
?>
">
<img src="images/fail.png" style="border: 0px;" alt="" title="<?php
echo sprintf(gettext('Delete the album %s'), js_encode($album->name));
?>
" />
</a>
<?php
}
?>
</div>
<?php
if ($enableEdit) {
?>
<div class="page-list_icon">
<input class="checkbox" type="checkbox" name="ids[]" value="<?php
echo $album->getFileName();
?>
" onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" <?php
if ($supress) {
echo ' disabled="disabled"';
}
?>
/>
</div>
<?php
}
?>
</div>
</div>
<?php
}
示例9: getJS
static function getJS()
{
$message = gettext_pl('This website uses cookies. By continuing to browse the site, you agree to our use of cookies.', 'zp_cookieconsent');
if (getOption('zpcookieconsent_message')) {
$message = get_language_string(getOption('zpcookieconsent_message'));
}
$dismiss = gettext_pl('Agree', 'zp_cookieconsent');
if (getOption('zpcookieconsent_buttonagree')) {
$dismiss = get_language_string(getOption('zpcookieconsent_buttonagree'));
}
$learnmore = gettext_pl('More info', 'zp_cookieconsent');
if (getOption('zpcookieconsent_buttonlearnmore')) {
$learnmore = get_language_string(getOption('zpcookieconsent_buttonlearnmore'));
}
$link = getOption('zpcookieconsent_buttonlearnmorelink');
$theme = '';
if (getOption('zpcookieconsent_theme')) {
$theme = FULLWEBPATH . '/' . USER_PLUGIN_FOLDER . '/zp_cookieconsent/styles/' . getOption('zpcookieconsent_theme') . '.css';
}
$domain = '';
if (getOption('zpcookieconsent_domain')) {
$domain = getOption('zpcookieconsent_domain');
}
$DoC = false;
if (getOption('zpcookieconsent_dismissonclick')) {
$DoC = true;
}
$DoS = false;
if (getOption('zpcookieconsent_dismissonscroll') & !strpos($link, $_SERVER['REQUEST_URI'])) {
// false in Cookie Policy Page
$DoS = true;
}
?>
<script>
window.cookieconsent_options = {
message: '<?php
echo js_encode($message);
?>
',
dismiss: '<?php
echo js_encode($dismiss);
?>
',
learnMore: '<?php
echo $learnmore;
?>
',
theme: '<?php
echo $theme;
?>
',
link: '<?php
echo html_encode($link);
?>
',
domain: '<?php
echo $domain;
?>
',
expiryDays: <?php
echo getOption('zpcookieconsent_expirydays');
?>
};
<?php
if ($DoC || $DoS) {
// dismiss on-click or on-scroll
if ($DoC) {
// dismiss on-click
?>
$('a').not('[href*=#]').on('click', DismissOnClick);
function DismissOnClick() {
var isInternalLink = new RegExp('/' + window.location.host + '/');
if ( isInternalLink.test(this.href)) {
fatto(0);
}
}
<?php
}
if ($DoS) {
// Dismiss on-scroll
?>
var IniScroll, noHurry;
$(window).load(function (){
if(noHurry) {
window.clearTimeout(noHurry);
}
noHurry = window.setTimeout(function() {
IniScroll = $(window).scrollTop();
$(window).on("scroll",DismissOnScroll);
}, 500);
});
function DismissOnScroll() {
var NewScroll = $(window).scrollTop();
if (Math.abs(NewScroll - IniScroll) > <?php
echo getOption('zpcookieconsent_scrollrange');
?>
) {
fatto(1);
//.........这里部分代码省略.........
示例10: printAlbumMap
/**
* Causes a Google map to be printed based on the gps data in all the images in the album
* @param string $zoomlevel the zoom in for the map. NULL will use the default
* @param string $defaultmaptype the starting display of the map valid values are G_NORMAL_MAP | G_SATELLITE_MAP | G_HYBRID_MAP | G_PHYSICAL_MAP | G_SATELLITE_3D_MAP
* @param int $width is the image width of the map. NULL will use the default
* @param int $height is the image height of the map. NULL will use the default
* @param string $text text for the pop-up link
* @param bool $toggle set to true to hide initially
* @param string $id DIV id
* @param int $firstPageImages the number of images on transition pages.
* @param array $mapselections array of the maps to be used.
* @param bool $addphysical Adds physical map.
* @param bool $addwiki Adds wikipedia georeferenced data on your maps
* @param string $background the background color for the map
* @param string $mapcontrol values None | Small | Large
* @param string $maptypecontrol values Buttons | List
* @param string $customJS the extra javascript needed by the theme
*/
function printAlbumMap($zoomlevel = NULL, $defaultmaptype = NULL, $width = NULL, $height = NULL, $text = '', $toggle = true, $id = 'googlemap', $firstPageImages = 0, $mapselections = NULL, $addwiki = NULL, $background = NULL, $mapcontrol = NULL, $maptypecontrol = NULL, $customJS = NULL)
{
global $_zp_phoogle, $_zp_images, $_zp_current_album, $_zp_current_image;
if (getOption('gmaps_apikey') != '') {
$foundLocation = false;
$defaultmaptype = setupAllowedMaps($defaultmaptype, $mapselections);
if ($zoomlevel) {
$_zp_phoogle->zoomLevel = $zoomlevel;
}
if (!is_null($width)) {
$_zp_phoogle->setWidth($width);
} else {
$_zp_phoogle->setWidth(getOption('gmaps_width'));
}
if (!is_null($height)) {
$_zp_phoogle->setHeight($height);
} else {
$_zp_phoogle->setHeight(getOption('gmaps_height'));
}
if (!is_null($mapcontrol)) {
$_zp_phoogle->setControlMap($mapcontrol);
} else {
$_zp_phoogle->setControlMap(getOption('gmaps_control'));
}
if (!is_null($maptypecontrol)) {
$_zp_phoogle->setControlMapType($maptypecontrol);
} else {
$_zp_phoogle->setControlMapType(getOption('gmaps_control_maptype'));
}
if (!is_null($background)) {
$_zp_phoogle->setBackGround($background);
} else {
$_zp_phoogle->setBackGround(getOption('gmaps_background'));
}
if (!is_null($customJS)) {
$_zp_phoogle->customJS = $customJS;
}
resetCurrentAlbum();
// start from scratch
while (next_image(getOption('gmaps_show_all_album_points'), $firstPageImages)) {
$exif = getImageEXIFData();
if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) {
$foundLocation = true;
$lat = $exif['EXIFGPSLatitude'];
$long = $exif['EXIFGPSLongitude'];
if ($exif['EXIFGPSLatitudeRef'] == 'S') {
$lat = '-' . $lat;
}
if ($exif['EXIFGPSLongitudeRef'] == 'W') {
$long = '-' . $long;
}
$infoHTML = '<a href="' . pathurlencode(getImageLinkURL()) . '"><img src="' . pathurlencode(getImageThumb()) . '" alt="' . getImageDesc() . '" ' . 'style=" margin-left: 30%; margin-right: 10%; border: 0px; "/></a>' . '<p>' . getImageDesc() . '</p>';
addPoint($lat, $long, js_encode($infoHTML));
}
}
resetCurrentAlbum();
// clear out any 'damage'
if ($foundLocation) {
$dataid = $id . '_data';
//to avoid problems with google earth and the toggle options, the toggle option is removed from here when GE is activated
//it is possible to have both functionnality work but the toogle option should then be integrated in the phoogle map class dirctly within the script
//that calls the map and should alos trigger a map type change. check Sobre theme or have alook at www.kaugite.com for an example
$toggle = $toggle && $defaultmaptype != 'G_SATELLITE_3D_MAP';
if (is_null($text)) {
$text = gettext('Google Map');
}
echo "<a href=\"javascript: vtoggle('{$dataid}');\" title=\"" . gettext('Display or hide the Google Map.') . "\">";
echo $text;
echo "</a>\n";
echo " <div id=\"{$dataid}\"" . ($toggle ? " style=\"color:black; visibility: hidden;position:absolute;left: -3000px;top: -3000px\"" : '') . ">\n";
$_zp_phoogle->showMap(is_null($zoomlevel));
echo " </div>\n";
}
}
}
示例11: show
/**
* Vis banken
*/
protected function show()
{
ess::$b->page->add_js('
var user_bank = ' . js_encode(game::format_cash($this->up->data['up_bank'])) . ';
var user_cash = ' . js_encode(game::format_cash($this->up->data['up_cash'])) . ';');
ess::$b->page->add_js_domready('
$$(".bank_amount_set").each(function(elm)
{
var amount = elm.get("rel").substring(0, 4) == "bank" ? user_bank : user_cash;
var e_id = elm.get("rel").substring(5);
elm
.appendText(" (")
.grab(new Element("a", {"text":"alt"}).addEvent("click", function()
{
$(e_id).set("value", amount);
}))
.appendText(")");
});');
echo '
<div class="bg1_c small" style="width: 420px">
<h1 class="bg1">
Banken
<span class="left"></span><span class="right"></span>
</h1>
<p class="h_left">
<a href="' . ess::$s['rpath'] . '/node/31">Hjelp</a>
</p>
<p class="h_right">' . (!isset(login::$extended_access['authed']) ? '
<a href="banken?logout">Logg ut av banken</a>' : '') . '
<a href="banken?authc">Endre pass</a>
</p>
<div class="bg1" style="padding: 0 15px">
<!-- bankkonto informasjon -->
<div style="width: 50%; margin-left: -5px; float: left">
<h2 class="bg1">Bankkonto informasjon<span class="left2"></span><span class="right2"></span></h2>
<div class="bg1">
<dl class="dd_right">
<dt>Kontoeier</dt>
<dd>' . game::profile_link() . '</dd>
<dt>Bankfirma</dt>
<dd><a href="ff/?ff_id=' . $this->bank->id . '">' . htmlspecialchars($this->bank->data['ff_name']) . '</a></dd>
<dt><abbr title="Overføringstap">Overf.tap</abbr></dt>
<dd>' . $this->bank->overforingstap * 100 . ' %</dd>
<dt>Plassering</dt>
<dd>' . (!isset(game::$bydeler[$this->bank->data['br_b_id']]) ? '<span style="color: #777777">Ukjent</span>' : htmlspecialchars(game::$bydeler[$this->bank->data['br_b_id']]['name'])) . '</dd>
<dt>Balanse</dt>
<dd>' . game::format_cash($this->up->data['up_bank']) . '</dd>
</dl>
<p class="c">
<a href="javascript:void(0)" onclick="this.parentNode.style.display=\'none\'; document.getElementById(\'bank_stats\').style.display=\'block\'">Vis statistikk</a>
</p>
<div id="bank_stats" style="display: none">
<dl class="dd_right">
<dt>Sendt</dt>
<dd>' . game::format_number($this->up->data['up_bank_num_sent']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_bank_sent']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Mottatt</dt>
<dd>' . game::format_number($this->up->data['up_bank_num_received']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_bank_received']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Overskudd</dt>
<dd>' . game::format_cash($this->up->data['up_bank_profit']) . '</dd>
</dl>
<dl class="dd_right">
<dt><abbr title="Overføringstap">Overf.tap</abbr></dt>
<dd>' . game::format_cash($this->up->data['up_bank_charge']) . '</dd>
</dl>
<dl class="dd_right">
<dt>Renter</dt>
<dd>' . game::format_number($this->up->data['up_interest_num']) . ' stk</dd>
<dd>' . game::format_cash($this->up->data['up_interest_total']) . '</dd>
</dl>
</div>
<form action="" method="post">
<p class="c">' . show_sbutton("Bytt bank", 'name="switch"') . '</p>
</form>
</div>
</div>
<!-- send penger -->
<div style="width: 50%; margin-right: -5px; float: right">
<h2 class="bg1">Send penger<span class="left2"></span><span class="right2"></span></h2>
<div class="bg1">
<form action="" method="post">
<input type="hidden" name="sid" value="' . login::$info['ses_id'] . '" />
<input type="hidden" name="a" value="send" />
<dl class="dd_right dl_2x">
<dt>Mottaker</dt>
<dd><input type="text" name="mottaker" value="' . htmlspecialchars(postval("mottaker")) . '" class="styled w100" /></dd>
<dt>Kontakt?</dt>
<dd>
<select onchange="if(this.value==\'\')var name=prompt(\'Brukernavn?\');else var name=this.value;if(name)document.getElementsByName(\'mottaker\')[0].value=name;this.selectedIndex=0" style="width: 110px; overflow: hidden">
<option>Velg kontakt</option>';
//.........这里部分代码省略.........
示例12: round
<![endif]-->';
// mootools
if (MAIN_SERVER) {
$head .= '
<script src="' . LIB_HTTP . '/mootools/mootools-1.2.x-yc.js" type="text/javascript"></script>';
} else {
$head .= '
<script src="' . LIB_HTTP . '/mootools/mootools-1.2.x-core-nc.js" type="text/javascript"></script>
<script src="' . LIB_HTTP . '/mootools/mootools-1.2.x-more-nc.js" type="text/javascript"></script>';
}
$head .= '
<script type="text/javascript">var js_mootools_loaded = (new Date).getTime();</script>
<script src="' . ess::$s['relative_path'] . '/js/default.js?update=' . @filemtime(dirname(dirname(dirname("js/default.js")))) . '" type="text/javascript"></script>';
ess::$b->page->add_js('var serverTime=' . round(microtime(true) + ess::$b->date->timezone->getOffset(ess::$b->date->get()), 3) * 1000 . ',relative_path=' . js_encode(ess::$s['relative_path']) . ',static_link=' . js_encode(STATIC_LINK) . ',imgs_http=' . js_encode(IMGS_HTTP) . ',pcookie=' . js_encode(ess::$s['cookie_prefix']) . ';');
if (login::$logged_in) {
ess::$b->page->add_js('var pm_new=' . login::$user->data['u_inbox_new'] . ',log_new=' . (login::$user->player->data['up_log_new'] + login::$user->player->data['up_log_ff_new']) . ',http_path=' . js_encode(ess::$s['http_path']) . ',https_path=' . js_encode(ess::$s['https_path'] ? ess::$s['https_path'] : ess::$s['http_path']) . ',use_https=' . (login::is_force_https() ? "true" : "false") . ';');
}
if (defined("LOCK") && LOCK) {
ess::$b->page->add_js('var theme_lock=true;');
}
}
// legg til øverst i head
ess::$b->page->head = $head . ess::$b->page->head;
// sett opp nettleser "layout engine" til CSS
$list = array("opera" => "presto", "applewebkit" => "webkit", "msie 8" => "trident6 trident", "msie 7" => "trident5 trident", "msie 6" => "trident4 trident", "gecko" => "gecko");
$class_browser = 'unknown_engine';
$browser = mb_strtolower($_SERVER['HTTP_USER_AGENT']);
foreach ($list as $key => $item) {
if (mb_strpos($browser, $key) !== false) {
$class_browser = $item;
break;
示例13: embed_string
public static function embed_string($name, $data_file, $width = 300, $height = 200)
{
return 'swfobject.embedSWF("' . LIB_HTTP . '/ofc/open-flash-chart.swf", ' . js_encode($name) . ', ' . js_encode($width) . ', ' . js_encode($height) . ', "9.0.0", false, {"data-file": "' . urlencode($data_file) . '"});';
}
示例14: getJS
static function getJS()
{
$message = gettext_pl('This website uses cookies. By continuing to browse the site, you agree to our use of cookies.', 'zp_cookieconsent');
if (getOption('zpcookieconsent_message')) {
$message = get_language_string(getOption('zpcookieconsent_message'));
}
$dismiss = gettext_pl('Agree', 'zp_cookieconsent');
if (getOption('zpcookieconsent_buttonagree')) {
$dismiss = get_language_string(getOption('zpcookieconsent_buttonagree'));
}
$learnmore = gettext_pl('More info', 'zp_cookieconsent');
if (getOption('zpcookieconsent_buttonlearnmore')) {
$learnmore = get_language_string(getOption('zpcookieconsent_buttonlearnmore'));
}
$link = getOption('zpcookieconsent_buttonlearnmorelink');
$theme = '';
if (getOption('zpcookieconsent_theme')) {
$theme = FULLWEBPATH . '/' . USER_PLUGIN_FOLDER . '/zp_cookieconsent/styles/' . getOption('zpcookieconsent_theme') . '.css';
}
$domain = '';
if (getOption('zpcookieconsent_domain')) {
$domain = getOption('zpcookieconsent_domain');
}
?>
<script>
window.cookieconsent_options = {
message: '<?php
echo js_encode($message);
?>
',
dismiss: '<?php
echo js_encode($dismiss);
?>
',
learnMore: '<?php
echo $learnmore;
?>
',
theme: '<?php
echo $theme;
?>
',
link: '<?php
echo html_encode($link);
?>
',
domain: '<?php
echo $domain;
?>
',
expiryDays: <?php
echo getOption('zpcookieconsent_expirydays');
?>
};
</script>
<script src="<?php
echo FULLWEBPATH . '/' . USER_PLUGIN_FOLDER;
?>
/zp_cookieconsent/cookieconsent.min.js"></script>
<?php
}
示例15: printAlbumEditRow
//.........这里部分代码省略.........
echo pathurlencode(dirname($album->name));
?>
&XSRFToken=<?php
echo getXSRFToken('refresh');
?>
" title="<?php
echo sprintf(gettext('Refresh metadata for the album %s'), $album->name);
?>
">
<img src="images/refresh1.png" style="border: 0px;" alt="" title="<?php
echo sprintf(gettext('Refresh metadata in the album %s'), $album->name);
?>
" />
</a>
<?php
}
?>
</div>
<div class="page-list_icon">
<?php
if ($album->isDynamic() || !$enableEdit) {
?>
<img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php
echo gettext('unavailable');
?>
" />
<?php
} else {
?>
<a class="reset" href="?action=reset_hitcounters&albumid=<?php
echo $album->getAlbumID();
?>
&album=<?php
echo pathurlencode($album->name);
?>
&subalbum=true&XSRFToken=<?php
echo getXSRFToken('hitcounter');
?>
" title="<?php
echo sprintf(gettext('Reset hitcounters for album %s'), $album->name);
?>
">
<img src="images/reset.png" style="border: 0px;" alt="" title="<?php
echo sprintf(gettext('Reset hitcounters for the album %s'), $album->name);
?>
" />
</a>
<?php
}
?>
</div>
<div class="page-list_icon">
<?php
if (!$enableEdit) {
?>
<img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php
echo gettext('unavailable');
?>
" />
<?php
} else {
?>
<a class="delete" href="javascript:confirmDeleteAlbum('?page=edit&action=deletealbum&album=<?php
echo urlencode(pathurlencode($album->name));
?>
&return=*<?php
echo pathurlencode(dirname($album->name));
?>
&XSRFToken=<?php
echo getXSRFToken('delete');
?>
');" title="<?php
echo sprintf(gettext("Delete the album %s"), js_encode($album->name));
?>
">
<img src="images/fail.png" style="border: 0px;" alt="" title="<?php
echo sprintf(gettext('Delete the album %s'), js_encode($album->name));
?>
" />
</a>
<?php
}
?>
</div>
<?php
if ($enableEdit) {
?>
<div class="page-list_icon">
<input class="checkbox" type="checkbox" name="ids[]" value="<?php
echo $album->getFolder();
?>
" onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" />
</div>
<?php
}
?>
</div>
</div>
<?php
}