?> </a></p> </li> <?php $has_created = projectTheme_get_total_number_of_created_Projects($post->post_author); $has_closed = projectTheme_get_total_number_of_closed_Projects($post->post_author); $has_rated = projectTheme_get_total_number_of_rated_Projects($post->post_author); ?> <li> <h3><?php _e("Feedback", 'ProjectTheme'); ?> :</h3> <p id='my_stars_rating_done'><?php echo ProjectTheme_project_get_star_rating($post->post_author); ?> </p> </li> <li> <a href="<?php echo ProjectTheme_get_user_feedback_link($post->post_author); ?> "><?php _e('View User Feedback', 'ProjectTheme'); ?> </a> </li> <li> <h3><?php
function projectTheme_get_post_pay_function($arr = '') { $ending = get_post_meta(get_the_ID(), 'ending', true); $sec = $ending - current_time('timestamp', 0); $location = get_post_meta(get_the_ID(), 'Location', true); $closed = get_post_meta(get_the_ID(), 'closed', true); $featured = get_post_meta(get_the_ID(), 'featured', true); $post = get_post(get_the_ID()); $hide_project_p = get_post_meta(get_the_ID(), 'private_bids', true); global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $bid = projectTheme_get_winner_bid(get_the_ID()); $bid_wn = ProjectTheme_get_show_price($bid->bid); $winner = get_post_meta(get_the_ID(), 'winner', true); $winner = get_userdata($winner); $winner = '<a href="' . ProjectTheme_get_user_profile_link($winner->ID) . '">' . $winner->user_login . '</a>'; $winner = sprintf(__("WInner: %s", 'ProjectTheme'), $winner); $tm_d = get_post_meta(get_the_ID(), 'expected_delivery', true); $delivery_on = sprintf(__('Delivery On: %s', 'ProjectTheme'), date_i18n('d-M-Y g:iA', $tm_d)); $auth = get_userdata($post->post_author); $posted = get_the_time("jS F Y"); ?> <div class="post" id="post-<?php the_ID(); ?> "><div class="padd10"> <div class="post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <?php if ($featured == "1") { echo '<span class="featured_thing_project2">' . __('Featured Project', 'ProjectTheme') . '</span>'; } if ($hide_project_p == "1" or $hide_project_p == "yes") { echo '<span class="private_thing_project2">' . __('Sealed Bidding', 'ProjectTheme') . '</span>'; } ?> </div> <div class="post-main-details"> <ul> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/wallet_icon2.png" alt="project budget" width="16" height="16" /></p> <h4><?php echo sprintf(__('Winning Bid: %s', 'ProjectTheme'), $bid_wn); ?> </h4> </li> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/prop_icon.png" alt="project proposals" width="16" height="16" /></p> <h4><?php echo $winner; ?> </h4> </li> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/cal_icon.png" alt="project calendar" width="16" height="16" /></p> <h4><?php echo $posted; ?> </h4> </li> <li class="last"> <p><img src="<?php bloginfo('template_url'); ?> /images/clock_icon.png" alt="project clock" width="16" height="16" /></p> <h4><?php echo $delivery_on; ?> </h4> </li> </ul> </div> <!-- end post-main-details --> <div class="excerpt-thing"> <?php $projecttheme_escrow_was_made_for_project_not_released = projecttheme_escrow_was_made_for_project_not_released(get_the_ID()); if ($projecttheme_escrow_was_made_for_project_not_released == false) { $projectTheme_project_function_filter_adv = true; $projectTheme_project_function_filter_adv = apply_filters('projectTheme_project_function_filter_adv', get_the_ID()); if ($projectTheme_project_function_filter_adv == true) { $adaptive_done = get_post_meta(get_the_ID(), 'adaptive_done', true); if ($adaptive_done == "started") { ?> <a href="<?php echo get_bloginfo('siteurl'); ?> /?complete_paypal_escrow=<?php the_ID(); ?> " class="green_btn"><?php echo __("Complete PayPal Escrow Payment", "ProjectTheme"); ?> </a> <?php } else { $ProjectTheme_enable_credits_wallet = get_option('ProjectTheme_enable_credits_wallet'); if ($ProjectTheme_enable_credits_wallet == "yes") { ?> <a href="<?php echo ProjectTheme_get_pay4project_page_url(get_the_ID()); ?> " class="green_btn"><?php echo __("Pay This", "ProjectTheme"); ?> </a> <?php } } } else { do_action('projectTheme_project_function_filter_1_action', get_the_ID()); } } else { ?> <?php $kk = ProjectTheme_get_payments_page_url_redir(''); echo sprintf(__('Escrow was made. <a href="%s" class="green_btn">Go and release it.</a>', 'ProjectTheme'), $kk); ?> <?php } ?> </div> <!-- end excerpt-thing --> <div class="user-poster-thing"> <div class="user-avatar-me"> <img src="<?php echo ProjectTheme_get_avatar($post->post_author, 25, 25); ?> " alt="avatar-user" class="acc_m1" width="25" height="25" /> </div> <div class="user-avatar-me fun-time"> <div class="post-main-details"> <ul> <li><a class="avatar-posted-by-username" href="<?php echo ProjectTheme_get_user_profile_link($post->post_author); ?> "><?php echo $auth->user_login; ?> </a></li> <li><?php echo ProjectTheme_project_get_star_rating($post->post_author); ?> </li> <li class="last"><a href="<?php echo ProjectTheme_get_user_feedback_link($post->post_author); ?> "><?php _e('View User Feedback', 'ProjectTheme'); ?> </a></li> </ul> </div> </div> </div> <!-- end user-poster-thing --> </div></div> <?php }
function projectTheme_get_post_pay_function($arr = '') { $ending = get_post_meta(get_the_ID(), 'ending', true); $sec = $ending - current_time('timestamp', 0); $location = get_post_meta(get_the_ID(), 'Location', true); $closed = get_post_meta(get_the_ID(), 'closed', true); $featured = get_post_meta(get_the_ID(), 'featured', true); $post = get_post(get_the_ID()); $hide_project_p = get_post_meta(get_the_ID(), 'private_bids', true); global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $bid = projectTheme_get_winner_bid(get_the_ID()); $bid_wn = ProjectTheme_get_show_price($bid->bid); $winner = get_post_meta(get_the_ID(), 'winner', false); foreach ($winner as &$one) { $one = get_userdata($one); $one = '<a href="' . ProjectTheme_get_user_profile_link($one->ID) . '">' . $one->user_login . '</a>'; } if (count($winner) > 1) { $winner = sprintf(__("Winners: %s", 'ProjectTheme'), implode(', ', $winner)); } else { $winner = sprintf(__("Winner: %s", 'ProjectTheme'), implode(', ', $winner)); } $tm_d = get_post_meta(get_the_ID(), 'expected_delivery', true); $delivery_on = sprintf(__('Delivery On: %s', 'ProjectTheme'), date_i18n('d-M-Y g:iA', $tm_d)); $auth = get_userdata($post->post_author); $posted = get_the_time("jS F Y"); $users_with_escrow_made = array(); $awaiting_users = Bid::get_by_pid_uid($post->ID, $uid = '', $single = false, $filters = array("winner='1'", "paid='0'", "outstanding='0'", "delivered='1'")); foreach ($awaiting_users as &$one) { $escrow = Escrow::get_by_field('bid', $one->id); $one = get_userdata($one->uid); if (isset($escrow) && $escrow->released == 0) { $users_with_escrow_made[] = '<a href="' . ProjectTheme_get_user_profile_link($one->ID) . '">' . $one->user_login . '</a>'; } $one = '<a href="' . ProjectTheme_get_user_profile_link($one->ID) . '">' . $one->user_login . '</a>'; } $users_wait_for_escrow = array_values(array_diff($awaiting_users, $users_with_escrow_made)); ?> <div class="post" id="post-<?php the_ID(); ?> "><div class="padd10"> <div class="post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <?php if ($featured == "1") { echo '<span class="featured_thing_project2">' . __('Featured Project', 'ProjectTheme') . '</span>'; } if ($hide_project_p == "1" or $hide_project_p == "yes") { echo '<span class="private_thing_project2">' . __('Sealed Bidding', 'ProjectTheme') . '</span>'; } ?> </div> <div class="post-main-details"> <ul> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/wallet_icon2.png" alt="project budget" width="16" height="16" /></p> <h4><?php echo sprintf(__('Winning Bid: %s', 'ProjectTheme'), $bid_wn); ?> </h4> </li> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/prop_icon.png" alt="project proposals" width="16" height="16" /></p> <h4><?php echo $winner; ?> </h4> </li> <li> <p><img src="<?php bloginfo('template_url'); ?> /images/cal_icon.png" alt="project calendar" width="16" height="16" /></p> <h4><?php echo $posted; ?> </h4> </li> <li class="last"> <p><img src="<?php bloginfo('template_url'); ?> /images/clock_icon.png" alt="project clock" width="16" height="16" /></p> <h4><?php echo $delivery_on; ?> </h4> </li> </ul> </div> <!-- end post-main-details --> <div class="excerpt-thing"> <?php $projecttheme_escrow_was_made_for_project_not_released = projecttheme_escrow_was_made_for_project_not_released(get_the_ID()); // if($projecttheme_escrow_was_made_for_project_not_released == false): $projectTheme_project_function_filter_adv = true; $projectTheme_project_function_filter_adv = apply_filters('projectTheme_project_function_filter_adv', get_the_ID()); if ($projectTheme_project_function_filter_adv == true) { $adaptive_done = get_post_meta(get_the_ID(), 'adaptive_done', true); if ($adaptive_done == "started") { ?> <a href="<?php echo get_bloginfo('siteurl'); ?> /?complete_paypal_escrow=<?php the_ID(); ?> " class="green_btn"><?php echo __("Complete PayPal Escrow Payment", "ProjectTheme"); ?> </a> <?php } else { $ProjectTheme_enable_credits_wallet = get_option('ProjectTheme_enable_credits_wallet'); if ($ProjectTheme_enable_credits_wallet == "yes") { ?> <!-- <a href="<?php echo ProjectTheme_get_pay4project_page_url(get_the_ID()); ?> " class="green_btn"><?php echo __("Pay This", "ProjectTheme"); ?> </a> --> <?php if (count($users_wait_for_escrow) > 0) { ?> <div > <span><?php echo sprintf(__('Next users are waiting their payments: %s ', 'ProjectTheme'), implode(', ', $users_wait_for_escrow)); ?> </span> <a href="<?php echo ProjectTheme_get_payments_page_url_redir('escrow'); ?> " class="post_bid_btn"><?php _e('Make Escrow', 'ProjectTheme'); ?> </a> </div> <?php } ?> <br/> <?php } } } else { do_action('projectTheme_project_function_filter_1_action', get_the_ID()); } ?> <?php // else: ?> <?php if (!empty($users_with_escrow_made)) { $kk = ProjectTheme_get_payments_page_url_redir(''); echo sprintf(__('Escrow was made for next users: %s ', 'ProjectTheme'), implode(', ', $users_with_escrow_made)); ?> <a href="<?php echo $kk; ?> " class="green_btn"><?php _e('Go and release it.', 'ProjectTheme'); ?> </a> <?php } ?> <?php // endif; ?> </div> <!-- end excerpt-thing --> <div class="user-poster-thing"> <div class="user-avatar-me"> <img src="<?php echo ProjectTheme_get_avatar($post->post_author, 25, 25); ?> " alt="avatar-user" class="acc_m1" width="25" height="25" /> </div> <div class="user-avatar-me fun-time"> <div class="post-main-details"> <ul> <li><a class="avatar-posted-by-username" href="<?php bloginfo('siteurl'); ?> /?p_action=user_profile&post_author=<?php echo $post->post_author; ?> "><?php echo $auth->user_login; ?> </a></li> <li><?php echo ProjectTheme_project_get_star_rating($post->post_author); ?> </li> <li class="last"><a href="<?php echo ProjectTheme_get_user_feedback_link($post->post_author); ?> "><?php _e('View User Feedback', 'ProjectTheme'); ?> </a></li> </ul> </div> </div> </div> <!-- end user-poster-thing --> </div></div> <?php }
function ProjectTheme_display_provider_search_page_disp() { ?> <div id="content" > <div class="my_box3"> <div class="padd10"> <div class="box_title"><?php _e("Service Provider Search", "ProjectTheme"); ?> </div> <div class="box_content"> <?php $ProjectTheme_enable_2_user_tp = get_option('ProjectTheme_enable_2_user_tp'); $pg = $_GET['pg']; if (empty($pg)) { $pg = 1; } $nrRes = 15; //------------------ $offset = ($pg - 1) * $nrRes; //------------------ if (isset($_GET['username'])) { $args['search'] = "*" . trim($_GET['username']) . "*"; } // prepare arguments $args['orderby'] = 'display_name'; $arr_aray = array(); if (!empty($_GET['rating_over'])) { $arr_sbg = array('key' => 'cool_user_rating', 'value' => $_GET['rating_over'], 'compare' => '>'); array_push($arr_aray, $arr_sbg); } if ($ProjectTheme_enable_2_user_tp == "yes") { $arr_sbg = array('key' => 'user_tp', 'value' => 'service_provider', 'compare' => '='); array_push($arr_aray, $arr_sbg); } //----------------------------------------------- $args['meta_query'] = $arr_aray; $args['number'] = $nrRes; $args['offset'] = $offset; $args['count_total'] = true; //----------------------------------------------- $wp_user_query = new WP_User_Query($args); // Get the results $ttl = $wp_user_query->total_users; $nrPages = ceil($ttl / $nrRes); $authors = $wp_user_query->get_results(); // Check for results if (!empty($authors)) { echo '<table width="100%">'; // loop trough each author echo '<tr>'; echo '<td><strong>' . __('Username', 'ProjectTheme') . '</strong></td>'; echo '<td><strong>' . __('User Rating', 'ProjectTheme') . '</strong></td>'; echo '<td><strong>' . __('Options', 'ProjectTheme') . '</strong></td>'; echo '</tr>'; foreach ($authors as $author) { // get all the user's data $author_info = get_userdata($author->ID); echo '<tr>'; echo '<td><a href="' . ProjectTheme_get_user_profile_link($author->ID) . '">' . $author_info->user_login . '<a/></td>'; echo '<td>' . ProjectTheme_project_get_star_rating($author->ID) . '</td>'; echo '<td><a href="' . ProjectTheme_get_priv_mess_page_url('send', '', '&uid=' . $author_info->ID) . '">' . __('Contact Provider', 'ProjectTheme') . '</a></td>'; echo '</tr>'; } echo '</table>'; echo '<div class="div_class_div">'; $totalPages = $nrPages; $my_page = $pg; $page = $pg; $batch = 10; $nrpostsPage = $nrRes; $end = $batch * $nrpostsPage; if ($end > $pagess) { $end = $pagess; } $start = $end - $nrpostsPage + 1; if ($start < 1) { $start = 1; } $links = ''; $raport = ceil($my_page / $batch) - 1; if ($raport < 0) { $raport = 0; } $start = $raport * $batch + 1; $end = $start + $batch - 1; $end_me = $end + 1; $start_me = $start - 1; if ($end > $totalPages) { $end = $totalPages; } if ($end_me > $totalPages) { $end_me = $totalPages; } if ($start_me <= 0) { $start_me = 1; } $previous_pg = $page - 1; if ($previous_pg <= 0) { $previous_pg = 1; } $next_pg = $pages_curent + 1; if ($next_pg > $totalPages) { $next_pg = 1; } if ($my_page > 1) { echo '<a href="' . projectTheme_provider_search_link() . 'pg=' . $previous_pg . '" class="bighi"><< ' . __('Previous', 'ProjectTheme') . '</a>'; echo '<a href="' . projectTheme_provider_search_link() . 'pg=' . $start_me . '" class="bighi"><<</a>'; } for ($i = $start; $i <= $end; $i++) { if ($i == $pg) { echo '<a href="#" class="bighi" id="activees">' . $i . '</a>'; } else { echo '<a href="' . projectTheme_provider_search_link() . 'pg=' . $i . '" class="bighi">' . $i . '</a>'; } } if ($totalPages > $my_page) { echo '<a href="' . projectTheme_provider_search_link() . 'pg=' . $end_me . '" class="bighi">>></a>'; } if ($page < $totalPages) { echo '<a href="' . projectTheme_provider_search_link() . 'pg=' . $next_pg . '" class="bighi">' . __('Next', 'ProjectTheme') . ' >></a>'; } echo '</div>'; } else { echo 'No authors found'; } ?> </div> </div> </div> </div> <!-- ############## --> <div id="right-sidebar"> <ul class="xoxo"> <li class=""> <h3 class="widget-title"><?php _e('Filter Options', 'ProjectTheme'); ?> </h3> <form method="get"> <table width="100%"> <tr> <td><?php _e('Username Like', 'ProjectTheme'); ?> </td> <td><input type="text" size="20" value="<?php echo $_GET['username']; ?> " name="username" /></td> </tr> <tr> <td><?php _e('Rating Over', 'ProjectTheme'); ?> </td> <td><input type="text" size="10" value="<?php echo $_GET['rating_over']; ?> " name="rating_over" /> [0-5]</td> </tr> <tr> <td></td> <td><input type="submit" value="<?php _e('Search', 'ProjectTheme'); ?> " name="search_provider" /></td> </tr> </table> </form> <div class="clear10"></div> </li> <?php dynamic_sidebar('other-page-area'); ?> </ul> </div> <?php }