<?php if(!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) : ?> <!--必须-->

	    <?php die('出现了错误，你跨越了访问区域，请返回.'); ?>

<?php endif; ?>

	

<!-- 如果需要密码-->

	<?php if(!empty($post->post_password)) : ?>

	    <?php if($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>

	    <?php endif; ?>

	<?php endif; ?>

	

<?php $i++; ?>



	<?php if(comments_open()) : ?>		

		

			<!--如果已经登录登录-->		

			<?php if ( is_user_logged_in() ) : ?>

		  <div class="reply inset-margin tohide form gray sep10" id="respond">

              <div class="pull-left face"><a target="_blank" href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php global $current_user;get_currentuserinfo();echo get_avatar( $current_user->user_email, 48); ?></a></div>

              <div class="info" style=" padding-left: 55px; ">

                <span class="name"><a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php" ><?php echo $user_identity; ?></a></span>

                <span class="opt gray"><?php cancel_comment_reply_link('取消回复') ?></span>

                <form accept-charset="UTF-8" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" class="new_reply" id="new_reply" method="post"><div style="margin:0;padding:0;display:inline"><?php comment_id_fields(); ?><?php do_action('comment_form', $post->ID); ?></div>

                <textarea class="topic_editor span10" cols="40" id="reply_body" name="comment" placeholder="你怎么看..." rows="6" style="height:20px" tabindex="1">

</textarea>





                <div class="submit_buttons pull-right">

                  <button type="submit" id="btn_reply" class="btn btn-primary" tabindex="2">提交回复</button>

                </div>

              </div>

</form>              <div id="reply"><div class="alert-message">

</div>

            </div>                

          </div>

		  <?php else : ?>



				 

<div id="reply" class="inset-margin">

    <div style="padding:20px;">

    请 <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">登录</a> 后发表评论。 还没有帐号 <a href="<?php echo get_option('siteurl'); ?>/wp-signup.php" class="btn btn-mini btn-danger">现在注册</a> 也可以使用 <a onclick='window.open("<?php echo get_option('siteurl'); ?>/wp-content/plugins/sina-connect/sina-start.php?callback_url=", "dcWindow","width=800,height=600,left=150,top=100,scrollbar=no,resize=no");return false;' rel="nofollow " title="新浪微博帐号登陆">新浪微博</a> 直接登入。

    </div>

</div>



	



			<?php endif; ?>

					

		

<?php else : ?><!--如果评论已关闭-->

<?php endif; ?><!--end-->

	

<?php if ($comments || comments_open()) : ?> <!--如果评论未关闭-->

<?php if($comments) : ?><!-- 如果有评论 -->

			

          <div id="replies" class="tohide sep10">



            <div class="reply_items">



          <div id="replies" class="tohide sep10">



            <div class="reply_items">

              <?php wp_list_comments('type=comment&callback=blog_comment&end-callback=blog_end_comment'); ?>



              

            </div>

          </div>



              

            </div>

          </div>

		  

	<?php else : ?>

			  

	<?php endif; ?>

		<?php endif; ?>