<?php
///////////////////////////////////////////////////////////////////////
// mcGalleryPRO //
// All code is © 2002-2003 Marc Cagninacci. //
// No files may be redistributed in whole or significant part. //
// -------------- mcgalleryPRO IS NOT FREE SOFTWARE ---------------- //
// You should have receive a file called license.txt in this package //
///////////////////////////////////////////////////////////////////////
// Last modified 2003-02-08
session_start();
include './admin/conf.inc.php';
include './header.php';
include './shadow.php';
if (empty($lang)) $lang = $lang_def;
include './lang/'.$lang;
$connect= mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);
$file= substr($album.'_'.$file, 0, -3).'swf';
$query= "UPDATE mcgallery_flash SET visite=visite+1 WHERE file ='$file'";
mysql_query ($query);
$query="SELECT * FROM mcgallery_flash WHERE file='$file'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$album=$row['idalbum'];
if ($rowd['dartcolor'] == '#FFFFFF') { $dart_g = 'gauche.gif'; $dart_d = 'droit.gif'; }
elseif ($rowd['dartcolor'] == '#000000') { $dart_g = 'gaucheN.gif'; $dart_d = 'droitN.gif'; }
if ($searchit == '')
{
if ($sel == 3)
{
$query2="SELECT file FROM mcgallery_select WHERE login ='$private_login' AND type ='F' ORDER BY file";
}
else
{
$query2="SELECT file FROM mcgallery_flash WHERE idalbum ='$album' ORDER BY file";
}
$result2=mysql_query($query2);
$prevarray = array();
while ($row2=mysql_fetch_array($result2))
{
$prevarray[]=$row2['file'];
}
$key = array_search($file, $prevarray);
if ($key > 0)
{
list($path1,$path2) = split('_', $prevarray[$key-1],2);
$small1 = substr($path2,0,-3).'jpg';
if (!file_exists('flash/'.$path1.'/small/'.$small1)) { $small1 = substr($path2,0,-3).'JPG'; }
$previd = '<a href="showflash.php?sel='.$sel.'&start='.$start.'&album='.$path1.'&file='.$path2.'" onMouseOver="window.status=\'\';return true"><img src="images/'.$dart_g.'" border="0" align="middle"><img src ="flash/'.$path1.'/small/'.$small1.'" border="0" alt="<" width="'.$thumb_title.'"></a>';
}
if (isset($prevarray[$key+1]))
{
list($path3,$path4) = split('_', $prevarray[$key+1],2);
$small2 = substr($path4,0,-3).'jpg';
if (!file_exists('flash/'.$path3.'/small/'.$small2)) { $small2 = substr($path4,0,-3).'JPG'; }
$nextid = '<a href="showflash.php?sel='.$sel.'&start='.$start.'&album='.$path3.'&file='.$path4.'" onMouseOver="window.status=\'\';return true"><img src ="flash/'.$path3.'/small/'.$small2.'" border="0" alt=">" width="'.$thumb_title.'"><img src="images/'.$dart_d.'" border="0" align="middle"></a>';
}
}
?>
<table border="0" cellspacing="1" cellpadding="5" align="center" class="td1">
<tr>
<td class="td1" align="center" colspan="2">
<table border="0" cellspacing="0" cellpadding="1" align="center" width="100%">
<tr>
<td class="td1"><font face="<?php echo $rowd['fontface']; ?>" size="1"><?php echo $previd; ?></font></td>
<td align="center" class="td1" width="100%">
<font face="<?php echo $rowd['fontface']; ?>" size="2" color="<?php echo $rowd['fontcolor1']; ?>">
<?php
if ($row['title']!='') { echo stripslashes($row['title']); }
else { echo stripslashes($row['album']); }
echo '</font></td><td class="td1" align="right"><font face="'.$rowd['fontface'].'" size="1">'.$nextid.'</font></td>';
echo '</tr></table>';
echo '</td></tr><tr>';
echo '<td bgcolor="white" align="center" colspan="2">';
$len= strlen($album);
$image= substr($row['file'], ($len + 1));
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<?php echo $flash_width; ?>" height="<?php echo $flash_height; ?>">
<param name="movie" value="flash/<?php echo $album.'/'.$image; ?>">
<param name="quality" value="high">
<embed src="flash/<?php echo $album.'/'.$image; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?php echo $flash_width; ?>" height="<?php echo $flash_height; ?>"></embed></object>
<?php
echo '</td></tr>';
if ($row['title']!='')
{
echo '<tr><td class="td1" align="left" width="20%"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'.$l_Album.': </b></font></td>';
echo '<td class="td1" align="left"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.stripslashes($row['album']).'</font></td></tr>';
echo '<tr><td class="td1" align="left" width="20%"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'.$l_Titre.': </b></font></td>';
echo '<td class="td1" align="left"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.stripslashes($row['title']).'</font></td></tr>';
}
if ($row['author']!='' || $row['email']!='' || $row['url']!='')
{
echo '<tr><td class="td1" align="left" width="20%"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'.$l_Auteur.': </b></font></td>';
echo '<td class="td1" align="left"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.stripslashes($row['author']).'</font>';
if ($row['email']!='') { echo ' <a href="mailto:'.$row['email'].'"><img src="images/ecrire.gif" border="0" alt=""></a>'; }
if ($row['url']!='') { echo ' <a href="'.$row['url'].'" target="_blank" onMouseOver="window.status=\'\';return true"><img src="images/home.gif" border="0" alt=""></a>'; }
echo '</td></tr>';
}
if ($row['descr']!='')
{
echo '<tr><td class="td1" align="left" width="20%" valign="top"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'. $l_Description.': </b></font></td>';
echo '<td class="td1" align="left" width="'.($video_width + 10).'"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.nl2br(stripslashes($row['descr'])).'</font></td></tr>';
}
if ($row['ref']!='')
{
echo '<tr><td class="td1" align="left" width="20%" valign="top"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'. $l_ref.': </b></font></td>';
echo '<td class="td1" align="left"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.$row['ref'].'</font></td></tr>';
}
/*
else
{
echo '<tr><td class="td1" align="left" width="20%" valign="top"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'"><b>'. $l_ref.': </b></font></td>';
echo '<td class="td1" align="left" width="'.($taille[0]/1.3).'"><font face="'.$rowd['fontface'].'" size="1" color="'.$rowd['fontcolor1'].'">'.substr($row['file'], 0, -4).'</font></td></tr>';
}
*/
echo '<tr><td class="td1" align="center" colspan="2"><font face="'.$rowd['fontface'].'" size="1">';
if ($comment_allowed > 0) {
echo '<a href="#" onclick="javascript:window.open(\'./add.php?t=F&id='.$row['id'].'\',\'\',\'width=300,height=300\');" class="lien2" onMouseOver="window.status=\'\';return true">'.$l_add_comment.'</a>';
}
if ($select_allowed == 1 && $sel != 2)
{
echo ' <a href="#" onclick="javascript:window.open(\'./select.php?t=F&file='.urlencode($row['file']).'\',\'\',\'width=250,height=250\');" class="lien2" onMouseOver="window.status=\'\';return true">'.$l_sel_add.'</a>';
}
if ($ecard_allowed == 2 || ($ecard_allowed == 1 && $album < 100))
{
echo ' <a href="#" onclick="javascript:window.open(\'./card.php?im=flash/'.$album.'/'.$image.'\',\'\',\'width=300,height=350\');" class="lien2" onMouseOver="window.status=\'\';return true">'.$l_ecard_video.'</a>';
}
echo '</font></td></tr>';
if ($comment_allowed > 0)
{
include './comment.php';
}
if ($t == 'F') { $go = '&t='.$t.'&searchit='.$searchit; }
echo '<tr><td class="td1" align="center" colspan="2">';
if ($sel == 3)
{
echo '<font face="'.$rowd['fontface'].'" size="1"><a href="index.php?start='.$start.'&sel=3" class="lien2" onMouseOver="window.status=\'\';return true">'.$l_Retour.'</a></font>';
}
else
{
echo '<font face="'.$rowd['fontface'].'" size="1"><a href="index.php?searchwhere='.$searchwhere.'&flash=1&start='.$start.'&album='.$row['idalbum'].$go.'" class="lien2" onMouseOver="window.status=\'\';return true">'.$l_Retour.'</a></font>';
}
echo '</td></tr></table>';
include './footer.php';
?>