function ks_comment_content()
{
    global $comment, $ks_settings;
    ?>
<img localsrc="<?php 
    comment_type(68, 112, 112);
    ?>
" alt="" /><?php 
    ks_comment_author_link();
    ?>
<img localsrc="d001" alt=" @ " /><font color="<?php 
    echo $ks_settings['date_color'];
    ?>
"><?php 
    ks_comment_datetime();
    ?>
</font>
	<?php 
    edit_comment_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />');
    ?>
<br />
	<?php 
    if ($comment->comment_approved == '0') {
        ?>
		<em><font color="red"><?php 
        _e('Your comment is awaiting moderation.', 'ktai_style');
        ?>
</font></em><br />
	<?php 
    }
    comment_text();
}
function ks_comment_content()
{
    global $comment;
    ks_comment_author_link();
    ?>
@ <?php 
    ks_comment_datetime();
    ?>
<br />
	<?php 
    if ($comment->comment_approved == '0') {
        ?>
		<em><font color="red"><?php 
        _e('Your comment is awaiting moderation.', 'ktai_style');
        ?>
</font></em><br />
	<?php 
    }
    comment_text();
    edit_comment_link('<font color="' . $args['edit_color'] . '">' . __('Edit') . '</font>', '[ ', ' ]');
}
    private function confirm($action)
    {
        global $comment;
        $comment_id = intval($_GET['c']);
        $formaction = $action . 'comment';
        $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
        $nonce_action .= $comment_id;
        if (!($comment = get_comment_to_edit($comment_id))) {
            $this->base->ks_die(__('Oops, no comment with this ID.') . sprintf(' <a href="%s">' . __('Go back') . '</a>', 'edit-comments.php'), '', false);
        }
        if (!current_user_can('edit_post', $comment->comment_post_ID)) {
            $this->base->ks_die('delete' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.'));
        }
        include dirname(__FILE__) . '/admin-header.php';
        switch ($action) {
            case 'spam':
                $message = __('You are about to mark the following comment as spam:');
                break;
            case 'trash':
                $message = __('You are about to move the following comment to the Trash:', 'ktai_style');
                break;
            case 'delete':
                $message = __('You are about to delete the following comment:');
                break;
            default:
                $message = __('You are about to approve the following comment:');
                break;
        }
        echo '<p><img localsrc="1" alt="" /><font color="red">' . $message . '</font><br />' . __('Are you sure you want to do this?') . '</p>';
        ?>
<form action="edit-comments.php" method="get">
<?php 
        $this->admin->sid_field();
        ?>
<div><input type="submit" value="<?php 
        _e('No');
        ?>
" /></div></form>
<form action="comment.php" method="get">
<?php 
        $this->admin->sid_field();
        wp_nonce_field($nonce_action);
        ?>
<input type="hidden" name="action" value="<?php 
        echo esc_attr($formaction);
        ?>
" />
<input type="hidden" name="p" value="<?php 
        echo intval($comment->comment_post_ID);
        ?>
" />
<input type="hidden" name="c" value="<?php 
        echo intval($comment->comment_ID);
        ?>
" />
<input type="hidden" name="noredir" value="1" />
<div><input type="submit" value="<?php 
        _e('Yes');
        ?>
" /></div>
</form>
<dl><dt><img localsrc="<?php 
        comment_type(68, 112, 112);
        ?>
" alt="[<?php 
        comment_type(__('Comment', 'ktai_style'), __('Trackback'), __('Pingback'));
        ?>
] " /><?php 
        comment_author();
        ?>
<img localsrc="46" alt=" @ " /><font color="<?php 
        echo ks_option('ks_date_color');
        ?>
"><?php 
        ks_comment_datetime();
        ?>
</font></dt><dd><?php 
        if ($comment->comment_author_email) {
            ?>
<img localsrc="108" alt="" /><font color="olive"><?php 
            comment_author_email();
            ?>
</font><br /><?php 
        }
        if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) {
            ?>
<img localsrc="112" alt="" /><font color="olive"><?php 
            comment_author_url();
            ?>
</font><br /><?php 
        }
        comment_excerpt();
        ?>
</dd></dl><?php 
        include dirname(__FILE__) . '/admin-footer.php';
    }
</div>
			<?php 
            if (empty($post->post_password)) {
                while ($comment = array_shift($target)) {
                    ?>
					<font color="<?php 
                    echo $ks_settings['list_color'];
                    ?>
"><?php 
                    echo count($target) >= 1 ? __('|-', 'ktai_style') : __('+-', 'ktai_style');
                    ?>
</font><a href="<?php 
                    echo esc_url(ks_get_comment_link($comment));
                    ?>
"><?php 
                    ks_comment_datetime();
                    ?>
</a> <img localsrc="<?php 
                    comment_type(68, 112, 112);
                    ?>
" alt="by " /><?php 
                    comment_author();
                    ?>
<br /><?php 
                }
            } else {
                _e("Can't show comments because this post is password protected.", 'ktai_style');
            }
            // post_password
            ?>
</dt><?php 
    private function comment_list_item($_comment)
    {
        global $comment;
        $comment = $_comment;
        $comment_status = wp_get_comment_status($comment->comment_ID);
        if ('unapproved' == $comment_status) {
            $gray_start = '<font color="gray">';
            $gray_end = '</font>';
        } else {
            $gray_start = '';
            $gray_end = '';
        }
        $checkbox = '';
        if (current_user_can('edit_post', $comment->comment_post_ID)) {
            $checkbox = '<input type="checkbox" name="delete_comments[]" value="' . intval($comment->comment_ID) . '" />';
        }
        echo '<dt>';
        printf(_c('%1$s%2$d:%3$s|comment-list-title', 'ktai_style'), $checkbox, $comment->comment_ID, $gray_start . mb_strcut(get_comment_excerpt(), 0, self::COMMENT_EXCERPT_SIZE) . $gray_end);
        echo '</dt><dd>';
        ?>
<img localsrc="46" alt=" @ " /><font color="<?php 
        echo ks_option('ks_date_color');
        ?>
"><?php 
        echo ks_comment_datetime();
        ?>
</font>
<img localsrc="<?php 
        comment_type(68, 112, 112);
        ?>
" alt="[<?php 
        comment_type(__('Comment', 'ktai_style'), __('Trackback'), __('Pingback'));
        ?>
] " /><?php 
        comment_author();
        ?>
<br /><?php 
        if (strlen($author_url_display) > self::COMMENT_AUTHOR_URL_LENGTH) {
            $author_url_display = substr($author_url_display, 0, self::COMMENT_AUTHOR_URL_LENGTH - 1) . '...';
        }
        if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) {
            $author_url_display = $comment->comment_author_url;
            $author_url_display = str_replace('http://www.', '', $author_url_display);
            $author_url_display = str_replace('http://', '', $author_url_display);
            if (strlen($author_url_display) > self::COMMENT_AUTHOR_URL_LENGTH) {
                $author_url_display = substr($author_url_display, 0, self::COMMENT_AUTHOR_URL_LENGTH - 1) . '...';
            }
            ?>
<img localsrc="112" alt="" /><font color="olive"><?php 
            echo esc_html($author_url_display);
            ?>
</font><br /><?php 
        }
        if ($comment->comment_author_email && current_user_can('edit_post', $comment->comment_post_ID)) {
            ?>
<img localsrc="108" alt="" /><font color="olive"><?php 
            comment_author_email();
            ?>
</font><br /><?php 
        }
        if (!$this->post_id && ($title = $this->get_post_title($comment->comment_post_ID))) {
            ?>
<font color="gray" size="-1"><img localsrc="97" /><?php 
            echo $title;
            ?>
</font><br /><?php 
        }
        $app_nonce = esc_html('&_wpnonce=' . wp_create_nonce("approve-comment_{$comment->comment_ID}"));
        $del_nonce = esc_html('&_wpnonce=' . wp_create_nonce("delete-comment_{$comment->comment_ID}"));
        $approve_url = esc_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . $app_nonce);
        $unapprove_url = esc_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . $app_nonce);
        $spam_url = esc_url('comment.php?action=spamcomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . $del_nonce);
        $unspam_url = esc_url('comment.php?action=unspamcomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . $del_nonce);
        $trash_url = esc_url('comment.php?action=trashcomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID . $del_nonce);
        $untrash_url = esc_url('comment.php?action=untrashcomment&c=' . $comment->comment_ID . $del_nonce);
        $delete_url = esc_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID);
        // do not add nonce
        $edit_url = esc_url('comment.php?action=editcomment&c=' . $comment->comment_ID);
        $reply_url = esc_url('comment-reply.php?replytocom=' . $comment->comment_ID);
        $action_template_color = '<a href="%s"><font color="%s">%s</font></a>';
        $action_template = '<a href="%s">%s</a>';
        if (current_user_can('edit_post', $comment->comment_post_ID)) {
            $actions = array();
            if (current_user_can('moderate_comments')) {
                if ('unapproved' == $comment_status || 'moderated' == $comment_status) {
                    $actions['approve'] = sprintf($action_template_color, $approve_url, 'green', __('Approve'));
                    $actions['spam'] = sprintf($action_template_color, $spam_url, 'red', __('Spam'));
                } elseif ('approved' == $_GET['comment_status'] && 'approved' == $comment_status) {
                    $actions['unapprove'] = sprintf($action_template_color, $unapprove_url, '#ff9900', __('Unapprove'));
                } elseif ('spam' == $comment_status) {
                    if (function_exists('wp_trash_comment') && EMPTY_TRASH_DAYS) {
                        $actions['unspam'] = sprintf($action_template_color, $unspam_url, 'orange', __('Restore'));
                        $actions['trash'] = sprintf($action_template_color, $trash_url, 'red', __('Trash'));
                    } else {
                        $actions['approve'] = sprintf($action_template_color, $approve_url, 'green', __('Approve'));
                        $actions['delete'] = sprintf($action_template_color, $delete_url, 'red', __('Delete'));
                    }
                }
            }
            if ('trash' == $comment_status) {
                $actions['restore'] = sprintf($action_template_color, $untrash_url, 'green', __('Restore'));
                $actions['delete'] = sprintf($action_template_color, $delete_url, 'red', __('Delete'));
            } elseif ('spam' != $comment_status) {
                $actions['edit'] = '<img localsrc="104" alt="" />' . sprintf($action_template, $edit_url, __('Edit'));
                if ('approved' == $comment_status && (NULL == $this->post_status || 'published' == $this->post_status)) {
                    $actions['reply'] = '<img localsrc="149" alt="" />' . sprintf($action_template, $reply_url, __('Reply', 'ktai_style'));
                }
            }
            if ($actions) {
                $actions = apply_filters('comment_row_actions', array_filter($actions), $comment);
                echo '[ ' . implode(' | ', $actions) . ' ]';
            }
        }
    }
        public function start_el(&$output, $comment, $depth, $args)
        {
            $depth++;
            $GLOBALS['comment_depth'] = $depth;
            if (!empty($args['callback'])) {
                call_user_func($args['callback'], $comment, $args, $depth);
                return;
            }
            $GLOBALS['comment'] = $comment;
            extract($args, EXTR_SKIP);
            switch ($args['style']) {
                case 'div':
                    $tag = 'div';
                    break;
                case 'ol':
                case 'ul':
                    $tag = 'li';
                    break;
                case 'dl':
                default:
                    $tag = 'dt';
                    break;
            }
            ?>
<<?php 
            echo $tag;
            ?>
><a name="comment-<?php 
            comment_ID();
            ?>
"><?php 
            if (!ks_option('ks_separate_comments')) {
                ?>
<font size="-1" color="<?php 
                echo ks_option('ks_comment_type_color');
                ?>
">[<?php 
                comment_type(__('Comment', 'ktai_style'), __('Trackback'), __('Pingback'));
                ?>
]</font><?php 
            }
            ?>
</a> <img localsrc="<?php 
            comment_type(68, 112, 112);
            ?>
" alt="" /><?php 
            ks_comment_author_link();
            ?>
<img localsrc="46" alt=" @ " /><font color="<?php 
            echo ks_option('ks_date_color');
            ?>
"><?php 
            ks_comment_datetime();
            ?>
</font>
		<?php 
            /* ks_edit_comment_link('color=' . ks_option('ks_edit_color')); */
            edit_comment_link('<font color="' . ks_option('ks_edit_color') . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />');
            ?>
<br />
		<?php 
            if ($comment->comment_approved == '0') {
                ?>
<em><font color="red"><?php 
                _e('Your comment is awaiting moderation.');
                ?>
</font></em><br />
		<?php 
            }
            comment_text();
            comment_reply_link(array_merge(array('before' => '<div>', 'after' => '</div>', 'reply_before' => '', 'reply_text' => '<img localsrc="149" alt="" />' . __('Reply'), 'login_text' => '<img localsrc="120" alt="" />' . __('Log in to Reply')), $args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
        }
    private function show_form($errors = array())
    {
        global $user_ID, $title, $comment, $id;
        $comment = intval($_GET['replytocom']);
        if (!($comment = get_comment($comment))) {
            $this->base->ks_die(__('Oops, no comment with this ID.'));
        }
        $title = __('Comment Reply', 'ktai_style');
        include dirname(__FILE__) . '/admin-header.php';
        $id = $comment->comment_post_ID;
        echo '<h2>' . sprintf(__('Comments for %s', 'ktai_style'), get_the_title($id)) . '</h2>';
        ?>
<img localsrc="<?php 
        comment_type(68, 112, 112);
        ?>
" alt="" /><?php 
        ks_comment_author_link();
        ?>
<img localsrc="46" alt=" @ " /><font color="<?php 
        echo ks_option('ks_date_color');
        ?>
"><?php 
        ks_comment_datetime();
        ?>
</font><br />
	<?php 
        comment_text();
        ?>
	<hr />
	<h3><?php 
        _e('Reply to the above comment', 'ktai_style');
        ?>
</h3>
	<?php 
        if ($errors) {
            ?>
<p><font color="red"><?php 
            echo implode('<br />', array_map('wp_specialchars', $errors));
            ?>
</font></p>
	<?php 
        }
        ?>
<form action="" method="post">
<input type="hidden" name="action" value="post" />
<input type="hidden" name="redirect_to" value="<?php 
        echo esc_attr($this->admin->get_referer());
        ?>
" />
<?php 
        $this->admin->sid_field();
        ks_fix_encoding_form();
        ?>
	<p><?php 
        _e('Comment', 'ktai_style');
        if (ks_option('ks_allow_pictograms')) {
            _e('(Pictograms Available)', 'ktai_style');
        }
        ?>
<br />
	<textarea name="content" cols="100%" rows="4"></textarea><br />
	<a href="<?php 
        echo esc_attr($this->admin->get_referer());
        ?>
"><?php 
        _e('Cancel reply', 'ktai_style');
        ?>
</a><br />
	<input type="submit" name="submit" value="<?php 
        _e('Say It!');
        ?>
" />
	<?php 
        if (function_exists('comment_id_fields')) {
            comment_id_fields($id);
        } else {
            ?>
		<input type="hidden" name="comment_post_ID" value="<?php 
            echo intval($id);
            ?>
" />
	<?php 
        }
        ks_do_comment_form_action();
        ?>
	</p></form>
<?php 
        include dirname(__FILE__) . '/admin-footer.php';
    }