Location: PHPKode > scripts > MOSAIC MINI > mosaic-mini/index.php
<?php
			/*################################################################
			# MOSAIC MINI (c) yellowgreen designbüro                         #
			#                                                                #
			# Home: http://yellowgreen.de/mosaic-mini/                       #
			# License: http://creativecommons.org/licenses/by-sa/3.0/        #
			#                                                                #
			# How to install:                                                #
			# Just put this script in a folder with images on your server    #
			# and start the script by accessing the folder with a browser.   #
			#                                                                #
			# How to uninstall:                                              #
			# Rename this file to "uninstall.php" and start the script.      #
			# It will delete the cache dir, if it exists.                    #
			################################################################*/

// SETTINGS

			/*##########################################################*/
			
			// Title and description
			$gallery_title = "My gallery";
			$gallery_description = "Another MOSAIC MINI gallery";

			// Modes
			$page_mode = "normal"; // "normal" or "embedded"
			$mosaic_mode = "gallery"; // "gallery" or "imagewall"
			$popup_mode = "modal"; // "popup" or "modal"
			
			// Look and feel
			$background_color = "#FFFFFF";
			$link_color = "#00BFFF";
			$sort_reverse = "on";
			$thumbnail_quality = 80;
			$standard_size = "normal";
			$slideshow_pause_during_images = 3;
			
			// Standard sizes
			$small_size = 90;
			$normal_size = 150;
			$large_size = 225;
			
			// Standard images per row
			$small_size_per_row = 5;
			$normal_size_per_row = 3;
			$large_size_per_row = 2;
			
			// Paths
			$images = "./";
			$cache = $images . "cache/";

			/*##########################################################*/

// OUTPUT

			error_reporting(0);
			umask(0000);
			header('content-type: text/html; charset=utf-8');
			
			$version = "1.6.9"; // Built 2009-06-29

			// Output error messages
			if(phpversion() < 4) die("<strong>Error</strong>: MOSAIC needs at least PHP 4.01. Current PHP version is " . phpversion());
			if(!extension_loaded("gd")) die("<strong>Error</strong>: MOSAIC needs the PHP extension GD-LIB for image rendering. Please contact your hosting provider.");
			
			// Output converted image
			if(isset($_GET["arrow"])) {
				header("content-type: image/png");

				$arrow_forward = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAAH7+Yj7AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJ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ENLgVQ4EBuDYh9UWgJxMdCgR3iLWTRDeIDUcyDmIeDNGqDBrXgNBBo2AUjlkxh+LECD/2LLyxtBWYjM5Ac3FJaXwykwDKXUhxWxK4jU6AAtGOZiicDJYAOBjBYiDJoOLWUOQvn7sKgBFzCgQqAaj0F3gIaoEutvUMmFr1QBlcYvSAzLImwGFgANmkhm5LgyYamRJlIQ2zxMWMLhAxCzkWngHSYsgvxA/BNo6HYyDFwMMhBXRveAVv+ZJBjYDTLQioCiaVCD5Qio+wXKfrASG1RaCxHhAlAy0gC1RYBYAk1OGGjgO1gTQ5hIL4EM+YDFsCkgw1CaS6BinMyY3Qo0LBdfAfsciwtwgVCgYWsIVgFAQ0WB1AEg1sJhUCvQoBpsEgABhrdOwWKRELREDwRiXRKD5jK0TpoIC2+iGg6EHAht+U8mIViJBaAUmIseBUQ5EOgoTmil4MdAH7AJ1OWDtT0I1fLkVMzUAuA+I64GOyh93SaygCAFgGrHrVBzK0CNWQLqQelTFZZOYSWXNLTTyEYFB4EMBuXIWcjNHWggJACp+USYAeqxKQH1P2WBdnWOUei4HdAW4zUiLCYGgNxyDOg2JVAND2qeypHooI9A3AQton/RKD2C3FQKcmAskRqOQIuFC3TMNLEgB6oQUNQHdFTxAOVqFSZofxwfCASmBcUBcuAXJhyNZGQActw9aKPmNhB70NGB+0BR3AfEIcQGOajXD3QkLEeCRvCaQGNuNHJgH6wcbCHQoyAGXIC28Q/iqdejgNRSIs3rAJpViVyTTCYwwEIK+A6NmQ7ksSYix6hgLcxcbB3kcBJ6jrQCoEbDSnyNBVDNso6OLRnkFk0QevWIb1QF5NBpQJxGY4fNYoCMX/8lu0UNHWgpglaLPJSWbaAOG7QCIFQGM5DU5EdztCLSEBOo+DHAkqvvAPFZIF4JdMx9cuwBAChjBwRjtG1OAAAAAElFTkSuQmCC";
				
				if($_GET["arrow"] == "backward") echo base64_decode($arrow_backward); else echo base64_decode($arrow_forward);
				exit();
			}

			// Output mosaic image
			if(isset($_GET["image"]) && is_file($_GET["image"]) && isset($_GET["size"])) {
				// Image data
				$types = array(1 => "gif", "jpeg", "png", "swf", "psd", "wbmp");
				$imagedata = getimagesize($_GET["image"]);
				
				// If not exists, create cache directory
				if(!is_dir($cache) && is_readable("./")) mkdir($cache, 0777);
	
				// Get thumbfile name for image
				$thumbfile = substr($_GET["image"], strrpos($_GET["image"], '/') + 1);
				$thumbfile = substr($thumbfile, 0, strrpos($thumbfile, '.')) . "_" . $_GET["size"] . "." . $types[$imagedata[2]];
				
				// Calculate sizes
				$imagedata[0] > $imagedata[1] ? $horizontal = true : $vertical = true;
				$crop_x = 0; $crop_y = 0;

				// Set mode
				if(isset($_GET["mode"]) && $_GET["mode"] == "normal") {
					if(isset($horizontal)) $width = $_GET["size"]; else $height = $_GET["size"];
					if(!isset($width)) $width = floor($height * $imagedata[0] / $imagedata[1]);
					if(!isset($height)) $height = floor($width* $imagedata[1] / $imagedata[0]);
					$source_width = $imagedata[0]; $source_height = $imagedata[1];
				} else {
					$width = $_GET["size"]; $height = $_GET["size"];
					if(isset($horizontal)) {
						$source_width = $imagedata[1]; $source_height = $imagedata[1];
						$crop_x = ($imagedata[0] - $source_width) / 2;
					} else {
						$source_width = $imagedata[0]; $source_height = $imagedata[0];
						$crop_y = ($imagedata[1] - $source_height) / 2;
					}
				}
								
				// Output image
				header("content-type: image/" . $types[$imagedata[2]]);
				
				if(!file_exists($cache . $thumbfile)) {
					$original_image = call_user_func("imagecreatefrom" . $types[$imagedata[2]], $_GET["image"]);
					$new_image = imagecreatetruecolor($width, $height);
					imagecopyresampled($new_image, $original_image, 0, 0, $crop_x, $crop_y, $width, $height, $source_width, $source_height);
					if($types[$imagedata[2]] != "jpeg") $thumbnail_quality = "";
					call_user_func("image" . $types[$imagedata[2]], $new_image, $cache . $thumbfile, $thumbnail_quality);
					call_user_func("image" . $types[$imagedata[2]], $new_image, false, $thumbnail_quality);
					imagedestroy($original_image);
					imagedestroy($new_image);
				} else
					readfile($cache . $thumbfile);
				exit();
			}

			// Output popup
			if(isset($_GET["src"])) {
				$relative_path = basename($_GET["src"]);
				if(!file_exists($relative_path)) header("location: index.php");

				// Get image data
				$imagedata = getimagesize($relative_path);
				$filesize = round(filesize($relative_path));
				
				switch(strlen($filesize)) {
					case (strlen($filesize) > 4 && strlen($filesize) < 7) : $filesize = round($filesize  / 1000) . " kB"; break;
					case (strlen($filesize) >= 7) : $filesize = round($filesize / 1000000, 2) . " MB"; break;
					default : $filesize = $filesize . " Byte";
				}
				
				// Output HTML content
				header('content-type: text/html; charset=utf-8');
				echo '
					<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
					<html xmlns="http://www.w3.org/1999/xhtml">
						<head>
							<title>' . basename($_GET["src"]) . ' (' . $imagedata[0] . ' &times; ' . $imagedata[1] . ' px, ' . $filesize . ')' . '</title>
							
							<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
							<meta name="generator" content="MOSAIC" />
							
							<style type="text/css">
								body { margin:0px; background-color:#000000; text-align:center }
								a:hover { background-color:#000000 }
								#image { width:' . $_GET["width"] . 'px; height:' . $_GET["height"] . 'px }
							</style>
						</head>
					
						<body>
							<!-- IMAGE -->
							<div id="image"><img src="' . $_GET["src"] . '" width="' . $_GET["width"] . '" height="' . $_GET["height"] . '" alt="' . basename($_GET["src"]) . '" /></div>
						</body>
					</html>
				';
				exit();
			}

			// Output JavaScript
			if(isset($_GET['js'])) {
				header('content-type: application/x-javascript');
			
			?>
				// MoreCSS Library
				O="elementropertValuepyorelefunctioM	CSS.piesstyent.=n(,=getPcontvar ','ery(,'pacityvaluelassif();innHTlistStcolorName':'rebZak;c.ngth,){tiongetseexecute.Zplac;}};bef	=='inpÇudoCStràg(`aÇ'aftype')list--countÅEmÇctMLst=n(){àcludeposiÄmage7y='îNumbtagJáfiltÑe(/hZf'.slicetrim(Zloadauto.ndîsByTaZsultsZmovetarÅ};=´gJ('li.subór,,âI™exádefaultcomma™óatuscJadd':opÄs[Ωïed¥]téof elÇ for){u™efàedhióoryäs[i]spanhoóte¡(i=0;~;i++)ymbol-cQlic'+tooltip°s[0]focusàput/g,onchangeò®SectcalrblurZf';¢(%)/úColorÇarchñ=Ü+val(switch(!â&&†numbpªàg¢%o·¬caÇ'locaÄ.ôC‘t*100(0,§ºwàdow.INPUTëtoggpßIõOf(idÂì”ü‡)ë?ñ:'⁄∂®-ï-titn ÇtAttràflÚTés¡wardC∫C∞;˘ibu»('\"elementropertMoreCalueenttiSS.getdocum	pyVlassonle.toolp.innerpiesvar posse=func(.sty.eightidthif(')return windowsliceSS.ame,'yV(ZtscreenlayerEm	ode);horthancOrIDcalrHTMLi){sÉdStribrowroolp=Pize='ByTagNQremovePosiclo[0]teparInt.ngthpopupcNQget('opacityndexOfacvebody[1].execuóTdefaul=(mÅ=}el+'re.™place,,.cli	mou;};.ellipsiSSSé`arú-fft[i]for(i=ô;i++)Z~©, 'Z;.G(';pudoCscroll+Séûshow,0,wbehavioómplaóJìC(StyângvÄNumbeChild(visibca'Üh∂Àilit´(/(%∑0;i<ifrQtagop∞¶tViewà»ßë¬∞úÄsíî(ápxºar;b™ak;Ã~.avai=0 ∂.o¥tst7.‘en(§-sé)/2func=ëpy;=∞c™aóÄ7Pies.spli=ò(h™f',áëabsoÁûdivÊ=no, oggftàIFRAME›m⁄gin.õ=õ;Ö¡°ÇZ7©W◊û¢ñ.a˘ppendÌluóº¡Ç}};erå`-c-\"electorlementMoreCvar entreproperttargeteightSS.if(onfunctidocum	stylesizessin.dexOfdisplaistenidthe.').length;bak;splittrgSssefileHeaDOMlice(loadode);DefitlassSJes[j]typeget){[level;for(turncaZ'Ev	te=trim(ositi`dTagNameady('.placescrollscenfalZ=='eruZCaptuObjectwdows[i]=(='nûSizscriptGëdCÑ;};=0;at*/1007áStyleÜ,lû>-1.';origal=offZXMLHtéLûev	Ç}≥tpReque.pageelZ áEs.s.ö.availe.cli	tachéies++)Qswitch(~ñ.ÄedprotolassTagysJ=sJò(yValuäj©j<caëÉileº∫By«ïó•eóh/g,'':=MÅóëmpTaráfiŒP™h;mÅú=newiÖH=parZIn.push(movei©i<pos}{√mÅàåñStaë.Gó ∑estlkà´åe':Á»§∞sheetbodyq.W˨(e,'Ì»ún_timûadd¥!§àÓe{»§nÛe∞Ø»;j¡,max[0]deÙ§blockÏ≤tÏ;ØmÅ,er™io.Äw=+'%∞\"elementropertpseudlassentlesector.ngthcase'oCnodorndexOf(es,pyMeCSEm	getar;break;ectsctiveNameif(al.slice(VuestS.i'v e,piNa,cr,umberelse.')batchApÅsByTaÇ>-1)fse[i]':f(Qi=0ntervpysrun=ply);s[vel,G`m7~;i++)time.aSnextAnOfsdocumÑg(wd-1sequencswitchi=Zûâ;i<1))stwindow.=='fó.apé(sáZ=[==functio,vel+óÅN(å0.c&&©ö	ÅByIQs=Zõ±d(óÅs(íû]Z©];¢s∑îóØ∏OrIDà='ver(πexi§s®ΩØ,£)Z.p[ãá]ëÄ ë};ßPiesfir§àøush®0,J.){sameàeªy-seÇ+1):,ìô™0)Éé(.href condàcr)(i+1la§;}f(Qj=0anchà.sub§)?°:||ou’;j<∂;j€++)Z[backú‹j].=º∞ñó¿(,pQò=(‡™∫m⁄sefia=Ev	ne·i7á,~¥ö	õ'bclick=´n(1;ËodyÇ[0Ï],G,0Ç>ûŸJ¢ã∞üeÌ,Ü`m7,ñddÂLiÚ§eÊr•setiä(Œ,ï".split('\"');Q="˜M	CSS(¬={'ªÃª˝®-ïQ÷∏Q∏QìQì∑-Q∑ÉQÉô-QÈ“-téQ“TéísÀQúSÀíGQ‹ÊQÊpß-iõQ≠Ã≠˝QÆQÆ»xt-sÕeQ»xtSÕeˆQˆÔÃÔ˝œQœ'ØapplyOnLoad={ت¸+û Œ;Ø÷≥¬ŸıŸ%ÏÉıÉart(%)§‚SELECTë{‘’æ.!ûë{µŸëtop.Ë£=Ÿ€,æ.µÉëefl(É€,'+æ.+')+⁄§}}Ö∏≥¬Ábackºƒ.backã˚ºƒ.˚ãߺËßãcloÇÌcloÇãpràtÌpràtãïºïãÿºÿã—º—ãcÕkº(†Ó?cÕk():triggEv‡,'cÕk§bZakÖÜ∂-ÜÏå∂-姵appe™ë{Ü=ÜÛå=åÛfi¶ñ)+å;}µde»ë{=¶ñ•ÎÜ~)==Ü)=•(Ü~•(~-å~)==å)=•Î~-å~ñ=ÖìÁcº∫+û nŒü‡`aÇ'ÚºÚûnŒü‡bZakÖ∑≥¬‚Ó{µë=¯;¿¯˛‘—ò¯=∞)¯û⁄};‘ÿò¯áë¯˛}ÖÉefl(ØÈ≥,◊¬ö∂ô-öovwri»Ïπ∂ô-πÏå=(öáÜÙÜ=(öáåÙ!ûë{£=(◊)?◊.£:£;£)∞£”£fiπ+å;=cZa»XMLHttpRequeó(.open('Å',.‘Zadyóa»’.ZadySta»==4&&.π==200)fi.Zsp‘ÇText+å;};.Ç™(null}Ø“Té˙={'›º1,'„º1};ø˙[]á√ët鲵›'&&brows()áSafarië{t鲫∂«Ϩ∂¨',10ˇ®save',«≤(«.laó¥Ò'.ë+1)+'.Œ«≤àgΫ.laó¥Ò'.ë)+'.›_ƒ§ˇ¨',¨}µ„ë{‘keyup=n(¬¯=¯¢D”'§}ÖúSÀ‰∂í‰1.25emÏG∂íG§G!ûëGû; G:ŒG;tagJ==('UL'||'OLë)…i<±ë ú(±ë[i]elÇú‡˜ú‡¬©úTéûn‘e⁄ñû<∆ =ö:absolu»; margà-ft:-Œ‰+G+'>Œ+'</∆> ŒñÖ‹G∂Gblack§tagJ==('UL'||'OLë)…i<±ë ú(±ë[i]elÇú‡˜ú‡¬ñû<∆ =G:ŒG+'>Œñ+'</∆>⁄©G∞ÖÊ©Ê˛°s¬©zoomû100%⁄©°ûprogÚ:DXIõTrans¡m.Microsoft.alpha(Êû+Í+§⁄–&&ø–.Êá„ë–.Ê∞Í;¿©°ûalpha(Êû+Í+ë⁄}¿ø©MozO!û√ë©MozO˛¿ø©KHTMLO!û√ë©KHTMLO˛Ø†A'&&£)∞£”£iõ=new Iõ(iõ.src˛Ø≠¸=≠CJ(∫,Øäs∞.split(…i<äs [¶≈≤Î≈.àdexÒQ)))]=¶≈≤(≈.àdexÒQ)+1)ØÆö=ÅShortha™(ÅPÆ-öc mÚdëwÚth∂Æ-wÚth640pxÏheight∂Æ-height480pxÏcJr\"‘˛t≥c∫Ëå≥'Zmenub⁄Ôlocab⁄=yes, ‡atusÔæb⁄s=yesÊïå≥ï∫ƒå≥ƒ'Z%ï%“Ê!á£)á£=áñ;§”NQ=ëA{‰7{·ÎÇ}‰ö{nQ=(§™l)?§™l:'öºö=·Î,nQZÒë+ÿñ,¬πt‘ë+ÿ£,Œπ¬ëø¬Ï¬πŒëøŒÏŒπ'+ËÇö)ö.focus(Ç}‰{Ó.id=õ;ı˚t‘=ÿ£,Œ˜ŸÒ=ÿñ,¬˜Ÿï)ïë<a Î=# onclick=◊('¢ñ.ì ∞úÄById(''+õ+'Ç fal;>'+ï+'</a>ºÛë<“ src='+§Î+' ¬='ø¬Ï¬˜ Œ='øŒÏŒ˜ frQbord˛Ù¬ÙŒ›allowTranspa™ncy=true></“>ºÜ=ƒ–ï)/,ï)–“)/,ÛÇ˙ Ç}˝JóxtSlice¨Ú±så`ext-G-±s∫=SÉd(Çô==1àÍÇÕô>ÚGd=Õª0,ÇÕ=Gdª0,Gdª0,).la‡I†û )+±s;}®{ñÍñǣͣÇGd=Õªñ,ñ+£ÇÕ!=Gd)Õ=Gd+±s;˝Jfl¨à§fl=ØJtC¨,Ω,ÖÚ√urˇ√ur'ZnormalÊ°ˇ°∫Öà√ur=ëswitch'&&§Öà≈§ˆ≈¸}…r()==…r(Ö)àJÑexi‡s(§õ,)à§Ö=Ö;≈ˆ≈¸®{§Ö=Ö;JaddC(ˆJaddC(¸}}˝SS¨,ΩÚ»=–fl)/,§flÇõå`ã-c∫üå`ã-üÏ1Ç!Ω&&»!ë{∂Ó∂ı∂˚∂t‘ë-999Ÿœyëhiddenº§flëº˙ ∂Çü!=1)Jü(∂¡üÇ„ •ã(mÅàmÅ&&mÅ=ë¿{Jev	Lisón˛ûaddÏZÆmoveÏ¿TãÇœyëÀº∂Ü=»;®{œyëhiddenºJev	Lisón˛ûìÏZÆmoveÏ¿TãÇ∂Üëº}}„ ¿Tã(eÚ=Mouî(eÇ.push(10,20Ç≤û¬-fi¯<ñ+[2]+25)ñ+=-fi¯-[2];25+£+[3]+fiH>≤ûŒ)£+=-fiH-[3];∂t‘=£+[3]+'Ÿ∂Ò=ñ+[2]+'Ÿ}§onÆov˛à•ãû¿اonÆout=•ã;§onÆdown=•ã;∞onÆout=•ã;˝P⁄	NÅí”,nÅànÅ.”NQ==”?nÅ:P⁄	NÅí(”,nÅ.p⁄	NÅÇ};…ràò(counórInc™m	ªcounórInc™m	.i†û +1)Ç};JÑexi‡sчring,ÑÚÑs=чringÈtû Ê—Ñs∏Ñsµ==Ñ)true;falØPyV,‡y,¶tVà—∏Jtrim(µª0,µ.i†û:)Zquoós==‡y)Jtrim(µªµ.i†û:+1)ZquoósʶtVØSÉd«à«=«Ètû Ê—«∏«µ=ë «Èce(i,1Ç«Ø∆,Âڻ뺒&&’.úCompuód∆à»=’.úCompuód∆(Z.úPyV(ÂÇ® §curr	∆àÂ=´(/-(w)/g,„(‡rMatch,p1àp1.toUpp˛Ca(Ç}Ç»=§curr	∆[Â];}»ØJäÚäs=new ArrayûSaf⁄i'ZWebKit'ZKÜ'ZOp˛a'ZMSIE'ZMozillaÊä=navigator.urAg	;—äs∏ä.i†(äsµ)!=-1)ä=äsµ;äØ≤mÅÚ»;lf¯÷?lf¯:lfH;® ∞Ä&&∞Ä≠¯÷?∞Ä≠¯:∞Ä≠H;® ∞¢÷?∞¢≠¯:∞¢≠H;}™turn(»<0)?0:»Øîá,sé,mÅàsé=ò(séÇæî=(7.pageYO¥)?7.pageYO¥:∞¢.æT‘;switch(áàÃÒ':Ãt‘':á=0€right':á=‹l¯-sé€c	˛':áßë~?(‹l¯‚:(≤û¬‚€midd':áßë~?(‹lH‚\":ôPì+(–-)/27åbottom':pì=(mÅúö?Ω⁄-:–-7¯fault:pì€t(pì∂ã pì®áSize£Ü,,˚Êúauto§100%∞‘%Æà€t(ÇÜú˛·ö“ΩÏ´å°“•eó˛˘∞‡±˙˛ˇnew˙˛=±Ï+'px∞»ÒØ»=»;ÿÏ7}‡Üúh·ö“Ω⁄´å°“–˘∞‡±⁄≤t⁄;Øhˇnew⁄≤t⁄;Øh=±⁄+'px∞»ÒØ»=»;ÿ⁄7}}‡ã parZFlo™(∂;proportialRe£˛,hˆÏˆ⁄Ú¸=M™h.m(maxÏ/˛ˆ⁄/hÇã[M™h.round(¸*˛),M™h.round(¸*h)]®trim£sJ,mÅà…/^s+|s+$—◊quoës…/^|^'|$|'$|—◊commas…/^,+|,+$—;ã sJ®›C∆ï£cÑ,c∆ïÚß=cÑ„äfiß;i¡ß[i]==c∆ï)ß.spi,1Çã ß.joó ®Ã‰£Úua;°.‰àtry{uaÿ ‰(∂c™ch(eàua=õ;}}π°.ActiveX†àtry{uaÿ ActiveX†óMicrosoft.XMLHTTP;}c™ch(eàua=õ;}‡ã ua®áMouZPì£eÊ!e)e=°.µ;fl=[0,0];∏X||∏Yàfl˜=∏X;fl[1]=∏Y;}πæX||æYàfl˜=æX+ºÍ.ôLeft+ºE.ôLeft;fl[1]=æY+ºÍ.ôTop+ºE.ôTop;‡ã fl®triggûé£e,µÊbrowZr()!§MSIE{µ†=ºÃéóMouZés;µ†.ité(µ,true,õÇdisp™ché(µ†∂elZfiéó'+µ∂;µLû£˚,≠,üÊ!ü)ü=õ◊add{)(≠,üÇπ™ø)™øó'+≠∂elZ{›¥)›¥(≠,üÇπ¯ø)¯øó'+≠∂};clu¯Script£÷,fiŒTypeà√fiŒTypeàåjs':î=ºÃEó¶;î.ܧëxt/java¶∞î.src=÷7åcss':î=ºÃEóÂ;î.ܧëxt/css∞î.l§È∞î.hf=÷7‡clu¯dFiŒ=œhead˜.appendChild(î∂;~ñ={Ä:[],Äed:(Êargum	s.calŒe.de)ã;argum	s.calŒe.de=trueäfi~ñ˝;i¡~ñ˝[i](∂,Ä:(fiThisàthis˝‹fiThisǺ)º(DOMCt	Loa¯d,ƒ,nullÇ/KHTML|WebKit/i.ëst(navig™or.uZrAg	)ÚÔ=ZtInërval((Ê/Äed|compŒë/.ëst(º‚)àcŒarInërval(ÔǯŒë Ô;ƒ(∂},10∂/*@cc_@*//*@@_w32)≈=src§java¶:void(0)';loc™i.≈col==https:)≈=src=//0;ºwrië(<scr+ipt id=__ie_Ä ¯fû +≈+></scr+ipt>Ƕ=ºáEById(__ie_ÄǶ.ñstaëchange£Êthis.‚==compŒë)ƒ(∂;/*@end@*/°˝=ƒ;}};~ñ.Ä(¨ÈsÇ ¨Ès(Ú«s=œÂäfi«s;i¡«¢.l.toLowûCaZ()úmocssáSourceCÅ(«¢.hf∂ áSourceCÅ(p™hÚq=É(ÇÎopenóá',p™hÇÎñstaëchange£Ê΂==4&&Îst™us==200)co(ÎspZTextò(/r|n|t|f/g, )ò(//*.*?*//g,).G(})∂;ÎZnd(null∂ co(Õsàfor(fiÕs&&trim(Õ¢)!§∞i++ÚíÕ¢ª0,Õ¢‘{)Ǭ=õ,”©‘=>Æ)”§=>∞‘->Æ)”§->∞”!=0Ú¬íª(”)+2)Ç”ú->¬+§:same∞íª0,(”))∂(‘ Æ)?=„:=[];ëmpQ=[]Àı[j]ÒëmpQ‹[j]Ç=ëmpQ;¬à(¬‘ Æ)?¬=¬„:¬=[¬];’Q=[]À¬ı¬[j]Ò’Q‹¬[j]Ǭ=’Q;‡¿íÕ¢ªÕ¢‘{+1)).Gó;À¿;j¡ŸíŸÇyïs=[]; es=[]À¿ıŸàyNamÖ=¿[Ÿª0,Ÿ‘:)]; ÖퟪŸ‘:+1),'quoës;‡∫(œÍ˜,,0,¬,¿,yïs, es,õ∂‡∫£nÅ,,Œvel,¬,¿,yïs, es,callû,numbûOfEsÊ>ŒvelÚpZudoC∆=(â]‘:Æ)?â]ªâ]‘:+1):õ;s=(pZudoC∆)?â]ª0,â]‘:):â];â]úÍ∫(nÅ,s\"¨1ìôë†(∆£{#à≥£].à≤'*Ç;æ≈)default:«Ö{≤∆«Ç)ëæ«Ç+≈¬Ä J#Ö{≥J#Ç+£]‘ÄZ=Zõ¬}Ä{Q=(µ∞µJ:Ö?µµJ:ÀÜ√(Zìâ;Z!=''∞i<∂∞typeof Zá!='undefiÊd'î{Q=Zá;.§y.c⁄nterIncrem	='N '+“ëQåΆº»ƒ°…“™≠—ÿÆ–i%2ÕÆ”ài<∂û)Æ÷œ◊rœ.”I'#Ç)™•location.hashÿå0}¶ú'Ÿ™'›Ç{!‡)‰(¶úÇ?∂:ζúÇ‚∂)?1:‡+ÎÄ ‚1)?∂:‡û;ò™≠)»‰ò;°‘Ä å0‘å=1)¥,s¨1ì∂¬}√Íû†º»hoª„oª'ave„⁄t'a∫È';.onÈÍ»return Ü‘…ƒ–”à÷fúà›à=Ü‘QïflºJïÓÓıÖ)?◊rºJ=À0;QflJÖ?≠)û:ÎQıflJıÖ?1:0;ï>0)=Ü;ÔßOnLoad¿î{!—Á'prepeÇ;G)Ò¬!)ïÕŒ(¡ıÕÙTime⁄tˆ*¡ÙI䈡Û?Ûº,Œ,Ü):ñttachÂ('on'+,Œë´n Œ(»G)Ò,Ü¡ÔãáîÁÜ,ô¬}}Êw ó(ë".split('\"');o="	7GJQZ`~ÄÅÇÉÑÖÜáàâäãåéëíìîïñóòôöõúûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ".split('');i='';for(U=0;U<4;U++){u=O[U].split('');for(J=u.length-1;J>-1;J--)Q[U]=Q[U].split(o[J]).join(u[J]);i+=Q[U].replace(//g,'"').replace(//g,"\\").replace(//g,"\n")}eval(i);
				// MoreCSS Plugin: modal-window
				eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('B.1N[\'D-v\']=\'1q\';B.1q=7(a,b,c){9 d=B.J(b,\'D-v-y\',\'1O\');9 e=B.J(b,\'D-v-C\',\'1P\');9 f=B.J(b,\'D-v-1Q\',\'\');9 g=S(B.J(b,\'D-v-1R\',0));9 h=S(B.J(b,\'D-v-K\',1S));9 i=B.J(b,\'D-v-11\',\'\');l(a.1T==\'A\'&&a.1r!=\'\'){l(i==\'12\'){9 j=U;9 k=B.1U(d,e,B.1s(\'y\')-j,B.1s(\'C\')-j);d=k[0];e=k[1]}8.q.1t(a.1r,(c==\'1V\')?1:0,d,e,(f==\'L\')?0:1,g,c,f,h)}};9 8={};7 T$(i){E z.1W(i)}8.q=7(){9 p,m,b,1X,13,14,15,16,17,f=0;E{1t:7(c,u,w,h,a,t,d,e,g){l(!f){p=z.18(\'19\');p.1a=\'D-v\';m=z.18(\'19\');m.1a=\'D-v-V\';b=z.18(\'19\');b.1a=\'D-v-1Y\';z.O.1b(m);z.O.1b(p);p.1b(b);m.1Z=8.q.1c;v.21=8.q.11;f=1}l(!a&&!u||e==\'L\'){p.6.y=w?w+\'F\':\'12\';p.6.C=h?h+\'F\':\'12\';p.6.W=\'L\';b.P=\'\'}Q{b.6.X=\'L\';p.6.y=p.6.C=\'22\'}H.V();13=c;14=u;15=w;16=h;17=a;H.I(m,1,g,3,d);l(t){23(7(){8.q.1c()},24*t)}},1u:7(c,u,w,h,a,b){l(u){p.6.W=\'\';9 x=v.1v?1w 1v():1w 25(\'26.27\');x.28=7(){l(x.29==4&&x.2a==2b){8.q.1d(x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e.6.C=G+(r.1j(r.1k(h-G)/s)*f)+\'F\'}H.Y()}}}}();8.M=7(){E{1g:7(){E z.O.1J||z.R.1J},y:7(){E 1K.2r||z.R.1o},C:7(){E 1K.2s||z.R.1p},1B:7(){9 d=z,b=d.O,e=d.R;E r.N(r.N(b.1L,e.1L),r.N(b.1p,e.1p))},1C:7(){9 d=z,b=d.O,e=d.R;E r.N(r.N(b.1M,e.1M),r.N(b.1o,e.1o))}}}();',62,153,'||||||style|function|TINY|var||||||||||||if|||||box|Math||||window|||width|document||MoreCSS|height|modal|return|px|oh|this|alpha|getPropertyValue|opacity|none|page|max|body|innerHTML|else|documentElement|parseInt||100|mask|backgroundImage|display|pos|clearInterval||resize|auto|ic|iu|iw|ih|ia|createElement|div|id|appendChild|hide|psh|iframe|offsetHeight|top|offsetWidth|ai|ceil|abs|si|wo|ho|clientWidth|clientHeight|modalWindow|href|innerSize|show|fill|XMLHttpRequest|new|case|src|break|size|theight|twidth|filter|block|setInterval|twalpha|hd|twsize|scrollTop|self|scrollHeight|scrollWidth|properties|640|480|animation|close|80|tagName|proportionalResize|ajax|getElementById|fn|content|onclick||onresize|100px|setTimeout|1000|ActiveXObject|Microsoft|XMLHTTP|onreadystatechange|readyState|status|200|responseText|open|GET|send|null|switch|image|img|alt|frameborder|default|left|round|typeof|object|innerWidth|innerHeight'.split('|'),0,{}))
			<?php

				exit();
			}

// ROUTINE SETTINGS
			
			$standard_size = strtoupper($standard_size);
			switch($standard_size) {
				case "SMALL" : $standard_size = $small_size; break;
				case "NORMAL" : $standard_size = $normal_size; break;
				case "LARGE" : $standard_size = $large_size; break;
				default : $standard_size = $normal_size; break;
			}
			
			if(!isset($_GET["size"])) $_GET["size"] = $standard_size;
			if($_GET["size"] < $small_size) $_GET["size"] = $small_size;
			if($_GET["size"] > $large_size) $_GET["size"] = $large_size;
			if(!isset($_GET["position"])) $_GET["position"] = 0;
			
			switch($_GET["size"]) {
				case $small_size : $images_per_row = $small_size_per_row; break;
				case $normal_size : $images_per_row = $normal_size_per_row; break;
				case $large_size : $images_per_row = $large_size_per_row; break;
				default : $images_per_row = $normal_size_per_row; break;
			}

// PROCESSES
			
			// Uninstall
			if(basename($_SERVER['PHP_SELF']) == "uninstall.php") {
				if(file_exists($cache)) {
					$cache_open = opendir($cache);
					while($dir_entry = readdir($cache_open)) { if(is_file($cache . $dir_entry)) if(unlink($cache . $dir_entry) == false) die("It seems that the cache dir or some temporary files are write protected. Uninstall aborted ... sorry."); }
					if(rmdir($cache)) die("All temporary files has been successfully removed. But I can't delete myself. You must do this for me ..."); else die("It seems that the cache dir is write protected. Uninstall aborted ... sorry.");
				} else die("Okay, I'm ready. But I can't delete myself. You must do this for me ...");
			}

			// Get images
			$images_open = opendir($images);
			while($dir_entry = readdir($images_open)) {
				if(is_file($images . $dir_entry)) {
					$imagedata = getimagesize($images . $dir_entry);
					if($imagedata[2] == 1 || $imagedata[2] == 2 || $imagedata[2] == 3) $image[] = $dir_entry;
				}
			} closedir($images_open);
			
			// Number of images, images left to fill pattern to maximum, images per page and sort methode
			if(isset($image)) $number_of_images = count($image); else $number_of_images = 0;
			if(isset($image) && $sort_reverse == "on") rsort($image);
			$images_until_end = $number_of_images - $_GET["position"];
			$images_per_page = $images_per_row * $images_per_row;
			
			// Fill pattern to maximum
			if($number_of_images - $_GET["position"] <= $images_per_page && $number_of_images > $images_per_page) $_GET["position"] = $number_of_images - $images_per_page;
			
			// Set variables for navigation
			$number_of_sites = ceil($number_of_images / $images_per_page);
			$page = ceil(($_GET["position"] / $images_per_page) + 1);
			
// START MOSAIC

		if($page_mode == "normal") {
			echo '<' . '?xml version="1.0" encoding="utf-8"?' . '>';
?>
			
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
			
		<head>
			<meta http-equiv="content-type" content="text/html; charset=utf-8" />
			<meta name="description" content="<?php echo $gallery_description; ?>" />
			<meta name="generator" content="<?php echo "MOSAIC MINI " . $version; ?>" />
		
			<title><?php echo $gallery_title . " – MOSAIC MINI " . $version; ?></title>
			
<?php
		// Slideshow handling
		if(isset($_GET["slideshow_position"]) && !isset($_GET["slideshow_pause"])) {
			if($_GET["slideshow_position"] < 0) $_GET["slideshow_position"] = $number_of_images - 1;
			if($_GET["slideshow_position"] >= $number_of_images) $_GET["slideshow_position"] = 0;
			echo '<meta http-equiv="refresh" content="' . $slideshow_pause_during_images . '; URL=?slideshow_position=' . ($_GET["slideshow_position"] + 1) . '" />';
		}
?>		
		
		<style type="text/css">
			body { margin:50px 25px 25px 25px; background-color:<?php echo $background_color; ?>; text-align:center; font:bold 11px Arial, Helvetica, sans-serif; color:#3C3C3C; }
			
			a, a:hover { cursor:pointer; text-decoration:none; color:#3C3C3C; }
			a:hover, a.active { color:<?php echo $link_color; ?>; }
			a img {	border:none; }
			
			.page-element { width:450px; margin:0 auto; text-align:left; }
			.page-element-imagewall { width:auto; margin:0 auto; text-align:left; }
			
			#mode {	text-align:right; }
			
			#mosaic { position:relative; top:-40px; overflow:hidden; height:450px; background-color:#3C3C3C; }		
			#mosaic a:hover img, #imagewall a:hover img { filter:alpha(opacity=65); -moz-opacity:0.65; opacity:0.65; }
			#mosaic table { width:100%; height:100%; border-collapse:collapse; border-spacing:0; }
			#mosaic table td { vertical-align:middle; text-align:center; }
			
			#navigation { position:relative; top:205px; width:560px; height:42px; margin:0 auto; }
			
			#menu { position:relative; top:-39px; padding:2px 0; }
			
			#quicknavigation { position:relative; top:-20px; clear:both; visibility:hidden; text-align:center; }
			#quicknavigation a.inactive_page { padding:1px 4px; }
			#quicknavigation a.inactive_page:hover, #quicknavigation a.active_page { padding:1px 4px; background-color:<?php echo $link_color; ?>; color:#FFFFFF; }
			
			#footer { text-align:center; }
			#footer a { font-weight:normal; color:#CCCCCC; }

			#modal-window { display: none; position: absolute; z-index: 9999; padding: 10px; background: #FFFFFF; border: 1px solid #CCCCCC; }
			#modal-window-mask { display: none; position: absolute; top: 0; left: 0; z-index: 9998; width: 100%; height: 100%; background: #000; }
			#modal-window-content { background: #FFFFFF; }
		</style>
	</head>

	<body>

<?php } ?>

		<script type="text/javascript" src="index.php?js" charset="utf-8"></script>

		<script type="text/javascript">
			// <![CDATA[
				// Popup
				var pop = null;
				function openImage(obj, name, width, height) {

					<?php if($popup_mode == 'modal') { ?>
						MoreCSS.modalWindow(obj, ['modal-window-width:' + width, 'modal-window-height:' + height, 'modal-window-resize:auto'], 'image');
					<?php } else { ?>
						if(width > screen.availWidth) { height = Math.round(height * (100 * screen.availWidth / width) / 100); width = screen.availWidth; }
						if(height > screen.availHeight) { width = Math.round(width * (100 * screen.availHeight / height) / 100); height = screen.availHeight; }
						if(obj.href.indexOf('index.php?src=') < 0) obj.href = 'index.php?src=' + obj.href + '&width=' + width + '&height=' + height;
						MoreCSS.target(obj, ['target-position:center middle', 'target-width:' + width, 'target-height:' + height, 'target-properties: resizable=no, status=no, toolbar=no, menubar=no, locationbar=no, directories=0, scrollbars=no'], 'popup');
					<?php } ?>
						return false;
				}
		
				// Toggle quick navigation
				function quicknavigation() {
					if(document.getElementById("quicknavigation").style.visibility == "visible") {
						document.getElementById("quicknavigation").style.visibility = "hidden";
						document.getElementById("quicknavigation_link").className = "inactive";
					} else {
						document.getElementById("quicknavigation").style.visibility = "visible";
						document.getElementById("quicknavigation_link").className = "active";
					}
				}
			// ]]>
		</script>

<?php

		// Options
		echo '<div class="' . (($mosaic_mode == "gallery") ? "page-element" : "page-element-imagewall") . '" id="mode">';
		    echo '<a'; if($_GET["size"] == $small_size) echo ' class="active"'; echo ' href="?position=' . $_GET["position"] . '&amp;size=' . $small_size . '" title="' . $small_size . ' &times; ' . $small_size . '">SMALL</a> &bull; ';
		    echo '<a'; if($_GET["size"] == $normal_size) echo ' class="active"'; echo ' href="?position=' . $_GET["position"] . '&amp;size=' . $normal_size . '" title="' . $normal_size . ' &times; ' . $normal_size . '">NORMAL</a> &bull; ';
		    echo '<a'; if($_GET["size"] == $large_size) echo ' class="active"'; echo ' href="?position=' . $_GET["position"] . '&amp;size=' . $large_size . '" title="' . $large_size . ' &times; ' . $large_size . '">LARGE</a>';
		echo '</div>';
		
		// Mosaic navigation
		if($mosaic_mode == "gallery" && !isset($_GET["slideshow_position"])) {
		    echo '<div id="navigation">';
		    	// Forward
		    	if($_GET["position"] - $images_per_page > 0 ) $forward_to_position = $_GET["position"] - $images_per_page; else $forward_to_position = 0;
		    	if($_GET["position"] >= 1) echo '<a href="?position=' . $forward_to_position . '&amp;size=' . $_GET["size"] . '"><img src="?arrow=backward" alt="&laquo;" align="left" /></a>';
		    	// Backward
		    	if(($number_of_images - $_GET["position"]) < $images_per_page) $forward_to_position = $number_of_images - $_GET["position"]; else $forward_to_position = $_GET["position"] + $images_per_page;
		    	if($_GET["position"] + $images_per_page < $number_of_images) echo '<a href="?position=' . $forward_to_position . '&amp;size=' . $_GET["size"] . '"><img src="?arrow=forward" alt="&raquo;" align="right" /></a>';
		    echo '</div>';
		}
		
		// Mosaic pattern
		if($mosaic_mode == "gallery" && !isset($_GET["slideshow_position"])) {
    	    echo '<div class="page-element" id="mosaic">';
    	    	for($i = $_GET["position"]; $i < ($_GET["position"] + $images_per_page) && $i < $number_of_images; $i++) {
    	    		$imagedata = getimagesize($images . $image[$i]);
        			echo '<a href="' . $images . $image[$i] . '" onclick="return openImage(this, \'' .  $image[$i] . '\', ' . $imagedata[0] . ', ' . $imagedata[1] . ')" target="_blank" title="' . $image[$i] . '"><img src="index.php?image=' . $images . $image[$i] . '&amp;size=' . $_GET["size"] . '" alt="' . $image[$i] . '" /></a>';
        		}
	    	echo '</div>';
		}
		
		// Image wall
		if($mosaic_mode == "imagewall") {
		    echo '<div class="page-element-imagewall" id="imagewall"><span id="imagewall-container">';
    	    	for($i = 0; $i < $number_of_images; $i++) {
    	    		$imagedata = getimagesize($images . $image[$i]);
        			echo '<a href="' . $images . $image[$i] . '" onclick="return openImage(this, \'' .  $image[$i] . '\', ' . $imagedata[0] . ', ' . $imagedata[1] . ')" target="_blank" title="' . $image[$i] . '"><img src="index.php?image=' . $images . $image[$i] . '&amp;size=' . $_GET["size"] . '" alt="' . $image[$i] . '" width="' . $_GET["size"] . '" height="' . $_GET["size"] . '" /></a>';
        		}
        	echo '</span></div>';
        	
        	echo '
        		<script type="text/javascript">
					// <![CDATA[
	        			var imageWallWidth = document.getElementById("imagewall-container").offsetWidth;
    	    			document.getElementById("imagewall").style.width = imageWallWidth + "px";
        				document.getElementById("mode").style.width = imageWallWidth + "px";
        			// ]]>
        		</script>
        	';
		}
		
		// Slideshow navigation
		if($mosaic_mode == "gallery" && isset($_GET["slideshow_position"])) {
		    echo '<div id="navigation">';
		    	// Forward
		    	echo '<a href="?slideshow_position=' . ($_GET["slideshow_position"]  - 1) . '"><img src="?arrow=backward" alt="&laquo;" align="left" /></a>';
		    	// Backward
		    	echo '<a href="?slideshow_position=' . ($_GET["slideshow_position"]  + 1) . '"><img src="?arrow=forward" alt="&raquo;" align="right" /></a>';
		    echo '</div>';
		}
	
		// Slideshow
		if($mosaic_mode == "gallery" && isset($_GET["slideshow_position"])) {
		    echo '<div class="page-element" id="mosaic"><table><tr><td>';
		    		$imagedata = getimagesize($images . $image[$_GET["slideshow_position"]]);
		    		echo '<img src="index.php?image=' . $images . $image[$_GET["slideshow_position"]] . '&amp;size=450&amp;mode=normal" alt="' . $image[$_GET["slideshow_position"]] . '" />';
		    echo '</td></tr></table></div>';
		}
		
		if($mosaic_mode == "gallery") {
			if(isset($_GET["slideshow_position"])) {
			    // Slideshow menu
			    echo '<div class="page-element" id="menu">';
			    	echo '<div style="float:left">IMAGE ' . ($_GET["slideshow_position"] + 1) . ' OF ' . $number_of_images . '</div>';
			    	echo '<div style="float:right; text-align:right">';
			    		echo '<a'; if(!isset($_GET["slideshow_pause"])) echo ' href="?slideshow_position=' . $_GET["slideshow_position"] . '&amp;slideshow_pause"'; else echo ' class="active" style="text-decoration:blink" href="?slideshow_position=' . ($_GET["slideshow_position"] + 1) . '"'; echo '>PAUSE</a> &bull; ';
			    		echo '<a href="./">EXIT SLIDESHOW</a></div>';
			    echo '</div>';
			} else {
			    // Page mode menu
			    echo '<div class="page-element" id="menu">';
			    	echo '<div style="float:left">PAGE ' . $page . ' OF ' . $number_of_sites . '&nbsp;&bull;&nbsp;' . $number_of_images . '&nbsp;IMAGES</div>';
			    	echo '<div style="float:right; text-align:right"><a id="quicknavigation_link" onclick="quicknavigation()">PAGES</a> &bull; ';
			    	echo '<a href="?slideshow_position=0">SLIDESHOW</a></div>';
			    echo '</div>';
			
			    // Quick navigation
			    echo '<div class="page-element" id="quicknavigation">';
			    	for($c = 0; $c < $number_of_sites; $c++) {
			    		if(($c + 1) == $page) echo '<a class="active_page" href="?position=' . ($c * $images_per_page) . '&amp;size=' . $_GET["size"] . '">' . ($c + 1) . '</a>';
			    			else echo '<a class="inactive_page" href="?position=' . ($c * $images_per_page) . '&amp;size=' . $_GET["size"] . '">' . ($c + 1) . '</a>';
			    		if($c < $number_of_sites - 1) echo " ";
			    	}
			    echo '</div>';
			}
		}
		
		// Footer
		echo '<p id="footer"><a href="http://yellowgreen.de/mosaic-mini/" title="MOSAIC MINI ' . $version . ' &copy; designb&uuml;ro yellowgreen">MOSAIC MINI ' . $version . '</a></p>';
?>

<?php if($page_mode == "normal") { ?>

	</body>
	</html>
	
<?php } ?>
Return current item: MOSAIC MINI