本文整理汇总了PHP中pathurlencode函数的典型用法代码示例。如果您正苦于以下问题:PHP pathurlencode函数的具体用法?PHP pathurlencode怎么用?PHP pathurlencode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pathurlencode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: load_request
static function load_request($allow)
{
$uri = getRequestURI();
$parts = explode('?', $uri);
$uri = $parts[0];
$path = ltrim(substr($uri, strlen(WEBPATH) + 1), '/');
if (empty($path)) {
return $allow;
} else {
$rest = strpos($path, '/');
if ($rest === false) {
if (strpos($path, '?') === 0) {
// only a parameter string
return $allow;
}
$l = $path;
} else {
$l = substr($path, 0, $rest);
}
}
$locale = validateLocale($l, 'seo_locale');
if ($locale) {
// set the language cookie and redirect to the "base" url
zp_setCookie('dynamic_locale', $locale);
$uri = pathurlencode(preg_replace('|/' . $l . '[/$]|', '/', $uri));
if (isset($parts[1])) {
$uri .= '?' . $parts[1];
}
header("HTTP/1.0 302 Found");
header("Status: 302 Found");
header('Location: ' . $uri);
exitZP();
}
return $allow;
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:35,代码来源:seo_locale.php
示例2: ratingJS
function ratingJS()
{
$ME = substr(basename(__FILE__), 0, -4);
?>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $ME;
?>
/jquery.MetaData.js"></script>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $ME;
?>
/jquery.rating.js"></script>
<?php
$css = getPlugin('rating/jquery.rating.css', true, true);
?>
<link rel="stylesheet" href="<?php
echo pathurlencode($css);
?>
" type="text/css" />
<script type="text/javascript">
// <!-- <![CDATA[
$.fn.rating.options = { cancel: '<?php
echo gettext('retract');
?>
' };
// ]]> -->
</script>
<?php
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:29,代码来源:rating.php
示例3: getAlbumLink
function getAlbumLink($album = NULL, $page = 1)
{
if (!isset($album)) {
$album = $this->album;
}
$link = rewrite_path("/" . pathurlencode($this->album->name) . "/page/" . $page, "/index.php?album=" . urlencode($this->album->name) . "&page=" . $page);
return $link;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:8,代码来源:GalleryController.php
示例4: edit_crop_image
function edit_crop_image($output, $image, $prefix, $subpage, $tagsort)
{
$album = $image->getAlbum();
$albumname = $album->name;
$imagename = $image->filename;
if (isImagePhoto($image)) {
$output .= '<p class="buttons" >' . "\n" . '<a href="' . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/crop_image.php?a=' . pathurlencode($albumname) . "\n" . '&i=' . urlencode($imagename) . '&performcrop=backend&subpage=' . $subpage . '&tagsort=' . $tagsort . '">' . "\n" . '<img src="images/shape_handles.png" alt="" />' . gettext("Crop image") . '</a>' . "\n" . '</p>' . "\n" . '<span style="line-height: 0em;"><br clear="all" /></span>' . "\n";
}
return $output;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:10,代码来源:crop_image.php
示例5: zpurl
/**
* Returns the URL of any main page (image/album/page#/etc.) in any form
* desired (rewrite or query-string).
* @param $with_rewrite boolean or null, whether the returned path should be in rewrite form.
* Defaults to null, meaning use the mod_rewrite configuration to decide.
* @param $album : the Album object to use in the path. Defaults to the current album (if null).
* @param $image : the Image object to use in the path. Defaults to the current image (if null).
* @param $page : the page number to use in the path. Defaults to the current page (if null).
*/
function zpurl($with_rewrite = NULL, $album = NULL, $image = NULL, $page = NULL, $special = '')
{
global $_zp_current_album, $_zp_current_image, $_zp_page;
// Set defaults
if ($with_rewrite === NULL) {
$with_rewrite = MOD_REWRITE;
}
if (!$album) {
$album = $_zp_current_album;
}
if (!$image) {
$image = $_zp_current_image;
}
if (!$page) {
$page = $_zp_page;
}
$url = '';
if ($with_rewrite) {
if (in_context(ZP_IMAGE)) {
$encoded_suffix = implode('/', array_map('rawurlencode', explode('/', IM_SUFFIX)));
$url = pathurlencode($album->name) . '/' . rawurlencode($image->filename) . $encoded_suffix;
} else {
if (in_context(ZP_ALBUM)) {
$url = pathurlencode($album->name) . ($page > 1 ? '/page/' . $page : '');
} else {
if (in_context(ZP_INDEX)) {
$url = $page > 1 ? 'page/' . $page : '';
}
}
}
} else {
if (in_context(ZP_IMAGE)) {
$url = 'index.php?album=' . pathurlencode($album->name) . '&image=' . rawurlencode($image->filename);
} else {
if (in_context(ZP_ALBUM)) {
$url = 'index.php?album=' . pathurlencode($album->name) . ($page > 1 ? '&page=' . $page : '');
} else {
if (in_context(ZP_INDEX)) {
$url = 'index.php' . ($page > 1 ? '?page=' . $page : '');
}
}
}
}
if ($url == IM_SUFFIX || empty($url)) {
$url = '';
}
if (!empty($url) && !empty($special)) {
if ($page > 1) {
$url .= "&{$special}";
} else {
$url .= "?{$special}";
}
}
return $url;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:64,代码来源:functions-controller.php
示例6: construct_path_links
function construct_path_links($path, $toplevelname)
{
$path = explode('/', rtrim('/' . $path, '/'));
$apath = '';
$links = array();
foreach ($path as $n => $current) {
$apath .= $current . ($n ? '/' : '');
$links[] = '<a href="./' . ($n ? '?dir=' . pathurlencode(rtrim($apath, '/')) : '') . '">' . htmlentities($n ? $current : $toplevelname) . '</a>/';
}
return implode('', $links);
}
开发者ID:hafizubikm,项目名称:bakeme,代码行数:11,代码来源:functions.php
示例7: m9PrintBreadcrumb
function m9PrintBreadcrumb()
{
global $_zp_current_album, $_zp_last_album;
$parents = getParentAlbums();
$n = count($parents);
if ($n > 0) {
foreach ($parents as $parent) {
$url = rewrite_path("/" . pathurlencode($parent->name) . "/", "/index.php?album=" . urlencode($parent->name));
echo '<li><a href="' . htmlspecialchars($url) . '">' . html_encode($parent->getTitle()) . '</a></li>';
}
}
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:12,代码来源:functions.php
示例8: JS
static function JS()
{
// the scripts needed
?>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/tag_suggest/encoder.js"></script>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/tag_suggest/tag.js"></script>
<?php
$css = getPlugin('tag_suggest/tag.css', true, true);
?>
<link type="text/css" rel="stylesheet" href="<?php
echo pathurlencode($css);
?>
" />
<?php
$taglist = getAllTagsUnique(OFFSET_PATH ? false : NULL, OFFSET_PATH ? 0 : getOption('tag_suggest_threshold'));
$tags = array();
foreach ($taglist as $tag) {
$tags[] = addslashes($tag);
}
if (OFFSET_PATH || getOption('search_space_is') == 'OR') {
$tagseparator = ' ';
} else {
$tagseparator = ',';
}
?>
<script type="text/javascript">
// <!-- <![CDATA[
var _tagList = ["<?php
echo implode($tags, '","');
?>
"];
$(function () {
$('#search_input, #edit-editable_4, .tagsuggest').tagSuggest({separator: '<?php
echo $tagseparator;
?>
', tags: _tagList, quoteSpecial: <?php
echo OFFSET_PATH ? 'false' : 'true';
?>
})
});
// ]]> -->
</script>
<?php
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:50,代码来源:tag_suggest.php
示例9: edit
static function edit($output, $image, $prefix, $subpage, $tagsort)
{
if (isImagePhoto($image)) {
if (is_array($image->filename)) {
$albumname = dirname($image->filename['source']);
$imagename = basename($image->filename['source']);
} else {
$albumname = $image->albumlink;
$imagename = $image->filename;
}
$output .= '<div class="button buttons tooltip" title="' . gettext('Permanently crop the actual image.') . '">' . "\n" . '<a href="' . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/crop_image.php?a=' . pathurlencode($albumname) . "\n" . '&i=' . urlencode($imagename) . '&performcrop=backend&subpage=' . $subpage . '&tagsort=' . html_encode($tagsort) . '">' . "\n" . '<img src="images/shape_handles.png" alt="" />' . gettext("Crop image") . '</a>' . "\n" . '<br class="clearall" />' . '</div>' . "\n";
}
return $output;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:14,代码来源:crop_image.php
示例10: tagSuggestJS
function tagSuggestJS()
{
// the scripts needed
?>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/encoder.js"></script>
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/tag.js"></script>
<?php
$css = getPlugin('tag_suggest/tag.css', true, true);
?>
<link type="text/css" rel="stylesheet" href="<?php
echo pathurlencode($css);
?>
" />
<?php
$taglist = getAllTagsUnique();
$c = 0;
$list = '';
foreach ($taglist as $tag) {
if ($c > 0) {
$list .= ',';
}
$c++;
$list .= '"' . addslashes(sanitize($tag, 3)) . '"';
}
?>
<script type="text/javascript">
// <!-- <![CDATA[
var _tagList = [<?php
echo $list;
?>
];
$(function () {
$('#search_input, #edit-editable_4').tagSuggest({ separator:'<?php
echo getOption('search_space_is') == 'OR' ? ' ' : ',';
?>
', tags: _tagList })
});
// ]]> -->
</script>
<?php
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:47,代码来源:tag_suggest.php
示例11: externalLinkBox
function externalLinkBox($prior, $image, $prefix, $subpage, $tagsort)
{
if ($prior) {
$prior .= '<br /><hr>';
}
if (isset($_SESSION['externalLinksize_' . $prefix])) {
$size = sanitize_numeric($_SESSION['externalLinksize_' . $prefix]);
unset($_SESSION['externalLinksize_' . $prefix]);
} else {
$size = false;
}
$output = $img = '';
if ($size) {
$link = $image->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
$img = ' <img src="' . html_encode(pathurlencode($link)) . '" height="15" width="15" />';
$output .= '<input type="text" style="width:100%" value="' . html_encode($link) . '" />';
}
$output .= gettext('link for image of size:') . ' <input type="text" name="externalLinksize_' . $prefix . '" size="3" value="' . $size . '" />' . $img;
return $prior . $output;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:20,代码来源:externalLink.php
示例12: createAlbumZip
/**
* Creates a zip file of the album
*
* @param string $albumname album folder
*/
function createAlbumZip($albumname)
{
global $_zp_zip_list, $zip_gallery;
$zip_gallery = new Gallery();
$album = new Album($zip_gallery, $albumname);
if (!$album->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumname)) {
pageError(403, gettext("Forbidden"));
exit;
}
if (!$album->exists) {
pageError(404, gettext('Album not found'));
exit;
}
$persist = $zip_gallery->getPersistentArchive();
$dest = $album->localpath . '.zip';
if (!$persist || !file_exists($dest)) {
include_once 'archive.php';
$curdir = getcwd();
chdir($album->localpath);
$_zp_zip_list = array();
$z = new zip_file($dest);
$z->set_options(array('basedir' => realpath($album->localpath . '/'), 'inmemory' => 0, 'recurse' => 0, 'storepaths' => 1));
zipAddAlbum($album, strlen($albumname), $z);
$z->add_files($_zp_zip_list);
$z->create_archive();
unset($_zp_zip_list);
chdir($curdir);
}
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . pathurlencode($albumname) . '.zip"');
header("Content-Length: " . filesize($dest));
printLargeFileContents($dest);
if (!$persist) {
unlink($dest);
}
unset($zip_gallery);
unset($album);
unset($persist);
unset($dest);
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:45,代码来源:album-zip.php
示例13: getContent
/**
* Returns the content of the text file
*
* @param int $w optional width
* @param int $h optional height
* @return string
*/
function getContent($w = NULL, $h = NULL)
{
$this->updateDimensions();
if (is_null($w)) {
$w = $this->getWidth();
}
if (is_null($h)) {
$h = $this->getHeight();
}
$providers = array('' => '<img src="' . html_encode(pathurlencode($this->getThumb())) . '">', 'google' => '<iframe src="http://docs.google.com/viewer?url=%s&embedded=true" width="' . $w . 'px" height="' . $h . 'px" frameborder="0" border="none" scrolling="auto"></iframe>', 'zoho' => '<iframe src="http://viewer.zoho.com/api/urlview.do?url=%s&embed=true" width="' . $w . 'px" height="' . $h . 'px" frameborder="0" border="none" scrolling="auto"></iframe>', 'local' => '<iframe src="%s" width="' . $w . 'px" height="' . $h . 'px" frameborder="0" border="none" scrolling="auto"></iframe>');
switch ($suffix = getSuffix($this->filename)) {
case 'ppt':
$suffix = 'pps';
case 'tiff':
$suffix = substr($suffix, 0, 3);
case 'tif':
case 'pps':
case 'pdf':
$provider = 'WEBdocs_' . $suffix . '_provider';
return sprintf($providers[getOption($provider)], html_encode($this->getFullImageURL(FULLWEBPATH)));
default:
// just in case we extend and are lazy...
return '<img src="' . html_encode(pathurlencode($this->getThumb())) . '">';
}
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:32,代码来源:class-WEBdocs.php
示例14: getItemGallery
/**
* Gets the feed item data in a gallery feed
*
* @param object $item Object of an image or album
* @return array
*/
protected function getItemGallery($item)
{
if ($this->mode == "albums") {
$albumobj = newAlbum($item['folder']);
$totalimages = $albumobj->getNumImages();
$itemlink = $this->host . pathurlencode($albumobj->getLink());
$thumb = $albumobj->getAlbumThumbImage();
$title = $albumobj->getTitle($this->locale);
$filechangedate = filectime(ALBUM_FOLDER_SERVERPATH . internalToFilesystem($albumobj->name));
$latestimage = query_single_row("SELECT mtime FROM " . prefix('images') . " WHERE albumid = " . $albumobj->getID() . " AND `show` = 1 ORDER BY id DESC");
if ($latestimage && $this->sortorder == 'latestupdated') {
$count = db_count('images', "WHERE albumid = " . $albumobj->getID() . " AND mtime = " . $latestimage['mtime']);
} else {
$count = $totalimages;
}
if ($count != 0) {
$imagenumber = sprintf(ngettext('%s (%u image)', '%s (%u images)', $count), $title, $count);
} else {
$imagenumber = $title;
}
$feeditem['desc'] = $albumobj->getDesc($this->locale);
$feeditem['title'] = $imagenumber;
$feeditem['pubdate'] = date("r", strtotime($albumobj->getDateTime()));
} else {
if (isAlbumClass($item)) {
$albumobj = $item;
$thumb = $albumobj->getAlbumThumbImage();
} else {
$albumobj = $item->getAlbum();
$thumb = $item;
}
$itemlink = $this->host . $item->getLink();
$title = $item->getTitle($this->locale);
$feeditem['desc'] = $item->getDesc($this->locale);
$feeditem['title'] = sprintf('%1$s (%2$s)', $item->getTitle($this->locale), $albumobj->getTitle($this->locale));
$feeditem['pubdate'] = date("r", strtotime($item->getDateTime()));
}
//link
$feeditem['link'] = $itemlink;
//category
$feeditem['category'] = html_encode($albumobj->getTitle($this->locale));
//media content
$feeditem['media_content'] = '<image url="' . PROTOCOL . '://' . html_encode($thumb->getCustomImage($this->imagesize, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . '" />';
$feeditem['media_thumbnail'] = '<thumbnail url="' . PROTOCOL . '://' . html_encode($thumb->getThumb()) . '" />';
return $feeditem;
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:52,代码来源:externalFeed.php
示例15: getCustomImage
/**
* Get a custom sized version of this image based on the parameters.
*
* @param string $alt Alt text for the url
* @param int $size size
* @param int $width width
* @param int $height height
* @param int $cropw crop width
* @param int $croph crop height
* @param int $cropx crop x axis
* @param int $cropy crop y axis
* @param string $class Optional style class
* @param string $id Optional style id
* @param bool $thumbStandin set true to inhibit watermarking
* @return string
*/
function getCustomImage($size, $width, $height, $cropw, $croph, $cropx, $cropy, $thumbStandin = false)
{
if ($thumbStandin & 1) {
if ($this->objectsThumb == NULL) {
$filename = makeSpecialImageName($this->getThumbImageFile());
$path = ZENFOLDER . '/i.php?a=' . urlencode($this->album->name) . '&i=' . urlencode($filename);
return WEBPATH . "/" . $path . ($size ? "&s={$size}" : "") . ($width ? "&w={$width}" : "") . ($height ? "&h={$height}" : "") . ($cropw ? "&cw={$cropw}" : "") . ($croph ? "&ch={$croph}" : "") . ($cropx ? "&cx={$cropx}" : "") . ($cropy ? "&cy={$cropy}" : "") . "&t=true";
} else {
$filename = $this->objectsThumb;
$wmt = getOption(get_class($this) . '_watermark');
if ($wmt) {
$wmt = '&wmt=' . $wmt;
}
$cachefilename = getImageCacheFilename($alb = $this->album->name, $filename, getImageParameters(array($size, $width, $height, $cropw, $croph, $cropx, $cropy, NULL, NULL, NULL, $thumbStandin, NULL, NULL)));
if (file_exists(SERVERCACHE . $cachefilename) && filemtime(SERVERCACHE . $cachefilename) > $this->filemtime) {
return WEBPATH . substr(CACHEFOLDER, 0, -1) . pathurlencode(imgSrcURI($cachefilename));
} else {
$path = ZENFOLDER . '/i.php?a=' . urlencode($alb) . '&i=' . urlencode($filename);
if (substr($path, 0, 1) == "/") {
$path = substr($path, 1);
}
return WEBPATH . "/" . $path . ($size ? "&s={$size}" : "") . ($width ? "&w={$width}" : "") . ($height ? "&h={$height}" : "") . ($cropw ? "&cw={$cropw}" : "") . ($croph ? "&ch={$croph}" : "") . ($cropx ? "&cx={$cropx}" : "") . ($cropy ? "&cy={$cropy}" : "") . "&t=true" . $wmt;
}
}
} else {
$filename = $this->filename;
$cachefilename = getImageCacheFilename($this->album->name, $filename, getImageParameters(array($size, $width, $height, $cropw, $croph, $cropx, $cropy, NULL, NULL, NULL, $thumbStandin, NULL, NULL)));
if (file_exists(SERVERCACHE . $cachefilename) && filemtime(SERVERCACHE . $cachefilename) > $this->filemtime) {
return WEBPATH . substr(CACHEFOLDER, 0, -1) . pathurlencode(imgSrcURI($cachefilename));
} else {
return WEBPATH . '/' . ZENFOLDER . '/i.php?a=' . urlencode($this->album->name) . '&i=' . urlencode($filename) . ($size ? "&s={$size}" : "") . ($width ? "&w={$width}" : "") . ($height ? "&h={$height}" : "") . ($cropw ? "&cw={$cropw}" : "") . ($croph ? "&ch={$croph}" : "") . ($cropx ? "&cx={$cropx}" : "") . ($cropy ? "&cy={$cropy}" : "");
}
}
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:50,代码来源:class-video.php
示例16: getContent
/**
* returns the content of the vido
*
* @param $w
* @param $h
* @return string
*/
function getContent($w = NULL, $h = NULL)
{
global $_zp_multimedia_extension;
if (is_null($w)) {
$w = $this->getWidth();
}
if (is_null($h)) {
$h = $this->getHeight();
}
$ext = getSuffix($this->getFullImage());
switch ($ext) {
default:
return $_zp_multimedia_extension->getPlayerConfig($this, NULL, NULL, $w, $h);
break;
case '3gp':
case 'mov':
return '</a>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' . $w . '" height="' . $h . '" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="' . pathurlencode($this->getFullImage()) . '"/>
<param name="autoplay" value="false" />
<param name="type" value="video/quicktime" />
<param name="controller" value="true" />
<embed src="' . pathurlencode($this->getFullImage()) . '" width="' . $w . '" height="' . $h . '" scale="aspect" autoplay="false" controller"true" type="video/quicktime"
pluginspage="http://www.apple.com/quicktime/download/" cache="true"></embed>
</object><a>';
break;
}
}
开发者ID:Simounet,项目名称:zenphoto,代码行数:35,代码来源:class-video.php
示例17: printjPlayerPlaylist
/**
* Prints a playlist using jPlayer. Several playlists per page supported.
*
* The playlist is meant to replace the 'next_image()' loop on a theme's album.php.
* It can be used with a special 'album theme' that can be assigned to media albums with with .flv/.mp4/.mp3s, although Flowplayer 3 also supports images
* Replace the entire 'next_image()' loop on album.php with this:
* <?php printjPlayerPlaylist("playlist"); ?> or <?php printjPlayerPlaylist("playlist-audio"); ?>
*
* @param string $option "playlist" use for pure video and mixed video/audio playlists or if you want to show the poster/videothumb with audio only playlists,
* "playlist-audio" use for pure audio playlists (m4a,mp3,fla supported only) if you don't need the poster/videothumb to be shown only.
* @param string $albumfolder album name to get a playlist from directly
*/
function printjPlayerPlaylist($option = "playlist", $albumfolder = "")
{
global $_zp_current_album, $_zp_current_search;
if (empty($albumfolder)) {
if (in_context(ZP_SEARCH)) {
$albumobj = $_zp_current_search;
} else {
$albumobj = $_zp_current_album;
}
} else {
$albumobj = newAlbum($albumfolder);
}
$entries = $albumobj->getImages(0);
if (($numimages = count($entries)) != 0) {
switch ($option) {
case 'playlist':
$suffixes = array('m4a', 'm4v', 'mp3', 'mp4', 'flv', 'fla');
break;
case 'playlist-audio':
$suffixes = array('m4a', 'mp3', 'fla');
break;
default:
// an invalid option parameter!
return;
}
$id = $albumobj->getID();
?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_<?php
echo $id;
?>
",
cssSelectorAncestor: "#jp_container_<?php
echo $id;
?>
"
}, [
<?php
$count = '';
$number = '';
foreach ($entries as $entry) {
$count++;
if (is_array($entry)) {
$ext = getSuffix($entry['filename']);
} else {
$ext = getSuffix($entry);
}
$numbering = '';
if (in_array($ext, $suffixes)) {
$number++;
if (getOption('jplayer_playlist_numbered')) {
$numbering = '<span>' . $number . '</span>';
}
$video = newImage($albumobj, $entry);
$videoThumb = '';
$this->setModeAndSuppliedFormat($ext);
if ($option == 'playlist' && getOption('jplayer_poster')) {
$videoThumb = ',poster:"' . $video->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true) . '"';
}
$playtime = '';
if (getOption('jplayer_playlist_playtime')) {
$playtime = ' (' . $video->get('VideoPlaytime') . ')';
}
?>
{
title:"<?php
echo $numbering . html_encode($video->getTitle()) . $playtime;
?>
",
<?php
if (getOption('jplayer_download')) {
?>
free:true,
<?php
}
?>
<?php
echo $this->supplied;
?>
:"<?php
echo html_encode(pathurlencode($url = $video->getFullImageURL(FULLWEBPATH)));
?>
"
<?php
echo $this->getCounterpartFiles($url, $ext);
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:jplayer.php
示例18: max
$dest_x = max(0, floor(($imw - $nw) * $offset_w));
$dest_y = max(0, floor(($imh - $nh) * $offset_h));
zp_copyCanvas($newim, $watermark, $dest_x, $dest_y, 0, 0, $nw, $nh);
zp_imageKill($watermark);
}
$iMutex->unlock();
if (!zp_imageOutput($newim, $suffix, $cache_path, $quality) && DEBUG_IMAGE) {
debugLog('full-image failed to create:' . $image);
}
}
}
if (!is_null($cache_path)) {
if ($disposal == 'Download' || !OPEN_IMAGE_CACHE) {
require_once dirname(__FILE__) . '/lib-MimeTypes.php';
$mimetype = getMimeString($suffix);
$fp = fopen($cache_path, 'rb');
// send the right headers
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header("Content-Type: {$mimetype}");
header("Content-Length: " . filesize($image_path));
// dump the picture and stop the script
fpassthru($fp);
fclose($fp);
} else {
header('Location: ' . FULLWEBPATH . '/' . CACHEFOLDER . pathurlencode(imgSrcURI($cache_file)), true, 301);
}
exitZP();
}
?>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:29,代码来源:full-image.php
示例19: getHTMLMetaData
/**
* Prints html meta data to be used in the <head> section of a page
*
*/
static function getHTMLMetaData()
{
global $_zp_gallery, $_zp_galley_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites, $htmlmetatags_need_cache, $_zp_page;
zp_register_filter('image_processor_uri', 'htmlmetatags::ipURI');
$host = sanitize("http://" . $_SERVER['HTTP_HOST']);
$url = $host . getRequestURI();
// Convert locale shorttag to allowed html meta format
$locale = str_replace("_", "-", getUserLocale());
$canonicalurl = '';
// generate page title, get date
$pagetitle = "";
// for gallery index setup below switch
$date = strftime(DATE_FORMAT);
// if we don't have a item date use current date
$desc = getBareGalleryDesc();
$thumb = '';
if (getOption('htmlmeta_sitelogo')) {
$thumb = getOption('htmlmeta_sitelogo');
}
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$ogimage_width = getOption('htmlmeta_ogimage_width');
$ogimage_height = getOption('htmlmeta_ogimage_height');
if (empty($ogimage_width)) {
$ogimage_width = 1280;
}
if (empty($ogimage_height)) {
$ogimage_height = 900;
}
}
$type = 'article';
switch ($_zp_gallery_page) {
case 'index.php':
$desc = getBareGalleryDesc();
//$canonicalurl = $host . getGalleryIndexURL();
$canonicalurl = $host . getPageNumURL($_zp_page);
$type = 'website';
break;
case 'album.php':
$pagetitle = getBareAlbumTitle() . " - ";
$date = getAlbumDate();
$desc = getBareAlbumDesc();
$canonicalurl = $host . getPageNumURL($_zp_page);
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumbimg = $_zp_current_album->getAlbumThumbImage();
getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
$thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
}
break;
case 'image.php':
$pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
$date = getImageDate();
$desc = getBareImageDesc();
$canonicalurl = $host . getImageURL();
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
}
break;
case 'news.php':
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
$pagetitle = getBareNewsTitle() . " - ";
$date = getNewsDate();
$desc = trim(getBare(getNewsContent()));
$canonicalurl = $host . $_zp_current_zenpage_news->getLink();
} else {
if (is_NewsCategory()) {
$pagetitle = $_zp_current_category->getTitlelink() . " - ";
$date = strftime(DATE_FORMAT);
$desc = trim(getBare($_zp_current_category->getDesc()));
$canonicalurl = $host . $_zp_current_category->getLink();
$type = 'category';
} else {
$pagetitle = gettext('News') . " - ";
$desc = '';
$canonicalurl = $host . getNewsIndexURL();
$type = 'website';
}
}
if ($_zp_page != 1) {
$canonicalurl .= '/' . $_zp_page;
}
}
break;
case 'pages.php':
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = trim(getBare(getPageContent()));
$canonicalurl = $host . $_zp_current_zenpage_page->getLink();
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:html_meta_tags.php
示例20: sanitize_path
if (isset($_REQUEST['album'])) {
if (isset($_POST['album'])) {
$folder = sanitize_path(urldecode($_POST['album']));
} else {
$folder = sanitize_path($_GET['album']);
}
if (!empty($folder)) {
$album = newAlbum($folder);
if (!$album->isMyItem(ALBUM_RIGHTS)) {
if (!zp_apply_filter('admin_managed_albums_access', false, $return)) {
header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php');
exitZP();
}
}
}
$albumparm = '&album=' . pathurlencode($folder);
}
if (isset($_GET['refresh'])) {
if (empty($imageid)) {
$metaURL = $backurl;
} else {
if (!empty($ret)) {
$ret = '&return=' . $ret;
}
$metaURL = $redirecturl = '?' . $type . 'refresh=continue&id=' . $imageid . $albumparm . $ret . '&XSRFToken=' . getXSRFToken('refresh');
}
} else {
if ($type !== 'prune&') {
if (!empty($folder)) {
$album = newAlbum($folder);
if (!$album->isMyItem(ALBUM_RIGHTS)) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-refresh-metadata.php
注:本文中的pathurlencode函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论