<?php if (is_user_logged_in() ) {?>
<?php global $current_user;
      get_currentuserinfo();
?>

<div class="usersarea2">
<div class="login-ul" style="direction:rtl;">
  <ul>
    <li class="us1"><a > اهلاً بعودتك يا : <?php echo  $current_user->user_login ?> </a></li>
    <li class="us3"><a href="<?php echo home_url()."/?author=". $current_user->ID ; ?>"> الملف الشخصي </a></li>
    <li class="us7"><a >عدد مواضيعك :
      <?php  $userpc = $current_user->ID; echo  count_user_posts($userpc); ?>
      </a></li>
    <li class="us5"><a  href="<?php $profileedit =$sa_settings['profile_edit']; $profile_pages= get_page_link($profileedit); echo $profile_pages;  ?>">تعديل بروفايلك</a></li>
    <li class="us6"><a href="<?php echo wp_logout_url(); ?>">تسجيل خروج </a></li>
  </ul>
</div>
<?php global $user_ID; if( $user_ID ) : ?>
<?php if( current_user_can('level_10') ) : ?>
<ul>
  <li><a href="<?php echo get_bloginfo('url'); ?>/wp-admin">دخول لوحة النحكم</a></li>
</ul>
<?php else : ?>
<?php endif; ?>
<?php endif; ?>
</div>

<?php } else { ?>

<!--/Widget-->
<div class="Widget">

  <!--/top-->
  <div class="Widget_center">
    <div class="Widget_content">
      <div id="login-kit">
<form action="<?php bloginfo('url') ?>/wp-login.php" method="post" id="login_form">

    <span class="line-login"><i class="line-login-icon"></i>
    <input  class="login_text" type="text" id="log" name="log" value="" />
    </span> <span class="line-login"><i class="line-login-icon2"></i>
    <input class="login_password" type="password"  name="pwd" id="pwd" size="22" />
    </span> <span class="line-login2" >
    <input type="submit" name="submit" value="دخول" class="login_button" />
      <input name="rememberme" style="margin: 8px 5px 0px 0px;" id="rememberme" type="checkbox" checked="checked" value="forever" />
      <label for="rememberme" style="cursor:pointer;">تذكرنى</label>
      <ul>
    <li><a href="<?php bloginfo('url') ?>/wp-register.php">تسجيل</a></li>
    <li><a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">استعادة كلمة السر</a></li>
    </span>
    </ul>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
  </form>
</div>
    </div>
    <div class="Widget_bottom">
      <div class="Widget_bottom_right"></div>
      <div class="Widget_bottom_left"></div>
    </div>
  </div>
  <!--content-->
  <!--/bottom-->
</div>
<!--/Widget-->


<?php }?>

