Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Dashboard
- */
- get_header(); ?>
- <div class="wrapper">
- <div id="notification"></div>
- <div id="container">
- <div id="content">
- <?php include TEMPLATEPATH . '/assets/breadcrumb.php'; ?>
- <div style="width: 960px;">
- <div style="float: left; width: 200px; padding:5px 10px 5px 5px;">
- <div class="box">
- <div class="box-heading"><span>Common Questions</span></div>
- <div class="box-content">
- <div class="box-category">
- <ul>
- <li><a href="#" title="How To Submit A Deal">How To Submit A Deal</a></li>
- <li><a href="#" title="How To Activate My Account">How To Activate My Account</a></li>
- <li><a href="#" title="How To Edit My Deals">How To Edit My Deals</a></li>
- <li><a href="#" title="Contact Us">Contact Us</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div style="float: left; width: 730px; border-left:1px solid #ddd; padding:5px;">
- <div style="text-align:justify;" id="content">
- <?php $user_id = get_current_user_id(); ?>
- <?php $user_info = get_userdata($user_id); ?>
- <h1><?php echo $current_user->user_firstname; ?>'s Dashboard</h1>
- <div style="width: 700px; margin:0 0 10px 0;">
- <div style="float: left; width: 100px; border-right:1px solid #ddd; padding-right:5px;"><?php echo get_avatar( $user_id, $size = '100', $default = 'http://cdn.sakuhetu.com/imgs/global/No-Pic.jpg' ); ?></div>
- <div style="float: left; width: 575px; padding-left:5px; margin-top:-5px;">
- <strong><?php echo $user_info-> user_firstname; ?></strong>, You have Created
- <strong style="color:#F00;"><?php function countUserPosts($user_id) {$userposts = get_posts('post_status=any&showposts=-1&author='.$user_id); return count($userposts);} echo countUserPosts($user_id); ?></strong> Post(s), since <strong><?php echo date("F j, Y", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?></strong>.
- <br /> Address: <?php echo $user_info-> address; ?>
- <br /> Mobile: <?php echo $user_info-> mobile; ?>
- <br /> Phone: <?php echo $user_info-> phone; ?>
- <br /> <a title="Edit My Profile" href="<?php bloginfo('url'); ?>/edit-my-profile">Edit My Profile</a>
- </div>
- <br style="clear: left;" />
- </div>
- <h1>My Posts</h1>
- <div id="tabs" class="htabs">
- <a href="#published">Published Posts</a>
- <a href="#pending">Pending Reviews</a>
- <a href="#draft">Saved In Draft</a>
- </div>
- <div id="published" class="tab-content">
- <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($paged . '&showposts=10&author='.$user_id.'&paged=$paged&post_status=publish'); ?>
- <?php while (have_posts()) : the_post();?>
- <div class="product-list">
- <div>
- <div class="inner">
- <div style="width: 825px;">
- <div style="float: left; width: 110px;">
- <div class="image">
- <?php
- if ( has_post_thumbnail()) {
- $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
- echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
- the_post_thumbnail('thumbnail');
- echo '</a>';
- } else { ?>
- <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="http://www.ekarnal.com/wp-content/uploads/2013/09/no-img-100x100.jpg" width="100" height="100" alt="No Image Available" /></a>
- <?php }?>
- </div>
- </div>
- <div style="float: left; width: 640px; padding-left:5px;">
- <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
- <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... »</div>
- <div style="margin-top:20px;">
- <?php if ( in_category( '330' )) { ?>
- <a class="hrefbutton" style="background:#f00;" onclick="return false">This Listing Is Expired</a>
- <?php } else { ?>
- <a href="<?php echo wp_nonce_url('edit-the-post?pid='.get_the_ID().''); ?>" class="hrefbutton" style="background:#4692F7;" title="Edit">Edit This Listing</a>
- <?php
- ?>
- <?php $del_url = add_query_arg( array('action' => 'del', 'pid' => $post->ID) ); ?>
- <a onclick="return confirm('Are you sure to delete this post?');" href="<?php echo wp_nonce_url( $del_url, 'wpuf_del' ) ?>" class="hrefbutton" style="background-color:#F00;" title="Delete">Delete</a>
- <?php } ?>
- </div>
- </div>
- <br style="clear: left;" />
- </div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <div style="float:right;"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
- <?php wp_reset_query(); ?></div>
- <div id="pending" class="tab-content">
- <?php query_posts('showposts=-1&author='.$user_id.'&post_status=pending'); ?>
- <?php while (have_posts()) : the_post();?>
- <div class="product-list">
- <div>
- <div class="inner">
- <div style="width: 825px;">
- <div style="float: left; width: 110px;">
- <div class="image">
- <?php
- if ( has_post_thumbnail()) {
- $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
- echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
- the_post_thumbnail('thumbnail');
- echo '</a>';
- } else { ?>
- <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="http://www.ekarnal.com/wp-content/uploads/2013/09/no-img-100x100.jpg" width="100" height="100" alt="No Image Available" /></a>
- <?php }?>
- </div>
- </div>
- <div style="float: left; width: 640px; padding-left:5px;">
- <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
- <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... »</div>
- <div style="margin-top:20px;">
- <a href="<?php echo wp_nonce_url('edit-the-post?pid='.get_the_ID().''); ?>" class="hrefbutton" style="background:#4692F7;" title="Edit">Edit This Listing</a>
- <a onclick="return confirm('Are you sure to delete this post?');" href="<?php echo wp_nonce_url( $del_url, 'wpuf_del' ) ?>" class="hrefbutton" style="background-color:#F00;" title="Delete">Delete</a>
- </div>
- </div>
- <br style="clear: left;" />
- </div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_query(); ?>
- </div>
- <div id="draft" class="tab-content">
- <?php query_posts('showposts=-1&author='.$user_id.'&post_status=draft'); ?>
- <?php while (have_posts()) : the_post();?>
- <div class="product-list">
- <div>
- <div class="inner">
- <div style="width: 825px;">
- <div style="float: left; width: 110px;">
- <div class="image">
- <?php
- if ( has_post_thumbnail()) {
- $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
- echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
- the_post_thumbnail('thumbnail');
- echo '</a>';
- } else { ?>
- <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="http://www.ekarnal.com/wp-content/uploads/2013/09/no-img-100x100.jpg" width="100" height="100" alt="No Image Available" /></a>
- <?php }?>
- </div>
- </div>
- <div style="float: left; width: 640px; padding-left:5px;">
- <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
- <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... »</div>
- <div style="margin-top:20px;">
- <a href="<?php echo wp_nonce_url('edit-the-post?pid='.get_the_ID().''); ?>" class="hrefbutton" style="background:#4692F7;" title="Edit">Edit This Listing</a>
- <a onclick="return confirm('Are you sure to delete this post?');" href="<?php echo wp_nonce_url('my-dashboard?action=del&pid='.get_the_ID().''); ?>" class="hrefbutton" style="background-color:#F00;" title="Delete">Delete</a>
- </div>
- </div>
- <br style="clear: left;" />
- </div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_query(); ?>
- </div>
- </div>
- </div>
- <br style="clear: left;" />
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement