File size: 1.65Kb
<?
if( ! defined( 'SHCMS_ENGINE' ) ) {
die('SHCMS Engine No access');
}
$id = intval($_GET['id']);
$dir = $db->super_query( "SELECT * FROM `gallery_dir` WHERE `id` = '{$id}'" );
if($dir['id_user'] == $id_user)
{
$iview = '<a href="?do=newphoto&id='.$dir['id'].'">'.Lang::__('Добавить').'</a>';
}
echo '<div class="mainname">'.Lang::__('Фотографии из папки').': '.$dir['name'].'';
echo '<span class="time">'.$iview.'</span></div>';
echo '<div class="mainpost">';
$files = $db->query( "SELECT * FROM `gallery_files` WHERE `id_dir` = '{$dir[id]}'" );
echo '<center>';
if($db->num_rows($files) > 0) {
while( $gallery = $db->get_array( $files ) )
{
$gview = '<span class="imajq">';
$gview .= '<a href="/upload/gallery/max/'.$gallery['images'].'" class="highslide" onclick="return hs.expand(this)">';
$gview .= '<img src="/upload/gallery/mini/'.$gallery['images'].'" title="'.$gallery['images'].'" /></a>';
$gview .= '<div class="highslide-caption">';
$gview .= '<a href="index.php?do=view&id='.$gallery['id'].'">Просмотр: <b>'.$gallery['images'].'</b></a>';
$gview .= '</div>';
$gview .= '</span>';
echo $gview;
}
}else {
echo engine::error('Фотографий не найдено');
}
echo '</center>';
echo '</div>';
//Переадресация
echo engine::home( array( Lang::__('Назад') , 'index.php?do=user&id='.$dir['id_user'].'' ) );
?>