Файл: modules/gallery/inc/default.php
Строк: 33
<?
if( ! defined( 'SHCMS_ENGINE' ) ) {
die('SHCMS Engine No access');
}
if($id_user == true)
{
$iview = '<a href="?do=newdir&id='.$id_user.'">'.Lang::__('Новая папка').'</a>';
}
echo '<div class="mainname">'.Lang::__('Фотоальбомы пользователей').'';
echo '<span class="time">'.$iview.'</span></div>';
echo '<div class="mainpost">';
$gallery = $db->query( "SELECT DISTINCT(`id_user`) FROM `gallery_dir`" );
if( $db->num_rows( $gallery ) > 0 )
{
while($photo = $db->get_array($gallery) )
{
$pusers = $db->super_query( "SELECT * FROM `users` WHERE `id` = '{$photo[id_user]}'" );
$cdir = $db->get_array($db->query( "SELECT COUNT(*) FROM `gallery_dir` WHERE `id_user` = '{$photo[id_user]}'" ));
$pview = '<div class="posts_gl">';
$pview .= '<table cellspacing="0" callpadding="0" width="100%"><tr>';
$pview .= '<td class="icons"><img src="/engine/template/icons/user.png"></td>';
$pview .= '<td class="name" colspan="10">';
$pview .= '<b><a href="index.php?do=user&id='.$pusers['id'].'">'.$pusers['nick'].'</a></b>';
$pview .= '<span class="time">Папок: '.$cdir[0].'</span>';
$pview .= '</td>';
$pview .= '</tr></table>';
$pview .= '</div>';
echo $pview;
}
}else {
echo engine::error(Lang::__('Фотогаллерея пуста'));
}
echo '</div>';
echo engine::home( array( Lang::__('Назад') , '/index.php' ) );
?>