<?php
include("include/config.php");
if(isset($_GET['gallery']) && ereg("^[0-9]+$",$_GET['gallery']) == true) {
$idGallery = $_GET['gallery'];
$query = "SELECT * FROM gallery WHERE id = '$idGallery'";
$result = mysql_query($query) or die(mysql_error());
$array = mysql_fetch_array($result, MYSQL_BOTH);
$titolo = $array['titolo'];
$idClub = $array['idclub'];
$meta = 1;
$htmlMeta = '<title>Galleria Fotografica | '.$titolo.' | ACSI Comitato Provinciale di Padova</title>';
}
?>
<?php include('head.php'); ?>
<body>
<!-- wrap starts here -->
<div id="wrap">
<?php include('header.php'); ?>
<div id="sidebar" >
<?php include('tabellasx.php'); ?>
</div>
<div id="mainFull">
<a name="TemplateInfo"></a>
<h1> </h1>
<?php
echo '<div class="news">';
if($idGallery != '') {
echo '<h2>GALLERIA FOTOGRAFICA | '.$titolo.'</h2>';
echo '<div id="gallery-news">
<ul id="griglia">';
$arrayfile=array();
$arrayfile=elencafiles("/web/htdocs/www.entinoprofit.org/home/gallery/foto/".$idGallery ."/");
for($i=0;$i<count($arrayfile);$i++) {
echo '<li class="foto">
<a rel="lytebox[villaferri]" href="http://www.entinoprofit.org/gallery/foto/'.$idGallery .'/'.$arrayfile[$i].'">
<img src="http://www.entinoprofit.org/gallery/foto/'.$idGallery .'/tn/'.$arrayfile[$i].'"></a>
</li>';
}
echo '</ul>
</div>';
echo '<p> </p>';
}
echo "<p align=\"right\">";
if ($idClub != 0) {
$query2 = 'SELECT id,nome,alias FROM club_list WHERE id = '.$idClub.'';
$risultato2 = mysql_query($query2) or die(mysql_error());
$array2 = mysql_fetch_array($risultato2, MYSQL_BOTH);
echo '<a href="/club/'.$array2['alias'].'">» Vai alla scheda di '.$array2['nome'].'</a> | ';
}
echo "<a href=\"/\">» Torna alla Home</a></p>";
echo '<div class="clear"></div>';
echo '<div class="social"><div class="fb"><a href="https://www.facebook.com/sharer.php?u='.curPageURL().'" target="_blank"><img src="images/fb-share.png"></a></div>
<div class="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-lang="it">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div></div>
';
echo '<div class="fb-comments" data-href="http://www.entinoprofit.org/news.php?id='.$array['id'].'" data-num-posts="10" data-width="540px" data-colorscheme="light" style="margin-left:20px;"></div> ';
echo '</div>';
?>
</div>
<!-- content-wrap ends here -->
</div>
<!-- footer starts here -->
<?php include('footer.php'); ?>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
</body>
</html>