Вход Регистрация
Файл: monst/core/pag/forum/thread.php
Строк: 97
<?
$forum_id 
= (int)$index[2];
if ( 
$forum_id OR $forum_id count($forum_names) ) {
    
g('/forum');
}

$forum_name $forum_names[$forum_id]['name'];
$forum_desc $forum_names[$forum_id]['desc'];

upd_loc('view forum <a href="/forum/'.$forum_id.'">'.$forum_name.'</a>');

?>

<div class='op_top_im'>
    <img src='/core/i/pic/forum/<?=$forum_id?>.jpg?1' alt='' class='title_img' /><br/>

</div>

    <div style='position: relative; top: -100px; color: #999; height: 0;'>
        <span style='background: #000; font-size: 20px;'><?=$forum_name?></span><br/>
        <span style='background: #000; font-size: 11px;'><?=$forum_desc?></span><br/>
    </div>



<!--    <div>-->
<!--        <span style='color: #999; font-size: 20px;'>--><?//=$forum_name?><!--</span><br/>-->
<!--        <span style='color: #756861; font-size: 11px;'>--><?//=$forum_desc?><!--</span>-->
<!---->
<!--    </div>-->
<!--    <br/>-->
    <?

    $on_page 
10;

    
$find $_forum_topic -> find(
        [
            
'forum_id' => $forum_id
        
]
    );

    
$find -> limit($on_page);


    if ( 
$forum_id == ) {
        
$orderby 'time';
    } else {
        
$orderby 'last_upd';
    }

    
$find -> sort(
        [
            
'warn' => -1,
            
$orderby => -1,
        ]
    );

    
$count $find -> count();

    
$nav nav($on_page);

    if ( !
$count ) {
        
?>

        <div class='padding'>
            <br/>
            <?=$lang['forum.php']['no_topics']?>
        </div>
        <br/>
        <?
    
} else {
        foreach ( 
$find as $topic ) {
            
$name $topic['name'];

            
$posts $_forum_post -> find(
                [
                    
'topic_id' => $topic['id']
                ]
            );

            
$count $posts -> count(true);

            
$text_query $_forum_post -> findOne(
                [
                    
'topic_id' => $topic['id']
                ]
            );

            
$text mb_substr($text_query['text'], 090'UTF-8') . '....';
            
$text strip_tags($text);

            
$last_post_user_query $_forum_post -> find(
                [
                    
'topic_id' => $topic['id']
                ]
            );

            
$last_post_user_query -> sort(
                [
                    
'id' => 1
                
]
            );

            foreach ( 
$last_post_user_query as $f ) {
                
$last_post_user_id $f['user_id'];
            }



            if ( 
$topic['close'] ) {
                
$name '<span style="color: #555;">#'.$name.'</span>';
            }

            if ( 
$topic['warn'] ) {
                
$name '<span style="color: deeppink;">'.$name.'</span>';
            }


            
$color '#999';
            if ( 
date('d'$topic['time']) == date('d') ) $color 'yellowgreen';
            if ( 
date('d'$topic['time']) == date('d'time() - 60 60 24) ) $color 'orange';

            
?>
            <a href='/forum/topic/<?=$forum_id?>/<?=$topic['id']?>'>

                <div style='backgr2ound: #111; padding: 10px; border-radius: 10px; border: 1px dashed <?=$user['theme_color']?>; margin: 10px;'>
<!--                    <img src='/core/i/menu/news.png' alt='' class='gray' width='20'/>-->

                    <span style='color: #999;'>
                        <?=date('d'$topic['time'])?>
                        <?=month(time())?>.
                    </span>
                    <br/>
                    <span style='color: <?=$user['theme_color']?>; font-size: 20px;'><?=$name?></span>
                    <span style='color: #ccc; font-size: 12px;'><?=$text?></span>
                    <img src='/core/i/other/views.png' alt='' width='20'/><span style='color: #999;'><?=$topic['views']?>(<?=@count(@explode(',,'$topic['uniq_views']))?>), <?=$count?></span>



                    <br/>

                    <div style='floa2t: right;'>
                        <img src='<?=av($topic['user_id'])?>' alt='' class='av' width='15' style='margin-right: 5px;'/><?=Name($topic['user_id'])?>
                        <img src='<?=av($last_post_user_id)?>' alt='' class='av' width='15' style='margin-right: 5px;'/><?=Name($last_post_user_id)?>


                    </div>



            <div style='clear: both;'></div>

            </div>
            </a>

            <?

        
}
    }


    print 
'<br/>'.$nav.'<br/>';



if ( 
$forum_id != OR ( $forum_id == AND $user['id'] == $admin_id) ) {
    
?>

    <div style='text-align: center;'>
        <a class='bt_black' href='/forum/new_topic/<?=$forum_id?>'><?=$lang['forum.php']['new_topic']?></a>
    </div>
    <?
}
Онлайн: 0
Реклама