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


PHP imageNumber函数代码示例

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


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

示例1: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Colorbox section -->
		<div id="content">
			<div id="main">
				<div id="images">
					<?php 
        $points = array();
        $firstImage = null;
        $lastImage = null;
        while (next_image()) {
            // Colorbox does not do video
            if (is_null($firstImage)) {
                $lastImage = imageNumber();
                $firstImage = $lastImage;
            } else {
                $lastImage++;
            }
            ?>
						<div class="image">
							<div class="imagethumb">
								<?php 
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            $annotate = annotateImage();
            if (isImagePhoto()) {
                // colorbox is only for real images
                echo '<a href="' . html_encode(getDefaultSizedImage()) . '" class="thickbox"';
            } else {
                echo '<a href="' . html_encode(getImageURL()) . '"';
            }
            echo " title=\"" . $annotate . "\">\n";
            printImageThumb($annotate);
            echo "</a>";
            ?>
							</div>
						</div>
						<?php 
        }
        echo '<div class="clearage"></div>';
        if (!empty($points) && $map) {
            function map_callback($map)
            {
                global $points;
                foreach ($points as $coord) {
                    addGeoCoord($map, $coord);
                }
            }
            ?>
						<div id="map_link">
						<?php 
            printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');
            ?>
						</div>
						<?php 
        }
        @call_user_func('printSlideShowLink', NULL, 'text-align:center;');
        ?>
				</div><!-- images -->
			<?php 
        @call_user_func('printRating');
        ?>
			</div><!-- main -->
			<div class="clearage"></div>
		<?php 
        if (isset($firstImage)) {
            printNofM('Photo', $firstImage, $lastImage, getNumImages());
        }
        ?>
		</div><!-- content -->
		<?php 
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:78,代码来源:functions.php

示例2: printSlideShowLink

    /**
     * Prints a link to call the slideshow (not shown if there are no images in the album)
     * To be used on album.php and image.php
     * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
     *
     * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow
     * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.
     *
     * @param string $linktext Text for the link
     * @param string $linkstyle Style of Text for the link
     */
    function printSlideShowLink($linktext = NULL, $linkstyle = Null)
    {
        global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
        if (is_null($linktext)) {
            $linktext = gettext('View Slideshow');
        }
        if (empty($_GET['page'])) {
            $pagenr = 1;
        } else {
            $pagenr = sanitize_numeric($_GET['page']);
        }
        $slideshowhidden = '';
        $numberofimages = 0;
        if (in_context(ZP_SEARCH)) {
            $imagenumber = '';
            $imagefile = '';
            $albumnr = 0;
            $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow");
            $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
        } else {
            if (in_context(ZP_IMAGE)) {
                $imagenumber = imageNumber();
                $imagefile = $_zp_current_image->filename;
            } else {
                $imagenumber = '';
                $imagefile = '';
            }
            if (in_context(ZP_SEARCH_LINKED)) {
                $albumnr = -$_zp_current_album->getID();
                $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
            } else {
                $albumnr = $_zp_current_album->getID();
            }
            if ($albumnr) {
                $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFileName()));
            } else {
                $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow");
                $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />';
            }
        }
        $numberofimages = getNumImages();
        $option = getOption('slideshow_mode');
        switch ($option) {
            case 'jQuery':
                if ($numberofimages > 1) {
                    ?>
					<form name="slideshow_<?php 
                    echo $slideshow_instance;
                    ?>
" method="post"	action="<?php 
                    echo zp_apply_filter('getLink', $slideshowlink, 'slideshow.php', NULL);
                    ?>
">
						<?php 
                    echo $slideshowhidden;
                    ?>
						<input type="hidden" name="pagenr" value="<?php 
                    echo html_encode($pagenr);
                    ?>
" />
						<input type="hidden" name="albumid" value="<?php 
                    echo $albumnr;
                    ?>
" />
						<input type="hidden" name="numberofimages" value="<?php 
                    echo $numberofimages;
                    ?>
" />
						<input type="hidden" name="imagenumber" value="<?php 
                    echo $imagenumber;
                    ?>
" />
						<input type="hidden" name="imagefile" value="<?php 
                    echo html_encode($imagefile);
                    ?>
" />
						<?php 
                    if (!empty($linkstyle)) {
                        echo '<p style="' . $linkstyle . '">';
                    }
                    ?>
						<a class="slideshowlink" id="slideshowlink_<?php 
                    echo $slideshow_instance;
                    ?>
" 	href="javascript:document.slideshow_<?php 
                    echo $slideshow_instance;
                    ?>
.submit()"><?php 
                    echo $linktext;
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:slideshow.php

示例3: array

				<!-- Wrap Main Body -->
				<?php 
    if (getNumImages() > 0) {
        /* Only print if we have images. */
        ?>
					<!-- Image page section -->
					<div id="content">
						<div id="main">
							<div id="images">
								<?php 
        $points = array();
        $firstImage = null;
        $lastImage = null;
        while (next_image()) {
            if (is_null($firstImage)) {
                $lastImage = imageNumber();
                $firstImage = $lastImage;
            } else {
                $lastImage++;
            }
            ?>
									<div class="image">
										<div class="imagethumb">
											<?php 
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            $annotate = annotateImage();
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:favorites.php

示例4: printSlideShow

    static function printSlideShow($heading = true, $speedctl = false, $albumobj = "", $imageobj = "", $width = "", $height = "")
    {
        if (!isset($_POST['albumid']) and !is_object($albumobj)) {
            echo "<div class=\"errorbox\" id=\"message\"><h2>" . gettext("Invalid linking to the slideshow page.") . "</h2></div>";
            echo "</div></body></html>";
            exit;
        }
        global $_zp_flash_player, $_zp_current_image, $_zp_current_album, $_zp_gallery;
        //getting the image to start with
        if (!empty($_POST['imagenumber']) and !is_object($imageobj)) {
            $imagenumber = $_POST['imagenumber'] - 1;
            // slideshows starts with 0, but zp with 1.
        } elseif (is_object($imageobj)) {
            makeImageCurrent($imageobj);
            $imagenumber = imageNumber() - 1;
        } else {
            $imagenumber = 0;
        }
        // set pagenumber to 0 if not called via POST link
        if (isset($_POST['pagenr'])) {
            $pagenumber = sanitize_numeric($_POST['pagenr']);
        } else {
            $pagenumber = 0;
        }
        // getting the number of images
        if (!empty($_POST['numberofimages'])) {
            $numberofimages = sanitize_numeric($_POST['numberofimages']);
        } elseif (is_object($albumobj)) {
            $numberofimages = $albumobj->getNumImages();
        }
        //getting the album to show
        if (!empty($_POST['albumid']) and !is_object($albumobj)) {
            $albumid = sanitize_numeric($_POST['albumid']);
        } elseif (is_object($albumobj)) {
            $albumid = $albumobj->id;
        } else {
            $albumid = -1;
        }
        // setting the image size
        if (!empty($width) and !empty($height)) {
            $width = sanitize_numeric($width);
            $height = sanitize_numeric($height);
        } else {
            $width = getOption("slideshow_width");
            $height = getOption("slideshow_height");
        }
        $option = getOption("slideshow_mode");
        // jQuery Cycle slideshow config
        // get slideshow data
        $gallery = new Gallery();
        if ($albumid <= 0) {
            // search page
            $dynamic = 2;
            $search = new SearchEngine();
            $params = $_POST['preserve_search_params'];
            $search->setSearchParams($params);
            $images = $search->getImages(0);
            $searchwords = $search->words;
            $searchdate = $search->dates;
            $searchfields = $search->fields;
            $page = $search->page;
            if (empty($_POST['imagenumber'])) {
                $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . abs($albumid));
                $album = new Album($gallery, $albumq['folder']);
                $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
                //$returnpath = rewrite_path('/'.pathurlencode($album->name).'/page/'.$pagenumber,'/index.php?album='.urlencode($album->name).'&page='.$pagenumber);
            } else {
                $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
            }
            $albumtitle = gettext('Search');
        } else {
            $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
            $album = new Album($gallery, $albumq['folder']);
            $albumtitle = $album->getTitle();
            if (!checkAlbumPassword($albumq['folder'], $hint)) {
                echo gettext("This album is password protected!");
                exit;
            }
            $dynamic = $album->isDynamic();
            $images = $album->getImages(0);
            // return path to get back to the page we called the slideshow from
            if (empty($_POST['imagenumber'])) {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/page/' . $pagenumber, '/index.php?album=' . urlencode($album->name) . '&page=' . $pagenumber);
            } else {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/' . rawurlencode($_POST['imagefile']) . getOption('mod_rewrite_image_suffix'), '/index.php?album=' . urlencode($album->name) . '&image=' . urlencode($_POST['imagefile']));
            }
        }
        // slideshow display section
        switch ($option) {
            case "jQuery":
                $validtypes = array('jpg', 'jpeg', 'gif', 'png', 'mov', '3gp');
                ?>
					<script type="text/javascript">
						$(document).ready(function(){
							$(function() {
								var ThisGallery = '<?php 
                echo html_encode($albumtitle);
                ?>
';
								var ImageList = new Array();
//.........这里部分代码省略.........
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:101,代码来源:Overrides.php

示例5: printGslideshow

/**
 * Prints the Galleria slideshow for albums or search results.
 *
 * Two ways to use (see readme/documentation):
 * a) Used on the included theme slideshow.php page and called via printSlideShowLink() from the core slideshow plugin:
 * b) Calling directly via printGslideshow() function in a template file or codeblock.
 *
 * @param obj $albumobj The object of the album to show the slideshow of. Not needed if calling slideshow from album, image, or search.
 * @param obj $imageobj The object of the image to start the slideshow with. If not set the slideshow starts with the first image of the album, or current image if called from image.php. Not needed if calling slideshow from album, image, or search.
 * @param bool $linkslides Set to true if you want the slides to be linked to their image pages
 * @param mixed $autoplay true to autoplay slideshow with interval set in options, false to start with slideshow stopped.  Set integer in milliseconds to autoplay at that interval (Ex. 4000), overriding plugin option set.
 * @param bool $shuffle Set to true if you want random (shuffled) order of the slides
 *
 * */
function printGslideshow($albumobj = null, $imageobj = null, $linkslides = true, $autoplay = true, $forceheight = false, $shuffle = false)
{
    $data = 'data';
    // no POST data from slidehow link and $albumobj provided is not valid, exit
    if (!isset($_POST['albumid']) and !is_object($albumobj)) {
        echo "<div class=\"errorbox\" id=\"message\"><h2>" . gettext("Invalid linking to the slideshow page.") . "</h2></div>";
        echo "</div></body></html>";
        exitZP();
    }
    global $_zp_current_image, $_zp_current_album, $_zp_gallery, $_myFavorites, $_zp_conf_vars;
    $imagenumber = 0;
    //getting the image to start with
    if (!empty($_POST['imagenumber']) and !is_object($imageobj)) {
        $imagenumber = sanitize_numeric($_POST['imagenumber']) - 1;
        // slideshows starts with 0, but zp with 1.
    } elseif (is_object($imageobj)) {
        makeImageCurrent($imageobj);
        $imagenumber = imageNumber() - 1;
    }
    // set pagenumber to 0 if not called via POST link
    if (isset($_POST['pagenr'])) {
        $pagenumber = sanitize_numeric($_POST['pagenr']);
    } else {
        $pagenumber = 1;
    }
    // getting the number of images
    if (!empty($_POST['numberofimages'])) {
        $numberofimages = sanitize_numeric($_POST['numberofimages']);
    } elseif (is_object($albumobj)) {
        $numberofimages = $albumobj->getNumImages();
    } else {
        $numberofimages = 0;
    }
    if ($imagenumber < 2 || $imagenumber > $numberofimages) {
        $imagenumber = 0;
    }
    //getting the album to show
    if (!empty($_POST['albumid']) && !is_object($albumobj)) {
        $albumid = sanitize_numeric($_POST['albumid']);
        $embedded = false;
    } elseif (is_object($albumobj)) {
        $albumid = $albumobj->getID();
        $embedded = true;
    } else {
        $albumid = 0;
        $embedded = false;
    }
    if ($numberofimages == 0) {
        return NULL;
    }
    // get slideshow data
    if (isset($_POST['preserve_search_params'])) {
        // search page
        $search = new SearchEngine();
        $params = sanitize($_POST['preserve_search_params']);
        $search->setSearchParams($params);
        $images = $search->getImages(0);
        $searchwords = $search->getSearchWords();
        $searchdate = $search->getSearchDate();
        $searchfields = $search->getSearchFields(true);
        $page = $search->page;
        $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
        $albumtitle = gettext('Search');
    } else {
        if (isset($_POST['favorites_page'])) {
            $album = $_myFavorites;
            $albumtitle = gettext('My Favorites');
            $images = $album->getImages(0);
            $returnpath = rewrite_path(favorites::getFavorites_link() . '/' . $pagenumber, FULLWEBPATH . '/index.php?p=favorites' . '&page=' . $pagenumber);
        } else {
            $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
            $album = newAlbum($albumq['folder']);
            $albumtitle = $album->getTitle();
            if (!$album->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumq['folder'])) {
                echo gettext("This album is password protected!");
                exitZP();
            }
            $dynamic = $album->isDynamic();
            $images = $album->getImages(0);
            // return path to get back to the page we called the slideshow from
            if (empty($_POST['imagenumber'])) {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/page/' . $pagenumber, '/index.php?album=' . urlencode($album->name) . '&page=' . $pagenumber);
            } else {
                $returnpath = rewrite_path('/' . pathurlencode($album->name) . '/' . rawurlencode(sanitize($_POST['imagefile'])) . getOption('mod_rewrite_image_suffix'), '/index.php?album=' . urlencode($album->name) . '&image=' . urlencode($_POST['imagefile']));
            }
        }
//.........这里部分代码省略.........
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:101,代码来源:gslideshow.php

示例6: printThumbNav


//.........这里部分代码省略.........
                        $imgobj = newImage(newAlbum($item['folder']), $item['filename']);
                    } else {
                        $imgobj = newImage($_zp_current_album, $item);
                    }
                    if ($fullimagelink) {
                        $link = $imgobj->getFullImageURL();
                    } else {
                        $link = $imgobj->getLink();
                    }
                    if (!is_null($_zp_current_image)) {
                        if ($_zp_current_album->isDynamic()) {
                            if ($_zp_current_image->filename == $imgobj->filename && $_zp_current_image->getAlbum()->name == $imgobj->getAlbum()->name) {
                                $active = ' class="activeimg" ';
                            } else {
                                $active = '';
                            }
                        } else {
                            if ($_zp_current_image->filename == $imgobj->filename) {
                                $active = ' class="activeimg" ';
                            } else {
                                $active = '';
                            }
                        }
                    } else {
                        $active = '';
                    }
                    $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true);
                    $items[] = '<li' . $active . '><a href="' . $link . '"><img src="' . html_encode($imageurl) . '" alt="' . html_encode($imgobj->getTitle()) . '"></a></li>';
                }
            }
            $albumid = $_zp_current_album->get('id');
            //$items = substr($items, 0, -2);
            $numimages = getNumImages();
            if (!is_null($_zp_current_image)) {
                $imgnumber = imageNumber() - 1;
            } else {
                $imgnumber = 0;
            }
            ?>
			<ul class="bxslider<?php 
            echo $albumid;
            ?>
">
				<?php 
            $count = '';
            foreach ($items as $item) {
                echo $item;
            }
            ?>
			</ul>
			<script type="text/javascript">
				$(document).ready(function() {
					var index = $('.bxslider<?php 
            echo $albumid;
            ?>
 li.activeimg').index();
					index = ++index;
					currentPager = parseInt(index / <?php 
            echo $maxitems;
            ?>
)
					$('.bxslider<?php 
            echo $albumid;
            ?>
').bxSlider({
						mode: '<?php 
            echo $mode;
            ?>
',
						minSlides: <?php 
            echo $minitems;
            ?>
,
						maxSlides: <?php 
            echo $maxitems;
            ?>
,
						speed: <?php 
            echo $speed;
            ?>
,
						slideWidth: <?php 
            echo $width;
            ?>
,
						slideMargin: 5,
						moveSlides: <?php 
            echo $maxitems;
            ?>
 - 1,
						pager: false,
						adaptiveHeight: true,
						useCSS: false,
						startSlide: currentPager
					});
				});
			</script>
			<?php 
        }
    }
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:101,代码来源:bxslider_thumb_nav.php

示例7: printCustomSizedImage

    printCustomSizedImage(getImageTitle(), null, $ls ? 480 : null, $ls ? null : 480);
    ?>
					</strong>
					</p>
				<?php 
}
?>
			</div>
			<?php 
if ($show) {
    ?>
			<div id="meta">
				<ul>
					<li class="count"><?php 
    if (($num = getNumImages()) > 1) {
        printf(gettext('%1$u of %2$u photos'), imageNumber(), getNumImages());
    }
    ?>
</li>
					<li class="date"><?php 
    printImageDate();
    ?>
</li>
					<li class="tags"><?php 
    echo getAlbumPlace();
    ?>
</li>
					<li class="exif">
				<?php 
    if (getImageEXIFData()) {
        echo "<a href=\"#TB_inline?height=345&amp;width=300&amp;inlineId=imagemetadata\" title=\"" . gettext("image details") . "\" class=\"thickbox\">" . gettext('Image Info') . "</a>";
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:image.php

示例8: flowplayerPlaylist


//.........这里部分代码省略.........
					durationColor: "' . getOption('flow_player3_controlsdurationcolor') . '",
					progressColor: "' . getOption('flow_player3_controlsprogresscolor') . '",
					progressGradient: "' . getOption('flow_player3_controlsprogressgradient') . '",
					bufferColor: "' . getOption('flow_player3_controlsbuffercolor') . '",
					bufferGradient:	 "' . getOption('fflow_player3_controlsbuffergradient') . '",
					sliderColor: "' . getOption('flow_player3_controlsslidercolor') . '",
					sliderGradient: "' . getOption('flow_player3_controlsslidergradient') . '",
					buttonColor: "' . getOption('flow_player3_controlsbuttoncolor') . '",
					buttonOverColor: "' . getOption('flow_player3_controlsbuttonovercolor') . '",
					scaling: "' . getOption('flow_player3_scaling') . '",
					playlist: true
				}
			},
			canvas: {
				backgroundColor: "' . getOption('flow_player3_backgroundcolor') . '",
				backgroundGradient: "' . getOption('flow_player3_backgroundcolorgradient') . '"
			},';
                $list = '';
                foreach ($playlist as $item) {
                    $image = newImage($album, $item);
                    $playtime = '';
                    if (getOption('flow_player3_playlistplaytime')) {
                        $playtime = $image->get('VideoPlaytime');
                        if (!empty($playtime)) {
                            $playtime = $image->get('VideoPlaytime');
                        }
                    }
                    $coverimagerwidth = getOption('flow_player3_playlistwidth');
                    $coverimageheight = getOption('flow_player3_playlistheight');
                    getMaxSpaceContainer($coverimagerwidth, $coverimageheight, $image, true);
                    $cover = $image->getCustomImage(null, $coverimagerwidth, $coverimageheight, null, null, null, null, true);
                    $ext = getSuffix($item);
                    if ($ext == "flv" || $ext == "mp3" || $ext == "mp4" || $ext == "fla" || $ext == "m4v" || $ext == "m4a") {
                        $list .= '{
					url:"' . ALBUM_FOLDER_WEBPATH . $album->name . '/' . $item . '",
					autoPlay: ' . $autoplay . ',
					title: "' . $image->getTitle() . ' <small>(' . $playtime . ')</small>",
					autoBuffering: ' . $autoplay . ',
					coverImage: {
						url: "' . urlencode($cover) . '",
						scaling: "fit"
					}
				},';
                    }
                    // if ext end
                }
                // foreach end
                echo 'playlist: [' . substr($list, 0, -1) . ']
			});
			flowplayer("player' . $album->getID() . '").playlist("' . $liststyle . '.clips' . $album->getID() . ':first", {loop:true});
			});
			// ]]> -->
			</script>';
                ?>
		<div class="wrapper">
					<a class="up" title="Up"></a>

			<div class="playlist playlist<?php 
                echo $album->getID();
                ?>
">
				<<?php 
                echo $liststyle;
                ?>
 class="clips clips<?php 
                echo $album->getID();
                ?>
">
					<!-- single playlist entry as an "template" -->
					<?php 
                if ($liststyle == 'ol') {
                    ?>
 <li> <?php 
                }
                ?>
					<a href="${url}">${title}</a>
					<?php 
                if ($liststyle == 'ol') {
                    ?>
 </li> <?php 
                }
                ?>
				</<?php 
                echo $liststyle;
                ?>
>
			</div>
		<a class="down" title="Down"></a>
</div>
</div><!-- flowplayer3_playlist wrapper end -->
<?php 
            }
            // check if there are images end
            break;
        case 'players':
            $_zp_flash_player->printPlayerConfig('', '', imageNumber());
            break;
    }
    // switch end
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:101,代码来源:flowplayer3.php

示例9: printBaseSlideShowLink

function printBaseSlideShowLink($linktext = null)
{
    global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
    if (is_null($linktext)) {
        $linktext = gettext('View Slideshow');
    }
    if (empty($_GET['page'])) {
        $pagenr = 1;
    } else {
        $pagenr = sanitize_numeric($_GET['page']);
    }
    $slideshowhidden = '';
    $numberofimages = 0;
    if (in_context(ZP_SEARCH)) {
        $imagenumber = '';
        $imagefile = '';
        $albumnr = 0;
        $slideshowlink = rewrite_path('/' . _PAGE_ . '/slideshow', "index.php?p=slideshow");
        $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
    } else {
        if (in_context(ZP_IMAGE)) {
            $imagenumber = imageNumber();
            $imagefile = $_zp_current_image->filename;
        } else {
            $imagenumber = '';
            $imagefile = '';
        }
        if (in_context(ZP_SEARCH_LINKED)) {
            $albumnr = -$_zp_current_album->getID();
            $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />';
        } else {
            $albumnr = $_zp_current_album->getID();
        }
        if ($albumnr) {
            $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&amp;album=" . urlencode($_zp_current_album->getFileName()));
        } else {
            $slideshowlink = rewrite_path('/' . _PAGE_ . '/slideshow', "index.php?p=slideshow");
            $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />';
        }
    }
    //$numberofimages = getNumImages();
    $slideshow_instance = 0;
    if (checkForImages()) {
        ?>
			<!-- <form name="slideshow_<?php 
        echo $slideshow_instance;
        ?>
" method="post"	action="<?php 
        echo $slideshowlink;
        ?>
">
				<?php 
        echo $slideshowhidden;
        ?>
				<input type="hidden" name="pagenr" value="<?php 
        echo html_encode($pagenr);
        ?>
" />
				<input type="hidden" name="albumid" value="<?php 
        echo $albumnr;
        ?>
" />
				<input type="hidden" name="numberofimages" value="<?php 
        echo $numberofimages;
        ?>
" />
				<input type="hidden" name="imagenumber" value="<?php 
        echo $imagenumber;
        ?>
" />
				<input type="hidden" name="imagefile" value="<?php 
        echo html_encode($imagefile);
        ?>
" />
				<a class="slideshowlink" id="slideshowlink_<?php 
        echo $slideshow_instance;
        ?>
" 	href="javascript:document.slideshow_<?php 
        echo $slideshow_instance;
        ?>
.submit()"><?php 
        echo $linktext;
        ?>
</a>
			</form> -->
		<?php 
    }
}
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:88,代码来源:functions.php

示例10: printThumbNav


//.........这里部分代码省略.........
                    } else {
                        $imgobj = newImage($_zp_current_album, $item);
                    }
                    if ($fullimagelink) {
                        $link = $imgobj->getFullImageURL();
                    } else {
                        $link = $imgobj->getLink();
                    }
                    if (!is_null($_zp_current_image)) {
                        if ($_zp_current_album->isDynamic()) {
                            if ($_zp_current_image->filename == $imgobj->filename && $_zp_current_image->getAlbum()->name == $imgobj->getAlbum()->name) {
                                $active = 'active';
                            } else {
                                $active = '';
                            }
                        } else {
                            if ($_zp_current_image->filename == $imgobj->filename) {
                                $active = 'active';
                            } else {
                                $active = '';
                            }
                        }
                    } else {
                        $active = '';
                    }
                    $imageurl = $imgobj->getCustomImage(NULL, $width, $height, $cropw, $croph, NULL, NULL, true);
                    $items .= ' {url: "' . html_encode($imageurl) . '", title: "' . html_encode($imgobj->getTitle()) . '", link: "' . html_encode($link) . '", active: "' . $active . '"},';
                    $items .= "\n";
                }
            }
            $items = substr($items, 0, -2);
            $numimages = getNumImages();
            if (!is_null($_zp_current_image)) {
                $imgnumber = imageNumber();
            } else {
                $imgnumber = 1;
            }
            ?>
			<script type="text/javascript">
				// <!-- <![CDATA[
				var mycarousel_itemList = [
			<?php 
            echo $items;
            ?>
				];

				function mycarousel_itemLoadCallback(carousel, state) {
					for (var i = carousel.first; i <= carousel.last; i++) {
						if (carousel.has(i)) {
							continue;
						}
						if (i > mycarousel_itemList.length) {
							break;
						}
						carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i - 1]));
					}
				}

				function mycarousel_getItemHTML(item) {
					if (item.active === "") {
						html = '<a href="' + item.link + '" title="' + item.title + '"><img src="' + item.url + '" width="<?php 
            echo $width;
            ?>
" height="<?php 
            echo $height;
            ?>
开发者ID:rb26,项目名称:zenphoto,代码行数:67,代码来源:jcarousel_thumb_nav.php

示例11: pagedThumbsNav

 /**
  *
  * @param unknown_type $imagesperpage
  * @param unknown_type $counter
  * @param unknown_type $prev
  * @param unknown_type $next
  * @param unknown_type $width
  * @param unknown_type $height
  * @param unknown_type $crop
  * @param unknown_type $placeholders
  * @param unknown_type $showpagelist
  * @param unknown_type $pagelistprevnext
  * @param unknown_type $pagelistlength
  * @return pagedThumbsNav
  */
 function pagedThumbsNav($imagesperpage = 0, $counter = false, $prev = '', $next = '', $width = NULL, $height = NULL, $crop = NULL, $placeholders = NULL, $showpagelist = false, $pagelistprevnext = false, $pagelistlength = 6)
 {
     global $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_gallery;
     if (is_null($crop)) {
         $this->crop = getOption("pagedthumbs_crop");
     } else {
         $this->crop = sanitize($crop);
     }
     if (empty($imagesperpage)) {
         $this->imagesperpage = getOption("pagedthumbs_imagesperpage");
     } else {
         $this->imagesperpage = sanitize_numeric($imagesperpage);
     }
     if (is_null($width)) {
         $this->width = getOption("pagedthumbs_width");
     } else {
         $this->width = sanitize_numeric($width);
     }
     if (is_null($height)) {
         $this->height = getOption("pagedthumbs_height");
     } else {
         $this->height = sanitize_numeric($height);
     }
     if (empty($prev)) {
         $this->prev = get_language_string(getOption("pagedthumbs_prevtext"));
     } else {
         $this->prev = sanitize($prev);
     }
     if (empty($next)) {
         $this->next = get_language_string(getOption("pagedthumbs_nexttext"));
     } else {
         $this->next = sanitize($next);
     }
     if (empty($counter)) {
         $this->counter = getOption("pagedthumbs_counter");
     }
     if (is_null($placeholders)) {
         $this->placeholders = getOption("pagedthumbs_placeholders");
     } else {
         $this->placeholders = sanitize($placeholders);
     }
     if (is_null($showpagelist)) {
         $this->showpagelist = getOption("pagedthumbs_pagelist");
     } else {
         $this->showpagelist = sanitize($showpagelist);
     }
     if (empty($pagelistlength)) {
         $this->pagelistlength = getOption("pagedthumbs_pagelistlength");
     } else {
         $this->pagelistlength = sanitize($pagelistlength);
     }
     if (is_null($pagelistprevnext)) {
         $this->pagelistprevnext = getOption("pagedthumbs_pagelistprevnext");
     } else {
         $this->pagelistprevnext = sanitize($pagelistprevnext);
     }
     // get the image of current album
     if (in_context(ZP_SEARCH_LINKED)) {
         if ($_zp_current_search->getNumImages() === 0) {
             $this->searchimages = false;
         } else {
             $this->searchimages = true;
         }
     } else {
         $this->searchimages = false;
     }
     if (in_context(ZP_SEARCH_LINKED) && $this->searchimages) {
         $this->images = $_zp_current_search->getImages();
     } else {
         $this->images = $_zp_current_album->getImages();
     }
     $this->currentimgnr = imageNumber();
     $this->totalimages = count($this->images);
     $this->totalpages = ceil($this->totalimages / $this->imagesperpage);
     $this->currentpage = floor(($this->currentimgnr - 1) / $this->imagesperpage) + 1;
     $this->currentciel = $this->currentpage * $this->imagesperpage - 1;
     $this->currentfloor = $this->currentciel - $this->imagesperpage + 1;
 }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:93,代码来源:paged_thumbs_nav.php

示例12: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        if (isImagePage()) {
            ?>
			<!-- Gallery section -->
			<div id="images">
				<?php 
            $points = array();
            $firstImage = null;
            $lastImage = null;
            if (getNumImages() > 0) {
                ?>
					<div id="gallery" class="ad-gallery">
						<div class="ad-image-wrapper"></div>
						<div class="ad-controls"></div>
						<div class="ad-nav">
							<div class="ad-thumbs">
								<ul class="ad-thumb-list">
									<?php 
                while (next_image(true)) {
                    if ($map) {
                        $coord = getGeoCoord($_zp_current_image);
                        if ($coord) {
                            $points[] = $coord;
                        }
                    }
                    if (isImagePhoto()) {
                        // does not do video
                        if (is_null($firstImage)) {
                            $lastImage = imageNumber();
                            $firstImage = $lastImage;
                        } else {
                            $lastImage++;
                        }
                        ?>
											<li>
												<a href="<?php 
                        echo html_encode(getDefaultSizedImage());
                        ?>
">
													<img src="<?php 
                        echo html_encode(pathurlencode(getImageThumb()));
                        ?>
"
															 class="image<?php 
                        echo $lastImage;
                        ?>
"
															 alt="<?php 
                        echo html_encode(getImageDesc());
                        ?>
">
												</a>
											</li>
											<?php 
                    }
                }
                ?>
								</ul>
							</div>
						</div>
					</div>
				<?php 
            }
            ?>

				<div id="caption"<?php 
            if (getOption('garland_caption_location') == 'none') {
                echo ' style="display:none"';
            }
            ?>
>
				</div>
				<div class="clearage"></div>
			</div><!-- images -->
			<br class="clearall" />
			<?php 
        }
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:80,代码来源:functions.php

示例13: gettext

" title="<?php 
gettext('Index');
?>
"><?php 
echo gettext("Index");
?>
</a> &raquo; <?php 
echo gettext("Gallery");
printParentBreadcrumb(" &raquo; ", " &raquo; ", " &raquo; ");
printAlbumBreadcrumb(" ", " &raquo; ");
?>
			 <strong><?php 
printImageTitle(true);
?>
</strong> (<?php 
echo imageNumber() . "/" . getNumImages();
?>
)
			</h2>
		</div>
	<div id="content-left">

	<!-- The Image -->
 <?php 
//
if (function_exists('printjCarouselThumbNav')) {
    printjCarouselThumbNav(6, 50, 50, 50, 50, FALSE);
} else {
    if (function_exists("printPagedThumbsNav")) {
        printPagedThumbsNav(6, FALSE, gettext('&laquo; prev thumbs'), gettext('next thumbs &raquo;'), 40, 40);
    }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:image.php

示例14: printPagedThumbsNav

function printPagedThumbsNav($imagesperpage = '', $counter = '', $prev = '', $next = '', $width = NULL, $height = NULL, $crop = false)
{
    global $_zp_current_album, $_zp_current_image;
    // in case someone wants to override the options by parameter
    if (empty($imagesperpage)) {
        $imagesperpage = getOption("pagedthumbs_imagesperpage");
    }
    if (empty($width)) {
        $width = getOption("pagedthumbs_width");
    } else {
        $width = sanitize_numeric($width);
    }
    if (empty($height)) {
        $height = getOption("pagedthumbs_height");
    } else {
        $height = sanitize_numeric($height);
    }
    if (empty($prev)) {
        $prev = getOption("pagedthumbs_prevtext");
    }
    if (empty($next)) {
        $next = getOption("pagedthumbs_nexttext");
    }
    if (empty($counter)) {
        $counter = getOption("pagedthumbs_counter");
    }
    // get the image of current album
    $images = $_zp_current_album->getImages();
    $totalimages = getNumImages();
    $totalpages = ceil($totalimages / $imagesperpage);
    $currentimgnr = imageNumber();
    for ($nr = 1; $nr <= $totalpages; $nr++) {
        $startimg[$nr] = $nr * $imagesperpage - ($imagesperpage - 1);
        // get start image number for thumb pagination
        $endimg[$nr] = $nr * $imagesperpage;
        // get end image number for thumb pagination
    }
    // get current page number
    for ($nr = 1; $nr <= $totalpages; $nr++) {
        if ($startimg[$nr] <= $currentimgnr) {
            $currentpage = $nr;
        }
        if ($endimg[$nr] >= $currentimgnr) {
            $currentpage = $nr;
            break;
        }
    }
    echo "<div id=\"pagedthumbsnav\">\n";
    echo "<div class=\"pagedthumbsnav-prev\">\n";
    // Prev thumbnails - show only if there is a prev page
    if ($totalpages > 1) {
        $prevpageimagenr = $currentpage * $imagesperpage - ($imagesperpage + 1);
        if ($currentpage > 1) {
            $prevpageimage = newImage($_zp_current_album, $images[$prevpageimagenr]);
            echo "<a href=\"" . $prevpageimage->getImageLink() . "\" title=\"" . gettext("previous thumbs") . "\">" . $prev . "</a>\n";
        }
    }
    echo "</div>\n";
    // the thumbnails
    $number = $startimg[$currentpage] - 2;
    for ($nr = 1; $nr <= $imagesperpage; $nr++) {
        $number++;
        if ($number == $totalimages) {
            break;
        }
        $image = newImage($_zp_current_album, $images[$number]);
        if ($image->id === getImageID()) {
            $css = " id='pagedthumbsnav-active' ";
        } else {
            $css = "";
        }
        echo "<a {$css} href=\"" . $image->getImageLink() . "\" title=\"" . strip_tags($image->getTitle()) . "\">";
        if (getOption("pagedthumbs_crop") or $crop) {
            echo "<img src='" . $image->getCustomImage(null, $width, $height, $width, $height, null, null, true) . "' alt=\"" . strip_tags($image->getTitle()) . "\" width='" . $width . "' height='" . $height . "' />";
        } else {
            $_zp_current_image = $image;
            printCustomSizedImageThumbMaxSpace(strip_tags($image->getTitle()), $width, $height);
        }
        echo "</a>\n";
        if ($number == $endimg[$currentpage]) {
            break;
        }
    }
    // next thumbnails - show only if there is a next page
    echo "<div class=\"pagedthumbsnav-next\">\n";
    if ($totalpages > 1) {
        if ($currentpage < $totalpages) {
            $nextpageimagenr = $currentpage * $imagesperpage;
            $nextpageimage = newImage($_zp_current_album, $images[$nextpageimagenr]);
            echo "<a href=\"" . $nextpageimage->getImageLink() . "\" title=\"" . gettext("next thumbs") . "\">" . $next . "</a>\n";
        }
    }
    //first if
    echo "</div>\n";
    // image counter
    if ($counter) {
        $fromimage = $startimg[$currentpage];
        if ($totalimages < $endimg[$currentpage]) {
            $toimage = $totalimages;
        } else {
//.........这里部分代码省略.........
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:101,代码来源:paged_thumbs_nav.php

示例15: html_encode

    echo html_encode(getNextImageURL());
    ?>
" title="<?php 
    echo gettext("Next Image");
    ?>
"><?php 
    echo gettext("next");
    ?>
 &raquo;</a><?php 
}
?>
			<span title="<?php 
echo gettext('Image Number/Total images');
?>
"><?php 
echo imageNumber() . '/' . getNumImages();
?>
</span>
		</div>
		<div class="sidebar-divide">
			<div id="full-image-details">
				<h2><?php 
printImageTitle(true);
?>
</h2>
				<div class="sidebar-section"><?php 
printImageDate('', '', null, true);
?>
</div>
				<?php 
if (getImageDesc() || zp_loggedin()) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:image.php


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