<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

// Do not delete these lines
    
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
        die (
'Please do not load this page directly. Thanks!');

    if ( 
post_password_required() ) { ?>
        <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
    <?php
        
return;
    }
    
?>

<!-- You can start editing here. -->

    <?php if ( have_comments() ) : ?>
    <div id="comentarii">
    <?php if ( !empty($comments_by_type['pings']) ) :  ?>
        <h4>Trackbacks</h4>
        <ol class="commentlist">
            <?php wp_list_comments('type=pings'); ?>
        </ol>
    <?php endif; ?>

    <h4><?php comments_number('Niciun comentariu''Un raspuns''% comentarii' );?></h4>
    
    <ol class="commentlist">
        <?php /* Changes every other comment to a different class */    
            
if ('alt' == $oddcomment$oddcomment '';
            else 
$oddcomment 'alt';
            if ( 
$comment->comment_author_email == get_the_author_email() ) echo 'staffcomment';
            else echo 
$oddcomment?>
        ?>
        <?php wp_list_comments('avatar_size=40&callback=custom_comment'); ?>
    </ol>
    </div>

    <div class="navigation">
        <div class="alignleft"><?php previous_comments_link() ?></div>
        <div class="alignright"><?php next_comments_link() ?></div>
    </div>

    <?php else : // this is displayed if there are no comments so far ?>
    
        <?php if ('open' == $post->comment_status) : ?>
            <!-- If comments are open, but there are no comments. -->
            <h4>Nici un comentariu</h4>
            
         <?php else : // comments are closed ?>
            <!-- If comments are closed. -->
            <p class="nocomments">Comentariile sint inchise.</p>
    
        <?php endif; ?>
    <?php endif; ?>

    <?php if ('open' == $post->comment_status) : ?>

    <div id="respond">
    <h4><?php comment_form_title'Lasa un comentariu''Raspunde comentatorului %s' ); ?></h4>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>Trebuie sa fii <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logat</a> pentru a putea comenta.</p>
    <?php else : ?>
    
    <strong><?php cancel_comment_reply_link('Anuleaza raspunsul');?></strong>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    <p>Logat cu userul <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Logout">Logout &raquo;</a></p>
    
    <?php else : ?>
            <p><input type="text" name="author" id="author" value="<?php echo $comment_author?>" size="22" tabindex="1" class="input-comment" /> NUME <?php if ($req) echo "- necesar"?></p>
            <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email?>" size="22" tabindex="2" class="input-comment" /> MAIL <?php if ($req) echo "- necesar,"?> nu va fi publicat</p>
            <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url?>" size="22" tabindex="3" class="input-comment" /> WEBSITE - optional</p>
    
    <?php endif; ?>
            <?php comment_id_fields(); ?>
            <p>Comentariul tau <?php if ($req) echo "- necesar"?><br /></p>
            <p><textarea name="comment" id="comment" cols="100%" rows="20" tabindex="4" class="textarea-comment"></textarea></p>
    
        <p id="send">
            <input name="submit" type="submit" id="submit" tabindex="5" value="Trimite" class="buton-comment"  />
            <input type="hidden" name="comment_post_ID" value="<?php echo $id?>" />
        </p>
    
    <?php do_action('comment_form'$post->ID); ?>
    </form>

</div>

<?php endif; // If registration required and not logged in ?>

<?php endif; // if you delete this the sky will fall on your head ?>