File size: 1.99Kb
<?
if( ! defined( 'SHCMS_ENGINE' ) ) {
die('SHCMS Engine No access');
}
$id = intval($_GET['id']);
$nick = $user->users($id,array('nick'),false);
if($id == $id_user)
{
$iview = '<a href="?do=newdir&id='.$id.'">'.Lang::__('Новая папка').'</a>';
}
echo '<div class="mainname">'.Lang::__('Альбомы').' '.$nick.'';
echo '<span class="time">'.$iview.'</span></div>';
echo '<div class="mainpost">';
$userd = $db->query( "SELECT * FROM `gallery_dir` WHERE `id_user` = '{$id}'" );
if($db->num_rows($userd) > 0) {
while( $dir = $db->get_array($userd) )
{
if($id == $id_user)
{
$eview = '<span class="time">';
$eview .= '<a href="?do=editdir&id='.$dir['id'].'"><img src="/engine/template/icons/edit.png"></a> ';
$eview .= '<a href="?do=deletedir&id='.$dir['id'].'"><img src="/engine/template/icons/delete.png"></a>';
$eview .= '</span>';
}
$nick = $user->users($dir['id_user'],array('nick'),false);
$dview = '<div class="posts_gl">';
$dview .= '<table cellspacing="0" callpadding="0" width="100%"><tr>';
$dview .= '<td class="name" colspan="10"><b><a href="index.php?do=photo&id='.$dir['id'].'">'.engine::ucfirst($dir['name']).'</a></b>'.$eview.'</td>';
$dview .= '</tr><tr><td class="content" colspan="10">'.$dir['text'].'</td></tr></table>';
$dview .= '</div>';
echo $dview;
}
}else
{
echo engine::error(Lang::__('Папок не найдено'));
echo '</div>';
echo engine::home( array( Lang::__('Назад') , 'index.php' ) );
exit;
}
$db->free;
echo '</div>';
//Переадресация
echo engine::home( array( Lang::__('Назад') , 'index.php' ) );
?>