|
<?php
/*
#Бесплатный WAP движок StrongCMS
#Официальный сайт поддержки: http://strongcms.ru
*/
$title = 'Альбомы';
require ('../system/core.php');
require ('../system/head.php');
$switch = array(
'album',
'del_album',
'del_foto',
'foto',
'new',
'new_album',
'new_photo',
'reit');
if ($act && ($f = array_search($act, $switch)) !== FALSE && file_exists('switch/'.$switch[$f].'.php'))
{
require ('switch/'.$switch[$f].'.php');
} else
{
echo '<div class="title">'.$title.'</div>';
echo '<div class="news"><a href="'.HOME.'/photo/new">Новые</a> | <a href="'.HOME.'/photo/p_search.php">Поиск </a>';
if ($user['id'])
echo '| <a href="'.HOME.'/photo/new_album">Создать</a></div>';
echo '</div>';
$count = $db->super_query("SELECT COUNT(*) as count FROM `photo_album`");
$start = nav($count['count']);
$photo = $db->query("SELECT * FROM `photo_album` ORDER BY `id` DESC LIMIT ".$start['s'].",".$max);
while ($a = $db->fetch_assoc($photo))
{
$count = $db->super_query("SELECT COUNT(*) as cnt FROM `photo_files` WHERE `album_id` = '".$a['id']."'");
if ($a['tip'] == 1)
echo '<img src="'.HOME.'/images/a_drug.gif">';
echo '<a href="/photo/album'.$a['id'].'" class="menudiv">'.$a['name'].' <span class="counts_right"><b>'.$count['cnt'].'</b></span></a>';
}
if ($start['k_post'] < 1)
echo msg('Альбомов нет!');
if ($start['k_page'] > 1)
echo str(HOME.'/photo?', $start['k_page'], $start['page']); // Вывод страниц
}
##ноги
require_once ('../system/footer.php');
?>