rendered paste body<div id="sidebar">
<h3 class="sidebartitle" >Rapor</h3>
<?php if (function_exists(wp_onlinecounter)) {wp_onlinecounter();} ?>
<ul>
<li id="login">
<?php
global $user_ID, $user_identity;
get_currentuserinfo();
if (!$user_ID):
?>
<h3><?php _e('Login'); ?></h2>
<form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
<div><label><?php _e('Login') ?>:<br /><input type="text" name="log" id="log" value="" size="20" tabindex="7" /></label><br />
<label><?php _e('Password') ?>:<br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="8" /></label><br />
<label><input type="checkbox" name="rememberme" value="forever" tabindex="9" /> <?php _e("Remember me"); ?></label><br />
<input type="submit" name="submit" value="<?php _e('Login'); ?> »" tabindex="10" />
<?php wp_register('', ''); ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/></div>
</form>
<?php
else:
?>
<h2><?php echo $user_identity; ?></h2>
<ul>
<?php wp_register(); ?>
<li><a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a></li>
</ul>
<?php
endif;
?>
</li>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php
global $notfound;
if (is_page() and ($notfound != '1')) {
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
// if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) {
?>
<li>
<h3 class="sidebartitle"><?php echo $parent_title; ?> <?php _e('Subpages'); ?></h3>
<ul class="list-page">
<?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
</ul>
</li>
<?php } } ?>
<li>
<h3 class="sidebartitle"><?php _e('Katagoriler'); ?></h3>
<ul class="list-cat"> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
</li>
<li>
<h3 class="sidebartitle" >Son Eklenenler</h3>
<?php query_posts('showposts=10'); ?>
<ul class="list-rec">
<?php while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a><br />
</li>
<?php endwhile;?>
</ul>
</li>
<?php if (function_exists('get_recent_comments')) { ?>
<li><h3><?php _e('Son Yorumlar:'); ?></h3>
<ul>
<?php get_recent_comments(); ?>
</ul>
</li>
<?php } ?>
<li>
<h3 class="sidebartitle"><?php _e('Nostalji'); ?></h3>
<ul class="list-archives">
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;' style="width: 220px;" >
<option value=""><?php echo attribute_escape(__('Select Month')); ?></option>
<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>
<li>
<h3 class="sidebartitle"><?php _e('Links'); ?></h3>
<ul class="list-blogroll">
<?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?>
</ul>
</li>
<li>
<h3 class="sidebartitle"><?php _e('Giris / Kayit'); ?></h3>
<ul class="list-meta">
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>
<li>
<h3 class="sidebartitle" >Beslemeler</h3>
<ul class="list-rss">
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication"> Yazilar RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
</ul>
</li>
<h3 class="sidebartitle" >KalemKurusu</h3>
<a href="http://www.kalemkurusu.com/uyelik" title="UYEMIZ OL"><img border="0" width="66" src="http://www.kalemkurusu.com/resimler/6.png" alt="UYE OL" height="66" /></a><a href="http://www.kalemkurusu.com/yazi-gonder" title="Yazılarını Bize Gönderirmisin"><img border="0" width="66" src="http://www.kalemkurusu.com/resimler/5.png" alt="YAZILARINI GONDER" height="66" /></a><a href="http://www.kalemkurusu.com/terminal" title="DESTEK VER"><img border="0" width="66" src="http://www.kalemkurusu.com/resimler/9.png" alt="DESTEK VER" height="66" /></a>
<img border="0" width="267" src="http://www.kalemkurusu.com/resimler/kkurusu.jpg" alt="kalemkurusu" height="400" />
<img border="0" width="200" src="http://www.kalemkurusu.com/resimler/resimler.jpg" alt="Kalemkurusu Resimler" height="200" />
<li>
<h3 class="sidebartitle" >Arama</h3>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
<?php endif; ?>
</ul>
</div>
<!--/sidebar -->