Location: PHPKode > scripts > Imageview > imageview/index.php
<?php
/******************************************\
| Imageview 6 :: AJAX Edition              |
| By Jorge Schrauwen                       |
\******************************************/
//launch installer
if((file_exists('install/index.php')) && (!file_exists('admin/config.xml'))){
	header('Location: install/');
	exit;
}

//detect search engines
$agent = $_SERVER['HTTP_USER_AGENT'];
if((eregi("bot",$agent)) || (eregi("slurp",$agent)) || (eregi("teoma",$agent))){
	include('searchengine.php');
	exit;
}

//headers so this page doesn't get cached
header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );

//create core
require('system/core/imageview.php');
$imageview = &new imageview();
$skin = $imageview->skin();

//remove link hash
if($_SERVER['QUERY_STRING'] !== ''){ //set cookie and redirect
	setcookie('ivLinkHash', $_SERVER['QUERY_STRING'], time()+60);
	header('Location: '.str_replace('?'.$_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']));
	exit;
}

//Create the URI
$URI = 'main.php';  //default URI
if($imageview->config->preload_ui()) //preload interface
	if(!isset($_COOKIE['ivPreloaded'])) $URI = 'preload.php';

//add query
if(isset($_COOKIE['ivLinkHash'])){ //update URI and unset cookie
	setcookie('ivLinkHash', '', time()-60);
	$URI .= '?'.$_COOKIE['ivLinkHash']; 
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Imageview 6</title>
<link href="favicon.ico" rel="shortcut icon" />
<meta name="author" content="Jorge Schrauwen" />
</head>
<frameset cols="*,0" frameborder="no" border="0" framespacing="0">
  <frame src="<?php echo $URI; ?>" name="frImageview" id="frImageview" />
  <frame src="about:blank" name="iHistoryRecorder" id="iHistoryRecorder" />
  <noframes>
	<body>
		[Imageview 6 Is Only Supported in IE6, Mozilla, Opera or Safari]
	</body>
</noframes>
</frameset>
</html>
Return current item: Imageview