core/api/modules/foto_show/index.php

42 lines
1.4 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
01.05.2021
Личный кабинет
*/
//if (!$_SESSION['user_id'] && !ID)header( 'Location: /403/' );
$mod = new main( $smarty, $settings );
$mod -> db = $db;
$mod -> install();
/* 08.05.2021 */
//Получаем данные о фото
unset( $a );
$a['id'] = ID;
$foto = $db -> get_massiv( 'foto_img', $a, '', 1 );
$smarty -> assign( 'foto', $foto );
// 09.05.2021 получаем список фотографий из этого альбома
unset ( $b );
$b['album_id'] = $foto[0]['album_id'];
$foto_list = $db -> get_massiv( 'foto_img', $b, '', 20 );
$smarty -> assign( 'foto_list', $foto_list );
//14.05.2021 узнаем инфу об альбоме
unset($c);
$c['id']=$foto[0]['album_id'];
$album=$db-> get_massiv('foto_albums', $c, '', 1);
$smarty -> assign( 'album', $album );
if ($album[0]['roznica']==1){
$col_foto=$db->count_sql('foto_img', $b);
$cena=round($album[0]['cena']/$col_foto, 2);
$smarty -> assign( 'cena', $cena );
}
//плагин овл карусели
$smarty -> assign( 'plugins', '<script src="/api/jquery/plugins/owl.carousel/OwlCarousel2-2.3.4/dist/owl.carousel.min.js"></script>
<link rel="stylesheet" href="/api/jquery/plugins/owl.carousel/OwlCarousel2-2.3.4/dist/assets/owl.carousel.min.css">
<link rel="stylesheet" href="/api/jquery/plugins/owl.carousel/OwlCarousel2-2.3.4/dist/assets/owl.theme.default.min.css">' );
//print_r( $foto_list );
?>