$base_path = '../';
require_once($base_path.'connect/connect.php');
include_once($base_path.'lib/lib.php');
$id = intval($_GET['id']);
$id_f = intval($_GET['id_f']);
$r=mysqli_query($connect,"SELECT * FROM board WHERE id='".$id."'");
$rr=mysqli_fetch_array($r);
$max_foto=$rru['sl_kol']; // Максимальное количество видимых фото в слайдере
$top_vip = '';
//if($rr['vip_3']) $top_vip = '
';
//elseif($rr['vip_1']) $top_vip = '
';
$arrow_left = '
';
$arrow_right = '
';
$rf = mysqli_query($connect,"SELECT * FROM foto WHERE id = '".$id."' ORDER BY id_foto") or die(mysqli_error());
$i=0;
$pf='foto';
while($rrf = mysqli_fetch_assoc($rf))
{
if(file_exists($base_path.$pf.'/'.$rrf['papka'].'/'.$rrf['id_foto'].'s.jpg')
&& file_exists($base_path.$pf.'/'.$rrf['papka'].'/'.$rrf['id_foto'].'b.jpg'))
{
$am[$i][0]=$abs_base_file.$pf.'/'.$rrf['papka'].'/'.$rrf['id_foto'].'b.jpg';
$am[$i][1]=$abs_base_file.$pf.'/'.$rrf['papka'].'/'.$rrf['id_foto'].'s.jpg';
$i++;
}
}
?>
Галерия
if($rru['arrow2']) { ?>
} else { ?>
} ?>
echo '
'.$rr['zag'].'
';
?>
$rez=count($am);
if(!$id_f)
$predf=$rez-1;
else
$predf=$id_f-1;
if($rez>1)
{
if($max_foto==($rez-1)) $max_foto++;
//if(($max_foto+1)==$rez) $max_foto++;
?>
if($rru['sl_typ']==1)
{
?>
if($max_foto<$rez)
{
?>
 |
 |
}
$i=0;
foreach($am as $index=>$aa)
{
if($i<$max_foto) $st=''; else $st='none';
?>
|
$i++;
}
if($max_foto<$rez)
{
?>
 |
 |
}
?>
|
![]()
if($rez>1) { ?>
} ?>
if($top_vip) echo $top_vip; ?>
|
}
elseif($rru['sl_typ']==2)
{
?>
![]()
if($rez>1) { ?>
} ?>
if($top_vip) echo $top_vip; ?>
|
if($max_foto<$rez)
{
?>
 |
 |
}
$i=0;
foreach($am as $index=>$aa)
{
if($i<$max_foto) $st=''; else $st='none';
?>
|
$i++;
}
if($max_foto<$rez)
{
?>
 |
 |
}
?>
|
}
elseif($rru['sl_typ']==3)
{
?>
![]()
if($rez>1) { ?>
} ?>
if($top_vip) echo $top_vip; ?>
|
if($max_foto<$rez)
{
?>
 |
 |
}
$i=0;
foreach($am as $index=>$aa)
{
if($i<$max_foto) $st=''; else $st='none';
?>
|
$i++;
}
if($max_foto<$rez)
{
?>
 |
 |
}
?>
|
}
elseif($rru['sl_typ']==4)
{
?>
if($max_foto<$rez)
{
?>
 |
 |
}
$i=0;
foreach($am as $index=>$aa)
{
if($i<$max_foto) $st=''; else $st='none';
?>
|
$i++;
}
if($max_foto<$rez)
{
?>
 |
 |
}
?>
|
![]()
if($rez>1) { ?>
} ?>
if($top_vip) echo $top_vip; ?>
|
}
?>
}
else
{
?>
![]()
if($top_vip) echo $top_vip; ?>
|
}
?>