Location: PHPKode > projects > Wordlog > htdocs/images_menu.php
<? 
	/* Last Edit: 05/28/03 --> v1.5-FINAL */
	require("include/config.php");
	require("include/language.php");
	require("include/functions.internal.php");
	require("include/functions.html.php");
	require("include/functions.format.php");
	require("include/functions.sessions.php");
	require("include/connect.php");
	$current_page = 'images_browse.php';

	$begin = 0;
	if ($_GET[begin]) {
		$begin = $_GET[begin];
	}
	
	$directory = IMAGES_PATH ."/".$_GET[gallery];
	$handle = opendir($directory);
	$list = array();

	while (false !== ($file = readdir($handle))) {
		if (preg_match("/[.](png|jpg|gif)$/i",$file)) {
			array_push($list, $file);
		}
	}
	closedir($handle);

	html_header(HTML_TITLE." :: $_GET[gallery]");
?>

<BODY <? echo html_body() ?> STYLE="padding:0px;margin:0px;height:100%">
<TABLE STYLE="height:100%;border-top: 1px dashed #000000;" ALIGN="CENTER" WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR><TD WIDTH="100%" ALIGN="CENTER" VALIGN="MIDDLE">
<?
	if ($begin > 0) {
		echo '<A HREF="images_browse.php?begin=' . ($begin - 1) . '&amp;gallery='.format_url($_GET[gallery]).'" TARGET="smallwin">&lt;&lt;</A> ';
	}
?>
			<A HREF="javascript:void();" onclick="window.open( 'images_full.php?i=<? echo $filename ?>&amp;gallery=<? echo $_GET[gallery] ?>', 'subwin2','fullscreen=1,scrollbars=1' ); return false;">?</A> 
<?
	$pages = count($list);
	$current = $begin + 1;
	echo "$current / $pages ";
	if ($current < $pages) {
		echo '<A HREF="images_browse.php?begin=' . ($begin + 1) . '&amp;gallery='.format_url($_GET[gallery]).'" TARGET="smallwin">&gt;&gt;</A>';
	}

	mysql_close($conn);
?>
</TD></TR>
</TABLE>
</BODY>
</HTML>
Return current item: Wordlog