View file user/tape/inc/notes.php

File size: 1.31Kb
<?php
if ( $type == 'notes' && $post['avtor'] != $user['id'] ) {
    $name = 'создал' . ( $avtor['pol'] == 1 ? null : "а" ) . ' новый дневник';
}
if ( $type == 'notes' ) {
    $notes = db::fetch("SELECT * FROM `notes` WHERE `id` = '" . $post['id_file'] . "' LIMIT 1", ARRAY_A);
    if ( $notes['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 . '
		<b>' . text( $notes['name'] ) . '</b> ' . $s1 . vremja( $post['time'] ) . $s2 . '<br />';
        echo '</div>';
        echo '<div class="nav2" ><div class="text" >';
        echo output_text( $notes['msg'] ) . '<br /></div>';
        echo '<a href="/plugins/notes/list.php?id=' . $notes['id'] . '"><img src="/style/icons/bbl5.png" alt="*"/> 
		(' . db::count("SELECT COUNT(*) FROM `notes_komm` WHERE `id_notes` = '$notes[id]'") . ')</a>';
    } 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";
    }
}
?>