<?php require 'config.php'; ?>
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="crivion.com" />
<title>Scriptoggle - Fancy Free Image Gallery Script</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
$myFile = "settings.scriptoggle";
$fh = fopen($myFile, 'r') or die("cannot open $myFile");
$theData = fread($fh, filesize($myFile)) or die("cannot read $myFile");
fclose($fh);
$settings = unserialize($theData);
switch($settings['align'])
{
case "left":
$divname = "leftwrapper";
$footer = '<div style="position:relative;float:left;width:500px;">';
break;
case "right":
$divname = "rightwrapper";
$footer = '<div style="position:relative;float:right;width:500px;">';
break;
case "center":
$divname = "centerwrapper";
$footer = '<div style="position:relative;margin:0 auto;width:500px;">';
break;
}
?>
<div id="<?php print $divname; ?>" style="width:<?php print $settings['w']; ?>px;height:<?php print $settings['h']; ?>px">
<?php
foreach($settings as $picID => $pos)
{
if(is_array($pos))
{
print '<div style="width:100px;height:90px;position:absolute; left: '.$pos['left'].'px; top: '.$pos['top'].'px">
<img src="images/'.$picID.'" width="100" height="90" />
</div>';
}
}
?>
</div>
<div style="clear: both;height:10px;"></div>
<?php print $footer; ?>
Powered by Scriptoggle Fancy & <a href="http://scriptoggle.com/web-scripts/scripts/fancy-free-php-image-gallery" target="_blank">Free Image Gallery Script</a>
</div>
</body>
</html>