<?php // Do not delete these lines
		if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
			die (__('Bitte rufe diese Seite nicht direkt auf. Danke!','unnamed'));
	
		if (!empty($post->post_password)) { // if there's a password
			if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
?>
<p class="center">
  <?php _e('Dieser Beitrag ist mit einem Passwort gesch&uuml;tzt. Gib bitte das Passwort ein, um die Kommentare anzuschauen.','unnamed'); ?>
</p>
<?php	return; } }	?>
<!-- You can start editing here. -->
<?php if (($comments) or ('open' == $post-> comment_status)) { ?>
<hr />
<div id="comment-section">
  <h4 class="center"><?php printf(__('%1$s %2$s zu &#8220;%3$s&#8221;','unnamed'), '<span id="comments">' . get_comments_number() . '</span>', ($post->comment_count == 1) ? __('Kommentar','unnamed'): __('Kommentare','unnamed'), get_the_title() ) ?></h4>
  <ol class="commentlist" id="commentlist">
    <?php if ($comments) { ?>
    <?php $count_pings = 1; foreach ($comments as $comment) { if (comment_type_detection() == "Comment") { ?>
    <?php $i++; /* For different background colors */ ($i % 2 == 1) ? $bg_comment = 'class-comment1' : $bg_comment = 'class-comment2'; ?>
    <li id="comment-<?php comment_ID() ?>" class="<?php echo $bg_comment; ?>">
      <?php if (function_exists('gravatar')) { ?>
      <a href="http://www.gravatar.com/" title="<?php _e('Globally Recognized Avatars','unnamed'); ?>"><img src="<?php gravatar("X", 32,  get_bloginfo('template_url')."/images/default_gravatar.png"); ?>" class="gravatar" alt="<?php _e('Gravatar Icon','unnamed'); ?>" /></a>
      <?php } ?>
      <a href="#comment-<?php comment_ID(); ?>" class="counter" title="<?php _e('Link zu diesem Kommentar','unnamed'); ?>"><?php echo $comment_index; ?></a>
      <p class="comment-header">
        <?php comment_author_link() ?>
      </p>
      <div class="comment-cotent">
        <?php comment_text() ?>
      </div>
      <p class="comment-footer"> <span class="metacmt"><a href="#comment-<?php comment_ID() ?>" title="<?php _e('Link zu diesem Kommentar'); ?>">
        <?php comment_date(__('M jS, Y','unnamed')) ?>
        &nbsp;&nbsp;
        <?php comment_time() ?>
        </a></span>&nbsp;&nbsp;
        <?php if ( $user_ID ) { edit_comment_link(__('Bearbeiten','unnamed'),'<span class="metaedit">','</span>'); } ?>
      </p>
      <?php if ($comment->comment_approved == '0') : ?>
      <p><strong>
        <?php _e('Dein Kommentar erwartet noch die Freigabe','unnamed'); ?>
        </strong></p>
      <?php endif; ?>
    </li>
    <?php } } /* end for each comment */ ?>
  </ol>
  <?php $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' AND comment_type!= '' ORDER BY comment_date"); ?>
  <?php if ($comments) { ?>
  <ol class="pinglist">
    <?php $count_pings = 1; foreach ($comments as $comment) { 
				if (comment_type_detection() != "Comment") { ?>
    <li class="item" id="comment-<?php comment_ID() ?>"> <a href="#comment-<?php comment_ID() ?>" title="Permanent Link to this Comment" class="counter"><?php echo $count_pings; $count_pings++; ?></a>
      <p class="comment-header">
        <?php comment_author_link() ?>
	      schreibt:
      </p>
      <div class="comment-cotent">
        <?php comment_text() ?>
      </div>
      <p class="comment-footer">
        <?php comment_type(); ?>
        am <a href="#comment-<?php comment_ID() ?>" title="Permalink to Comment">
        <?php comment_date(__('M jS, Y','unnamed')) ?>
        um
        <?php comment_time() ?>
        </a>&nbsp;&nbsp;
        <?php if ( $user_ID ) { edit_comment_link(__('Bearbeiten','unnamed'),'<span class="metaedit">','</span>'); } ?>
      </p>
    </li>
    <?php } } /* end for each comment */ ?>
  </ol>
  <?php } ?>
  <?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. -->
  <li id="leavecomment">
    <?php _e('Keine Kommentare','unnamed'); ?>
  </li>
  <?php } else { // comments are closed ?>
  <!-- If comments are closed. -->
  <?php if (is_single) { // To hide comments entirely on Pages without comments ?>
  <li>
    <?php _e('Kommentare sind zur Zeit geschlossen!','unnamed'); ?>
  </li>
  <?php } ?>
  <?php } ?>
  </ol>
  <?php } ?>
  <!-- Reply Form -->
  <?php if ('open' == $post-> comment_status) : ?>
  <h4 class="center">
    <?php _e('Hinterlasse einen Kommentar','unnamed'); ?>
  </h4>
  <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  <p><?php printf(__('Du musst <a href="%s">angemeldet</a> sein, um einen Kommentar zu schreiben.','unnamed'), get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink()) ?></p>
  <?php else : ?>
  <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) { ?>
    <div class="metalinks"><?php printf(__('Angemeldet als %s.','unnamed'), '<a href="' . get_option('siteurl') . '/wp-admin/profile.php">' . $user_identity . '</a>') ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Abmelden','unnamed'); ?>">
      <?php _e(' Abmelden','unnamed'); ?>
      &raquo;</a></div>
    <?php } elseif ($comment_author != "") { ?>
    <p><?php printf(__('Willkommen zur&uuml;ck <strong>%s</strong>.','unnamed'), $comment_author) ?>&nbsp;&nbsp;
      <?php if(get_option('unnamed_shelf') == 1) { ?>
      <span><a href="#" onclick="Effect.toggle('authorinfo','BLIND'); return false;">
      <?php _e('&Auml;ndern/Schließen','unnamed'); ?>
      </a></span>
      <?php } ?>
    </p>
    <?php } ?>
    <?php if ( !$user_ID ) { ?>
    <div id="authorinfo" <?php if ($comment_author != "" && get_option('unnamed_shelf') == 1 ) { ?>style="display:none;"<?php } ?>>
      <p>
        <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
        <label for="author"><strong>
        <?php _e('Name','unnamed'); ?>
        </strong>
        <?php if ($req) __('(erforderlich)','unnamed'); ?>
        </label>
      </p>
      <p>
        <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
        <label for="email"><strong>
        <?php _e('E-Mail','unnamed'); ?>
        </strong>
        <?php _e('(wird nicht angezeigt)','unnamed'); ?>
        <?php if ($req) __('(erforderlich)','unnamed'); ?>
        </label>
      </p>
      <p>
        <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
        <label for="url"><strong>
        <?php _e('Webseite','unnamed'); ?>
        </strong></label>
      </p>
      <?php 
	/****** Math Comment Spam Protection Plugin ******/
	if ( function_exists('math_comment_spam_protection') ) { 
	$mcsp_info = math_comment_spam_protection();?>
 	<p>
   <input type="text" name="mcspvalue" id="url" value="" size="22" tabindex="4" />
	 <label for="mcspvalue"><small><strong>Summe aus <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' ?' ?></strong></small></label>
	 <input type="hidden" name="mcspinfo" value="<?php echo $mcsp_info['result']; ?>" />
  </p>
	<?php } ?>
    </div>
    <?php } ?>
    <p>
      <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="5"></textarea>
    </p>
    <p>
      <?php if(get_option('unnamed_ajaxcommenting') == 1) { ?>
      <input id="previewcomment" type="button" value="<?php _e('Vorschau','unnamed'); ?>"/>
      <?php } ?>
      <input name="submit" type="submit" id="submit" tabindex="6" value="<?php _e('Senden &raquo;','unnamed'); ?>" />
      <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </p>
    <?php do_action('comment_form', $post->ID); ?>
  </form>
  <!--<p><?php printf(__('<strong>XHTML:</strong> Du kannst diese Tags %s nutzen:','unnamed'), allowed_tags()) ?></p>-->
  <?php include (TEMPLATEPATH . '/navigation.php'); ?>
  <?php endif; // If registration required and not logged in ?>
  <?php endif; // if you delete this the sky will fall on your head ?>
  <!-- Close .comments container -->
</div>
<?php } ?>
