daily pastebin goal
32%
SHARE
TWEET

dashboard

a guest Sep 15th, 2013 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Template Name: Dashboard
  4. */
  5.  
  6. get_header(); ?>
  7.  
  8. <div class="wrapper">
  9. <div id="notification"></div>
  10. <div id="container">
  11.  
  12. <div id="content">
  13.  
  14. <?php include TEMPLATEPATH . '/assets/breadcrumb.php'; ?>
  15.  
  16.  
  17. <div style="width: 960px;">
  18.  
  19. <div style="float: left; width: 200px; padding:5px 10px 5px 5px;">
  20.  <div class="box">
  21.   <div class="box-heading"><span>Common Questions</span></div>
  22.   <div class="box-content">
  23.   <div class="box-category">
  24.     <ul>
  25.         <li><a href="#" title="How To Submit A Deal">How To Submit A Deal</a></li>
  26.         <li><a href="#" title="How To Activate My Account">How To Activate My Account</a></li>
  27.         <li><a href="#" title="How To Edit My Deals">How To Edit My Deals</a></li>
  28.         <li><a href="#" title="Contact Us">Contact Us</a></li>
  29.     </ul>
  30.     </div>
  31.   </div>
  32. </div>
  33. </div>
  34.  
  35. <div style="float: left; width: 730px; border-left:1px solid #ddd;  padding:5px;">
  36. <div style="text-align:justify;" id="content">
  37.  
  38. <?php $user_id = get_current_user_id(); ?>
  39. <?php $user_info = get_userdata($user_id); ?>
  40.  
  41. <h1><?php echo $current_user->user_firstname; ?>'s Dashboard</h1>
  42.  
  43. <div style="width: 700px; margin:0 0 10px 0;">
  44. <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>
  45.  
  46. <div style="float: left; width: 575px; padding-left:5px; margin-top:-5px;">
  47. <strong><?php echo $user_info-> user_firstname; ?></strong>, You have Created
  48. <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>.
  49. <br /> Address: <?php echo $user_info-> address; ?>
  50. <br /> Mobile: <?php echo $user_info-> mobile; ?>
  51. <br /> Phone: <?php echo $user_info-> phone; ?>
  52. <br /> <a title="Edit My Profile" href="<?php bloginfo('url'); ?>/edit-my-profile">Edit My Profile</a>
  53. </div>
  54. <br style="clear: left;" />
  55. </div>
  56.  
  57. <h1>My Posts</h1>
  58.  
  59. <div id="tabs" class="htabs">
  60. <a href="#published">Published Posts</a>
  61. <a href="#pending">Pending Reviews</a>
  62. <a href="#draft">Saved In Draft</a>
  63. </div>
  64.  
  65. <div id="published" class="tab-content">
  66. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($paged . '&showposts=10&author='.$user_id.'&paged=$paged&post_status=publish'); ?>
  67. <?php while (have_posts()) : the_post();?>
  68.  
  69. <div class="product-list">
  70.  
  71. <div>
  72. <div class="inner">
  73.    
  74. <div style="width: 825px;">
  75. <div style="float: left; width: 110px;">
  76. <div class="image">
  77. <?php
  78. if ( has_post_thumbnail()) {
  79. $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
  80. echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
  81. the_post_thumbnail('thumbnail');
  82. echo '</a>';
  83. } else { ?>
  84. <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>
  85. <?php }?>
  86. </div>
  87. </div>
  88.  
  89. <div style="float: left; width: 640px; padding-left:5px;">
  90. <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
  91. <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... &raquo;</div>
  92. <div style="margin-top:20px;">
  93.  
  94. <?php if ( in_category( '330' )) { ?>
  95. <a class="hrefbutton" style="background:#f00;" onclick="return false">This Listing Is Expired</a>
  96. <?php } else { ?>
  97. <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>
  98. <?php
  99. ?>
  100. <?php $del_url = add_query_arg( array('action' => 'del', 'pid' => $post->ID) ); ?>
  101. <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>
  102. <?php } ?>
  103.  
  104. </div>
  105.  
  106. </div>
  107.  
  108. <br style="clear: left;" />
  109. </div>
  110.  
  111. </div>
  112. </div>
  113. </div>
  114. <?php endwhile; ?>
  115. <div style="float:right;"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
  116. <?php wp_reset_query(); ?></div>
  117.    
  118. <div id="pending" class="tab-content">
  119.  
  120. <?php query_posts('showposts=-1&author='.$user_id.'&post_status=pending'); ?>
  121. <?php while (have_posts()) : the_post();?>
  122.  
  123. <div class="product-list">
  124.  
  125. <div>
  126. <div class="inner">
  127.    
  128. <div style="width: 825px;">
  129. <div style="float: left; width: 110px;">
  130. <div class="image">
  131. <?php
  132. if ( has_post_thumbnail()) {
  133. $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
  134. echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
  135. the_post_thumbnail('thumbnail');
  136. echo '</a>';
  137. } else { ?>
  138. <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>
  139. <?php }?>
  140. </div>
  141. </div>
  142.  
  143. <div style="float: left; width: 640px; padding-left:5px;">
  144. <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
  145. <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... &raquo;</div>
  146. <div style="margin-top:20px;">
  147.  
  148. <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>
  149. <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>
  150.  
  151. </div>
  152.  
  153. </div>
  154.  
  155. <br style="clear: left;" />
  156. </div>
  157.  
  158. </div>
  159. </div>
  160. </div>
  161. <?php endwhile; ?>
  162. <?php wp_reset_query(); ?>
  163. </div>
  164.  
  165. <div id="draft" class="tab-content">
  166.  
  167. <?php query_posts('showposts=-1&author='.$user_id.'&post_status=draft'); ?>
  168. <?php while (have_posts()) : the_post();?>
  169.  
  170. <div class="product-list">
  171.  
  172. <div>
  173. <div class="inner">
  174.    
  175. <div style="width: 825px;">
  176. <div style="float: left; width: 110px;">
  177. <div class="image">
  178. <?php
  179. if ( has_post_thumbnail()) {
  180. $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
  181. echo '<a href="'.get_permalink().'" title="'.get_the_title(). '" >';
  182. the_post_thumbnail('thumbnail');
  183. echo '</a>';
  184. } else { ?>
  185. <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>
  186. <?php }?>
  187. </div>
  188. </div>
  189.  
  190. <div style="float: left; width: 640px; padding-left:5px;">
  191. <div class="name" style="margin-bottom:-1px; text-transform:capitalize;"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
  192. <div style="border-bottom:1px solid #ddd; padding-bottom:5px; width:615px; text-transform:capitalize;"><?php trimcont(95); ?> ... &raquo;</div>
  193. <div style="margin-top:20px;">
  194.  
  195. <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>
  196. <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>
  197.  
  198. </div>
  199.  
  200. </div>
  201.  
  202. <br style="clear: left;" />
  203. </div>
  204.  
  205. </div>
  206. </div>
  207. </div>
  208. <?php endwhile; ?>
  209. <?php wp_reset_query(); ?>
  210. </div>
  211.  
  212. </div>
  213. </div>
  214.  
  215. <br style="clear: left;" />
  216. </div>
  217.  
  218. <div class="clear"></div>
  219.  
  220. </div>
  221. </div>
  222.  
  223. <?php get_footer(); ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top