?>
</h2><?php 
    } else {
        ks_pagenum('<div style="' . $ks_settings['pagenum_style'] . '"><h2>', '</h2></div>');
    }
    ?>
	<dl>
	<?php 
    for ($count = 1; have_posts(); $count++) {
        the_post();
        ?>
		<dt><br /><div style="<?php 
        echo $ks_settings['title_style'];
        ?>
"><?php 
        ks_ordered_link(array('count' => $count, 'max' => $max, 'link' => get_permalink(), 'anchor' => '<span style="' . $ks_settings['title_style'] . '">' . get_the_title() . '</span>', 'hide_over_max' => true));
        ?>
</div>
		<?php 
        echo $tree_continued;
        ?>
		<font color="<?php 
        echo $ks_settings['time_color'];
        ?>
"><?php 
        ks_time();
        ?>
</font> <?php 
        ks_comments_link('<img localsrc="811" alt="" />');
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<br />' . $tree_continued . '<img localsrc="104" alt="" />');
        ?>
" />
<input type="submit" value="<?php 
_e('Search');
?>
" />
</div></form>
<dl><dt><?php 
ks_ordered_link($count++, $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=comments', ks_option('ks_separate_comments') ? __('Recent Comments/Pings', 'ktai_style') : __('Recent Comments', 'ktai_style'));
?>
</dt>
<dt><?php 
ks_ordered_link('', $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=months', __('Archives'));
_e(' / ', 'ktai_style');
ks_ordered_link('', $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=cats', __('Categories'));
_e(' / ', 'ktai_style');
ks_ordered_link('', $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=tags', __('Tags'));
?>
</dt>
<?php 
ks_admin_link('<dt><img localsrc="152" alt="" />');
ks_login_link(array('before' => '<dt><img localsrc="120" alt="' . __('&dagger;', 'ktai_style') . '" />', 'before_logout' => '<img localsrc="120" alt="' . __('&dagger;', 'ktai_style') . '" />', 'after' => '</dt>'));
?>
</dl>
<div id="footer" style="background-color:yellow;">
<div align="right"><?php 
$admin_user = ks_get_admin_user();
if ($admin_user) {
    ?>
Copyright <img localsrc="81" /> <?php 
    echo date('Y'), ' ', esc_html($admin_user->display_name);
} else {
<div align="center"><?php 
$title = __('New Posts', 'ktai_style');
$url = ks_blogurl(KTAI_NOT_ECHO);
$ks_settings['need_front'] = false;
if (get_option('show_on_front') == 'page') {
    if ($post_id = get_option('page_for_posts')) {
        $url = get_permalink($post_id);
        $ks_settings['need_front'] = true;
    } else {
        $title = __('Front Page', 'ktai_style');
    }
}
if (ks_is_front()) {
    echo $title;
} else {
    ks_ordered_link(1, 10, $url, $title);
}
?>
 | <?php 
$title = ks_option('ks_separate_comments') ? __('Recent Comments/Pings', 'ktai_style') : __('Recent Comments', 'ktai_style');
if (ks_is_menu('comments')) {
    echo $title;
} else {
    ks_ordered_link(2, 10, ks_blogurl(KTAI_NOT_ECHO) . '?menu=comments', $title);
}
?>
</div>
<hr color="<?php 
echo $ks_settings['hr_color'];
?>
" />
    }
    $sjk_link = 'http://www.sjk.co.jp/c/w.exe?y=' . rawurlencode(preg_replace('|^http://|', '', ks_redir_get('full_url')));
    $google_link = 'http://www.google.com/gwt/n?_gwt_noimg=1&u=' . rawurlencode(preg_replace('|^http://|', '', ks_redir_get('full_url')));
    ?>
</p>
	<p><?php 
    _e('You can translate the PC site to view suitable for mobile using services below.', 'ktai_style');
    ?>
	<br /><?php 
    ks_ordered_link($accesskey++, 10, $sjk_link, __('Tsuukin(commuting)-browser', 'ktai_style'));
    ?>
	<br /><?php 
    ks_ordered_link($accesskey++, 10, $google_link, __('Google Wireless Transcoder', 'ktai_style'));
    if (is_ktai() == 'KDDI' && is_ktai('type') == 'WAP2.0') {
        echo '<br />';
        ks_ordered_link(0, 10, 'device:pcsiteviewer?url=' . esc_url(ks_redir_get('full_url')), __('PC Site Viewer on your phone.', 'ktai_style'));
    } elseif (is_ktai() == 'DoCoMo' && is_ktai('type') == 'FOMA') {
        echo '<br />' . ks_pict_number(0) . sprintf(__('<a %s>Full Browser on your phone.</a>', 'ktai_style'), 'href="' . esc_url(ks_redir_get('full_url')) . '" ifb="' . esc_url(ks_redir_get('full_url')) . '" accesskey="0"');
    }
    ?>
</p>
	<?php 
    if (!ks_redir_get('mobile_url') || ks_redir_get('mobile_url') != ks_redir_get('full_url')) {
        ?>
		<p><?php 
        _e('If you know that the site is suitable for mobile at the same URL, it is good to jump directly.', 'ktai_style');
        ?>
<br />#.<a href="<?php 
        echo esc_url(ks_redir_get('full_url'));
        ?>
"><?php 
</div>
	<?php 
    if (have_posts()) {
        ?>
		<hr />
		<h2><a name="cont"><?php 
        _e('Following posts', 'ktai_style');
        ?>
</a></h2>
		<dl>
		<?php 
        for ($count = $ks_settings['ol_count']; have_posts(); $count++) {
            the_post();
            ?>
			<dt><?php 
            ks_ordered_link($count, $next_accesskey - 1, get_permalink(), get_the_title());
            edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />');
            echo ' ';
            ks_comments_link('<img localsrc="86" alt="[' . __('Comments') . '] " />', '0', '1', '%', '<img localsrc="61" alt="' . __('Comments off', 'ktai_style') . '" />', '<img localsrc="120" alt="?" />');
            ?>
 <img localsrc="46" alt="@ " /><font color="<?php 
            echo $ks_settings['date_color'];
            ?>
"><?php 
            ks_time();
            ?>
</font></dt>
		<?php 
        }
        ?>
		</dl>
<!--start paging-->
<?php 
if (have_posts()) {
    if (is_archive()) {
        $post = $posts[0];
        // Hack. Set $post so that the_date() works.
        ?>
<h2><?php 
        ks_pagenum();
        ?>
</h2><?php 
    }
    for (; have_posts(); $count++) {
        the_post();
        the_date('', '<u>', '</u><br/>');
        ks_ordered_link($count, $max, get_permalink(), get_the_title());
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '(', ')');
        echo ' ';
        ks_comments_link('', '[0]', '[1]', '[%]', '[X]', '[?]');
        ?>
 <font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        the_time('H:i');
        ?>
</font><br />
	<?php 
    }
    ?>
	<div align="center"><?php 
            $comments = ks_get_recent_comments(8, 'comment');
            break;
        case 2:
            $comments = ks_get_recent_comments(8, 'pings');
            break;
    }
    if ($comments) {
        ?>
		<dl>
		<?php 
        for (; $target = array_shift($comments); $ol_count++) {
            $post = array_shift($target);
            $link = ks_get_comments_list_link($post->ID);
            ?>
			<dt><?php 
            ks_ordered_link($ol_count, $ol_max, $link, get_the_title());
            ?>
</dt><?php 
            if (empty($post->post_password)) {
                foreach ($target as $comment) {
                    ?>
					<dd><?php 
                    /*
                    					if (! ks_option('ks_separate_comments')) {
                    						?><font size="-1" color="<?php echo $ks_settings['comment_color']; ?>">[<?php 
                    						comment_type(__('Comment', 'ktai_style'), __('Trackback'), __('Pingback')); ?>]</font> <?php 
                    					} */
                    ?>
<img localsrc="46" alt=" @ " /><a href="<?php 
                    echo esc_url(ks_get_comment_link($comment));
                    ?>
?>
</dt><dt><?php 
ks_ordered_link($count++, $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=months', __('Archives'));
?>
</dt><dt><?php 
ks_ordered_link($count++, $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=cats', __('Categories'));
_e(', ', 'redportal');
?>
<a href="<?php 
ks_blogurl();
?>
?menu=tags"><?php 
_e('Tags');
?>
</a></dt><dt><?php 
ks_ordered_link($count++, $max, ks_blogurl(KTAI_NOT_ECHO) . '?menu=pages', __('Pages'));
?>
</dt><?php 
ks_admin_link('<dt><img localsrc="112" alt="" />', '</dt>');
ks_login_link('<dt><img localsrc="120" alt="' . __('&dagger;', 'ktai_style') . '" />', '</dt>');
?>
</dl>
<hr color="<?php 
echo esc_attr($ks_settings['hr_color']);
?>
" />
<div align="center">Redportal theme for Ktai Style.<?php 
ks_switch_pc_view();
?>
</div>
<?php 
    public function recent_comments_row(&$comment)
    {
        $show_date = true;
        $GLOBALS['comment'] =& $comment;
        $comment_post_title = get_the_title($comment->comment_post_ID);
        $edit_url = sprintf('comment.php?action=editcomment&c=%d', $comment->comment_ID);
        $reply_url = sprintf('comment-reply.php?replytocom=%d', $comment->comment_ID);
        if (!$comment->comment_type || 'comment' == $comment->comment_type) {
            $desc = sprintf(__('From %s on %%link', 'ktai_style'), get_comment_author());
        } else {
            switch ($comment->comment_type) {
                case 'pingback':
                    $type = __('Pingback');
                    break;
                case 'trackback':
                    $type = __('Trackback');
                    break;
                default:
                    $type = ucwords($comment->comment_type);
            }
            $desc = sprintf(__('%s on %%link', 'ktai_style'), wp_specialchars($type));
        }
        ?>
<dt><?php 
        ks_ordered_link($this->accesskey++, 9, NULL, $comment_post_title, $desc);
        ?>
</dt>
<?php 
        if (current_user_can('edit_post', $comment->comment_post_ID)) {
            ?>
<dd>[ <img localsrc="149" alt="" /><a href="<?php 
            echo esc_attr($reply_url);
            ?>
"><?php 
            _e('Reply', 'ktai_style');
            ?>
</a>
 | <img localsrc="104" alt="" /><a href="<?php 
            echo esc_attr($edit_url);
            ?>
"><?php 
            _e('Edit');
            ?>
</a> ]</dd>
<?php 
        }
    }
$menu_items = array();
foreach ($menu as $item) {
    // 0 = name, 1 = capability, 2 = file
    $is_current = strcmp($self, $item[2]) == 0 && empty($parent_file) || $parent_file && $item[2] == $parent_file;
    if (!empty($submenu[$item[2]])) {
        $submenu[$item[2]] = array_values($submenu[$item[2]]);
        // Re-index.
        $m = array('link' => $submenu[$item[2]][0][2], 'desc' => $item[0]);
    } else {
        if (current_user_can($item[1])) {
            $m = array('link' => $item[2], 'desc' => $item[0]);
        }
    }
    if ($is_current) {
        $menu_items[] = $m['desc'];
    } else {
        $menu_items[] = '<a href="' . esc_attr($m['link']) . '">' . $m['desc'] . '</a>';
    }
}
echo implode(' | ', $menu_items);
printf(' [<a href="%s">' . __('Log out') . '</a>]', ks_get_logout_url());
echo '<br />';
if ($Ktai_Style->get('cookie_available')) {
    ks_ordered_link(0, 0, ks_blogurl(KTAI_NOT_ECHO), __('Visit Site with logged in', 'ktai_style'));
} else {
    ?>
<img localsrc="1" alt="!" /><font color="red"><?php 
    _e('DO NOT bookmark this page. DO NOT tell others the URL of this page.', 'ktai_style');
    ?>
</font><br /><?php 
}
global $ks_settings;
if (have_posts()) {
    if (is_archive() || is_search()) {
        $post = $posts[0];
        // Hack. Set $post so that the_date() works.
        ks_pagenum('<h2>', '</h2>');
    }
    ?>
<!--start paging-->
	<dl>
	<?php 
    for ($count = $ks_settings['ol_count']; have_posts(); $count++) {
        the_post();
        ?>
		<dt><?php 
        ks_ordered_link($count, $ks_settings['ol_max'], get_permalink(), get_the_title());
        echo ' ';
        ks_comments_link('<img localsrc="86" alt="[' . __('Comments') . '] " />', '0', '1', '%', '<img localsrc="61" alt="' . __('Comments off', 'ktai_style') . '" />', '<img localsrc="120" alt="?" />');
        ?>
 <img localsrc="46" alt="@ " /><font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        ks_time();
        ?>
</font>
		</dt>
	<?php 
    }
    ?>
	</dl>