View file user/tape/inc/forum.php

File size: 1.38Kb
<?php
if ( $type == 'them' && $post['avtor'] != $user['id'] ) {
    $name = 'создал' . ( $avtor['pol'] == 1 ? null : "а" ) . ' в форуме тему ';
}
if ( $type == 'them' ) {
    $them   = db::fetch("SELECT * FROM `forum_t` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1", ARRAY_A);
    $razdel = db::fetch("SELECT * FROM `forum_r` WHERE `id` = '$them[id_razdel]' LIMIT 1", ARRAY_A);
    $forum  = db::fetch("SELECT * FROM `forum_f` WHERE `id` = '$razdel[id_forum]' LIMIT 1", ARRAY_A);
    if ( $them['id'] ) {
        echo '<div class="nav1">';
        echo user::avatar( $avtor['id'] ) . user::nick( $avtor['id'], 1, 1, 1 ) . ' <a href="user.settings.php?id=' . $avtor['id'] . '">[!]</a> ' . $name . $s1 . vremja( $post['time'] ) . $s2 . '<br />';
        echo '</div>';
        echo '<div class="nav2">';
        echo ' <a href="/forum/' . $forum['id'] . '/' . $razdel['id'] . '/' . $them['id'] . '/"> ' . text( $them['name'] ) . '</a> ';
        echo '<div class="text">' . output_text( $them['text'] ) . '<br /></div>';
    } else {
        echo '<div class="nav1">';
        echo user::avatar( $avtor['id'] ) . user::nick( $avtor['id'], 1, 1, 1 ) . ' <a href="user.settings.php?id=' . $avtor['id'] . '">[!]</a>';
        echo '</div>';
        echo '<div class="nav2">';
        echo 'Тема уже удалена =( ' . $s1 . vremja( $post['time'] ) . $s2;
    }
}
?>