# die;
$galleryx = $_GET['gallery'];
#if(!isset($galleryx)){
$script .= '
';
#}
$pageTitle = 'Floré Events: Show Room';
$style = "#main{background:#000 url('images/showroombg.jpg')no-repeat;background-image:url('images/showroombg.jpg');}";
$style .= '#content{background:#EC7D3A;}#title{color:#EC7D3A;}#title2{color:#EC7D3A;}a{text-decoration:none;color:#EC7D3A;}
.galLink{width:150px;height:110px;text-align:center;float:right;margin-right:10px;margin-bottom:5px;font-weight:bold;font-size:.8em;}
.galLink img{border:2px solid #fff;}
.galLink img:hover{border:2px solid #ec7d3a;}
.containerGal{float:right;width:500px;height:375px;padding-top:30px;}
';
if(isset($galleryx))
{
$style = '#main{background:#000;}';
$style .= '#content{background:#EC7D3A;}#title{color:#EC7D3A;}a{text-decoration:none;color:#EC7D3A;}';
}
$pageTitle = 'Floré Events: Show Room';
include_once('includes/header.php') ?>
#BLR Content integration with PHP
function r(){print '
';}
function b(){print '
';}
function c(){print '';}
$a = 0; $z = 0;
#Directory Listing
$folder = 'images/gallery/';
$f = dir($folder);
#Builds the folder array and removes the trailing ','
while($entry=$f->read()){if($entry != '.' && $entry != '..' && $entry != '.svn'):$folders .= $entry.',';endif;}
$folders = substr($folders,0,-1);
$fArray = explode(',',$folders);
if(isset($galleryx)){
$shrm = $galleryx;
}
print ''.$shrm.'
';
print '';
foreach($fArray as $gallery):
$title = ucwords($gallery);
if(!isset($galleryx)){
print '
';
}
endforeach;
c();
$c = count($fArray);
print '
';
$image = $thumbs = '';
if(isset($galleryx))
{
#print '';
$folder = $folder.$galleryx.'/';
#print $folder;
$open = opendir($folder);
$x=0;
while(false !== ($file = readdir($open)))
{
if($file != '.' && $file != '..' && $file != 'Thumbs.db'):
$images .= '
';
$thumbs .= '';
$x++;
endif;
}
}
print $thumbs;
$xmlStart = '';
#$xmlStart = 'xyz';
$xmlEnd = '';
$xmlGallery = $xmlStart.$images.$xmlEnd;
if (file_exists('imagesshow.xml'))
{
$open = fopen('imagesshow.xml', w);
$all = filesize('imagesshow.xml');
#$current = fread($open,$all);
$current = $xmlGallery;
#$current = '';
fwrite($open,$current);
fclose($open); #opens in write mode, replace content and closes the file
print $xmlGallery;
}
else
{
print 'Unable to create xml';
}
?>
include_once('includes/footer.php') ?>