当前位置: 首页>>代码示例>>PHP>>正文


PHP projectTheme_get_winner_bid函数代码示例

本文整理汇总了PHP中projectTheme_get_winner_bid函数的典型用法代码示例。如果您正苦于以下问题:PHP projectTheme_get_winner_bid函数的具体用法?PHP projectTheme_get_winner_bid怎么用?PHP projectTheme_get_winner_bid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了projectTheme_get_winner_bid函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __

 $query = "select * from " . $wpdb->prefix . "project_ratings where touser='{$uid}' AND awarded='1' order by id desc limit 5";
 $r = $wpdb->get_results($query);
 if (count($r) > 0) {
     echo '<table width="100%">';
     echo '<tr>';
     echo '<th>&nbsp;</th>';
     echo '<th><b>' . __('Project Title', 'ProjectTheme') . '</b></th>';
     echo '<th><b>' . __('From User', 'ProjectTheme') . '</b></th>';
     echo '<th><b>' . __('Aquired on', 'ProjectTheme') . '</b></th>';
     echo '<th><b>' . __('Price', 'ProjectTheme') . '</b></th>';
     echo '<th><b>' . __('Rating', 'ProjectTheme') . '</b></th>';
     echo '</tr>';
     foreach ($r as $row) {
         $post = $row->pid;
         $post = get_post($post);
         $bid = projectTheme_get_winner_bid($row->pid);
         $user = get_userdata($row->fromuser);
         echo '<tr>';
         echo '<th><img class="img_class" src="' . ProjectTheme_get_first_post_image($row->pid, 42, 42) . '" 
                             alt="' . $post->post_title . '" width="42" /></th>';
         echo '<th><a href="' . get_permalink($row->pid) . '">' . $post->post_title . '</a></th>';
         echo '<th><a href="' . ProjectTheme_get_user_profile_link($user->user_login) . '">' . $user->user_login . '</a></th>';
         echo '<th>' . date('d-M-Y H:i:s', get_post_meta($row->pid, 'closed_date', true)) . '</th>';
         echo '<th>' . projectTheme_get_show_price($bid->bid) . '</th>';
         echo '<th>' . ProjectTheme_get_project_stars(floor($row->grade / 2)) . ' (' . floor($row->grade / 2) . '/5)</th>';
         echo '</tr>';
         echo '<tr>';
         echo '<th></th>';
         echo '<th colspan="5"><b>' . __('Comment', 'ProjectTheme') . ':</b> ' . $row->comment . '</th>';
         echo '</tr>';
         echo '<tr><th colspan="6"><hr color="#eee" /></th></tr>';
开发者ID:simplix-fr,项目名称:o-g,代码行数:31,代码来源:user-profile.php

示例2: ProjectTheme_my_account_payments_area_function

function ProjectTheme_my_account_payments_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>

<div id="content" class="account-main-area">

            
            <?php 
    $pg = $_GET['pg'];
    if (!isset($pg)) {
        $pg = 'home';
    }
    global $wpdb;
    if ($_GET['pg'] == 'closewithdrawal') {
        $id = $_GET['id'];
        $s = "select * from " . $wpdb->prefix . "project_withdraw where id='{$id}' AND uid='{$uid}'";
        $r = $wpdb->get_results($s);
        if (count($r) == 1) {
            $row = $r[0];
            $amount = $row->amount;
            $cr = projectTheme_get_credits($uid);
            projectTheme_update_credits($uid, $cr + $amount);
            $s = "delete from " . $wpdb->prefix . "project_withdraw where id='{$id}' AND uid='{$uid}'";
            $wpdb->query($s);
            echo '<div class="">';
            echo sprintf(__('Request canceled! <a href="%s">Return to payments</a>.', 'ProjectTheme'), get_permalink(get_option('ProjectTheme_my_account_payments_id')));
            echo '</div>';
        }
    }
    if ($_GET['pg'] == 'releasepayment') {
        $id = $_GET['id'];
        $s = "select * from " . $wpdb->prefix . "project_escrow where id='{$id}' AND fromid='{$uid}'";
        $r = $wpdb->get_results($s);
        if (count($r) == 1 and $r[0]->released != 1) {
            $row = $r[0];
            $amount = $row->amount;
            $toid = $row->toid;
            $pid = $row->pid;
            $my_pst = get_post($pid);
            $projectTheme_get_winner_bid = projectTheme_get_winner_bid($pid);
            ProjectTheme_send_email_when_on_completed_project($pid, $projectTheme_get_winner_bid->uid, $projectTheme_get_winner_bid->bid);
            //-------------------------------------------------------------------------------
            $projectTheme_fee_after_paid = get_option('projectTheme_fee_after_paid');
            if (!empty($projectTheme_fee_after_paid)) {
                $deducted = $amount * ($projectTheme_fee_after_paid * 0.01);
            } else {
                $deducted = 0;
            }
            //-------------------------------------------------------------------------------
            $cr = projectTheme_get_credits($toid);
            projectTheme_update_credits($toid, $cr + $amount - $deducted);
            $reason = sprintf(__('Escrow payment received from %s for the project <b>%s</b>', 'ProjectTheme'), $current_user->user_login, $my_pst->post_title);
            projectTheme_add_history_log('1', $reason, $amount, $toid, $uid);
            if ($deducted > 0) {
                $reason = sprintf(__('Payment fee for project %s', 'ProjectTheme'), $my_pst->post_title);
            }
            projectTheme_add_history_log('0', $reason, $deducted, $toid);
            //-----------------------------
            $email = get_bloginfo('admin_email');
            $site_name = get_bloginfo('name');
            $usr = get_userdata($uid);
            $subject = __("Money Escrow Completed", 'ProjectTheme');
            $message = sprintf(__("You have released the escrow of: %s", "ProjectTheme"), ProjectTheme_get_show_price($amount));
            //($usr->user_email, $subject , $message);
            //-----------------------------
            $usr = get_userdata($toid);
            $reason = sprintf(__('Escrow Payment completed, sent to %s for project <b>%s</b>', 'ProjectTheme'), $usr->user_login, $my_pst->post_title);
            projectTheme_add_history_log('0', $reason, $amount, $uid, $toid);
            $subject = __("Money Escrow Completed", "ProjectTheme");
            $message = sprintf(__("You have received the amount of: %s", "ProjectTheme"), ProjectTheme_get_show_price($amount));
            //($usr->user_email, $subject , $message);
            //-----------------------------
            $tm = current_time('timestamp', 0);
            update_post_meta($pid, 'paid_user', '1');
            update_post_meta($pid, 'paid_user_date', current_time('timestamp', 0));
            $s = "update " . $wpdb->prefix . "project_escrow set released='1', releasedate='{$tm}' where id='{$id}'";
            $r = $wpdb->query($s);
        }
        echo __('Escrow completed! Redirecting...', 'ProjectTheme');
        echo '<br/><br/>';
        $url_redir = ProjectTheme_get_payments_page_url();
        echo '<meta http-equiv="refresh" content="2;url=' . $url_redir . '" />';
    }
    do_action('ProjectTheme_before_payments_in_payments');
    $ProjectTheme_enable_credits_wallet = get_option('ProjectTheme_enable_credits_wallet');
    if ($ProjectTheme_enable_credits_wallet != 'no') {
        if ($pg == 'home') {
            ?>
            
            
            
            <div class="my_box3">
            
            
            	<div class="box_title"><?php 
            _e("Finances", "ProjectTheme");
            ?>
//.........这里部分代码省略.........
开发者ID:roberto95117,项目名称:auction,代码行数:101,代码来源:payments.php

示例3: get_currentuserinfo

<?php

global $wp_query, $wpdb;
$pid = $wp_query->query_vars['pid'];
global $current_user, $wpdb;
get_currentuserinfo();
$uid = $current_user->ID;
$bid = projectTheme_get_winner_bid($pid);
$total = $bid->bid;
$projectplugin_signature = get_option('project_theme_signature');
$projectplugin_apipass = get_option('project_theme_apipass');
$projectplugin_apiuser = get_option('project_theme_apiuser');
$projectplugin_appid = get_option('project_theme_appid');
$signature = $projectplugin_signature;
$api_pass = $projectplugin_apipass;
$api_user = $projectplugin_apiuser;
$apiid = $projectplugin_appid;
//------------------------------------------------------------------------
$pmnt_id = time() . $pid;
$ret = get_bloginfo('siteurl') . "/?return_chained=" . $pmnt_id;
$receiver_user_id = $bid->uid;
$fee = get_option('projectTheme_fee_after_paid');
if (empty($fee)) {
    die('ERROR. Please specify an amount for the percent taken by admin for each project.');
}
//-------------------------------------------------------------------------
$adminfee = $total * ($fee * 0.01);
$receiver1 = get_option('ProjectTheme_paypal_email');
if (empty($receiver1)) {
    die('ERROR. The site admin has no paypal email defined.');
}
开发者ID:vicpril,项目名称:ProjectTheme,代码行数:31,代码来源:adaptive-paypal-project.php

示例4: projectTheme_orders

function projectTheme_orders()
{
    global $menu_admin_project_theme_bull;
    echo '<div class="wrap">';
    echo '<div class="icon32" id="icon-options-general-orders"><br/></div>';
    echo '<h2 class="my_title_class_sitemile">ProjectTheme Orders</h2>';
    if (isset($_GET['mark_delivered'])) {
        $tm = current_time('timestamp', 0);
        $pid = $_GET['mark_delivered'];
        update_post_meta($pid, 'mark_coder_delivered', "1");
        update_post_meta($pid, 'mark_coder_delivered_date', $tm);
        $winner_bd = projectTheme_get_winner_bid($pid);
        //------------------------------------------------------------------------------
        ProjectTheme_send_email_on_delivered_project_to_bidder($pid, $winner_bd->uid);
        ProjectTheme_send_email_on_delivered_project_to_owner($pid);
        echo '<div class="saved_thing">Marked Delivered!</div>';
    }
    if (isset($_GET['mark_completed'])) {
        $tm = current_time('timestamp', 0);
        $pid = $_GET['mark_completed'];
        $pstpst = get_post($pid);
        update_post_meta($pid, 'mark_seller_accepted', "1");
        update_post_meta($pid, 'mark_seller_accepted_date', $tm);
        update_post_meta($pid, 'outstanding', "0");
        update_post_meta($pid, 'delivered', "1");
        //update_post_meta($pid, 'paid_user',		"1");
        //------------------------------------------------------------------------------
        ProjectTheme_send_email_on_completed_project_to_bidder($pid, $pstpst->post_author);
        ProjectTheme_send_email_on_completed_project_to_owner($pid);
        echo '<div class="saved_thing">Marked Completed!</div>';
    }
    if (isset($_GET['mark_paid'])) {
        $tm = current_time('timestamp', 0);
        $pid = $_GET['mark_paid'];
        update_post_meta($pid, 'paid_user_date', $tm);
        update_post_meta($pid, 'paid_user', "1");
        echo '<div class="saved_thing">Marked Paid!</div>';
    }
    ?>
    
        <div id="usual2" class="usual"> 
  <ul> 
    <li><a href="#tabs1">Open Orders</a></li> 
    <li><a href="#tabs2">Delivered Orders</a></li>
    <li><a href="#tabs3">Completed Orders</a></li>
    <li><a href="#tabs4">Paid Orders</a></li>
    <!-- <li><a href="#tabs4">Failed &amp; Disputed Orders</a></li> -->
    <?php 
    do_action('ProjectTheme_main_menu_orders_tabs');
    ?>
  </ul> 
  <div id="tabs1" style="display: none; ">
    	<?php 
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 25;
    $outstanding = array('key' => 'outstanding', 'value' => "1", 'compare' => '=');
    $winner = array('key' => 'winner', 'value' => 0, 'compare' => '!=');
    $delivered2 = array('key' => 'delivered', 'value' => "1", 'compare' => '!=');
    $mark_coder_delivered = array('key' => 'mark_coder_delivered', 'value' => "1", 'compare' => '!=');
    $pj = $_GET['pj1'];
    if (empty($_GET['pj1'])) {
        $pj = 1;
    }
    $args = array('post_type' => 'project', 'order' => 'DESC', 'posts_per_page' => $post_per_page, 'paged' => $pj, 'meta_query' => array($outstanding, $winner, $delivered2, $mark_coder_delivered));
    add_filter('posts_join', 'projectTheme_posts_join_0');
    add_filter('posts_orderby', 'projectTheme_posts_orderby_0');
    query_posts($args);
    if (have_posts()) {
        echo '<table class="widefat post fixed">';
        echo '<thead>';
        echo '<th>Project Title</th>';
        echo '<th>Project Creator</th>';
        echo '<th>Bidder</th>';
        echo '<th>Winning Bid</th>';
        echo '<th>Date Ordered</th>';
        echo '<th>Expected Delivery</th>';
        echo '<th>Options</th>';
        echo '</thead>';
        while (have_posts()) {
            the_post();
            $bid = projectTheme_get_winner_bid(get_the_ID());
            $bidsa = $bid;
            $bid = ProjectTheme_get_show_price($bid->bid);
            $post = get_post(get_the_ID());
            $creator = get_userdata($post->post_author);
            $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>';
            $creator = '<a href="' . ProjectTheme_get_user_profile_link($post->post_author) . '">' . $creator->user_login . '</a>';
            $tm_d = get_post_meta(get_the_ID(), 'expected_delivery', true);
            $tm_d = date_i18n('d-M-Y H:i:s', $tm_d);
            $closed_date = get_post_meta(get_the_ID(), 'closed_date', true);
            $winner_date = date_i18n('d-M-Y H:i:s', $closed_date);
            echo '</tr>';
            echo '<th><a href="' . get_permalink(get_the_ID()) . '">' . get_the_title() . '</a></th>';
            echo '<th>' . $creator . '</th>';
//.........这里部分代码省略.........
开发者ID:simplix-fr,项目名称:o-g,代码行数:101,代码来源:admin_menu.php

示例5: ProjectTheme_send_email_on_win_to_bidder

function ProjectTheme_send_email_on_win_to_bidder($pid, $winner_uid)
{
    $enable = get_option('ProjectTheme_won_project_winner_email_enable');
    $subject = get_option('ProjectTheme_won_project_winner_email_subject');
    $message = get_option('ProjectTheme_won_project_winner_email_message');
    if ($enable != "no") {
        $post = get_post($pid);
        $post_title = ProjectTheme_get_project_link($pid, true, true);
        $user = get_userdata($winner_uid);
        $site_login_url = ProjectTheme_login_url();
        $site_name = get_bloginfo('name');
        $account_url = get_permalink(get_option('ProjectTheme_my_account_page_id'));
        $messenger_link = $account_url . 'private-messages/';
        $projectTheme_get_winner_bid = projectTheme_get_winner_bid($pid);
        $usrnm = get_userdata($winner_uid);
        $winner_bid_username = $usrnm->user_login;
        $winner_bid_value = projecttheme_get_show_price($projectTheme_get_winner_bid->bid);
        $find = array('##username##', '##username_email##', '##site_login_url##', '##your_site_name##', '##your_site_url##', '##my_account_url##', '##messenger_link##', '##project_name##', '##project_title##', '##project_link##', '##winner_bid_value##');
        $replace = array($user->user_login, $user->user_email, $site_login_url, $site_name, get_bloginfo('siteurl'), $account_url, $messenger_link, $post->post_title, $post_title, get_permalink($pid), $winner_bid_value);
        $tag = 'ProjectTheme_send_email_on_win_to_bidder';
        $find = apply_filters($tag . '_find', $find);
        $replace = apply_filters($tag . '_replace', $replace);
        $message = ProjectTheme_replace_stuff_for_me($find, $replace, $message);
        $subject = ProjectTheme_replace_stuff_for_me($find, $replace, $subject);
        //--------------------------------------
        ProjectTheme_send_email($user->user_email, $subject, $message, false);
    }
}
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:28,代码来源:functions.php

示例6: ProjectTheme_my_account_payments_area_function

function ProjectTheme_my_account_payments_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>

<div id="content" class="account-main-area">

            
            <?php 
    $pg = $_GET['pg'];
    if (!isset($pg)) {
        $pg = 'home';
    }
    global $wpdb;
    if ($_GET['pg'] == 'closewithdrawal') {
        $id = $_GET['id'];
        $s = "select * from " . $wpdb->prefix . "project_withdraw where id='{$id}' AND uid='{$uid}'";
        $r = $wpdb->get_results($s);
        if (count($r) == 1) {
            $row = $r[0];
            $amount = $row->amount;
            $cr = projectTheme_get_credits($uid);
            projectTheme_update_credits($uid, $cr + $amount);
            $s = "delete from " . $wpdb->prefix . "project_withdraw where id='{$id}' AND uid='{$uid}'";
            $wpdb->query($s);
            echo '<div class="">';
            echo sprintf(__('Request canceled! <a href="%s">Return to payments</a>.', 'ProjectTheme'), get_permalink(get_option('ProjectTheme_my_account_payments_id')));
            echo '</div>';
        }
    }
    if ($_GET['pg'] == 'releasepayment') {
        $id = $_GET['id'];
        $escrow = Escrow::get_by_field('id', $id);
        $bid = Bid::get_by_id($escrow->bid);
        $s = "select * from " . $wpdb->prefix . "project_escrow where id='{$id}' AND fromid='{$uid}'";
        $r = $wpdb->get_results($s);
        if (count($r) == 1 and $r[0]->released != 1) {
            $row = $r[0];
            $amount = $row->amount;
            $toid = $row->toid;
            $pid = $row->pid;
            $my_pst = get_post($pid);
            $projectTheme_get_winner_bid = projectTheme_get_winner_bid($pid);
            ProjectTheme_send_email_when_on_completed_project($pid, $projectTheme_get_winner_bid->uid, $projectTheme_get_winner_bid->bid);
            //-------------------------------------------------------------------------------
            $projectTheme_fee_after_paid = get_option('projectTheme_fee_after_paid');
            if (!empty($projectTheme_fee_after_paid)) {
                $deducted = $amount * ($projectTheme_fee_after_paid * 0.01);
            } else {
                $deducted = 0;
            }
            //-------------------------------------------------------------------------------
            $cr = projectTheme_get_credits($toid);
            projectTheme_update_credits($toid, $cr + $amount - $deducted);
            $reason = sprintf(__('Escrow payment received from <a href="%s">%s</a> for the project <a href="%s">%s</a>', 'ProjectTheme'), ProjectTheme_get_user_profile_link($current_user->ID), $current_user->user_login, get_permalink($my_pst->ID), $my_pst->post_title);
            projectTheme_add_history_log('1', $reason, $amount, $toid, $uid);
            if ($deducted > 0) {
                $reason = sprintf(__('Payment fee for project <a href="%s">%s</a>', 'ProjectTheme'), get_permalink($my_pst->ID), $my_pst->post_title);
            }
            projectTheme_add_history_log('0', $reason, $deducted, $toid);
            //-----------------------------
            $email = get_bloginfo('admin_email');
            $site_name = get_bloginfo('name');
            $usr = get_userdata($uid);
            $usr2 = get_userdata($toid);
            $subject = __("Money Escrow Completed", 'ProjectTheme');
            //$message = sprintf(__("You have released the escrow of: %s","ProjectTheme"), ProjectTheme_get_show_price($amount));
            //$message = sprintf(__('Escrow Payment completed, sent %s to <a href="%s">%s</a> for project <a href="%s">%s</a>','ProjectTheme'), $amount, ProjectTheme_get_user_profile_link($usr2->ID), $usr2->user_login, get_permalink($my_pst->ID), $my_pst->post_title);
            $message = sprintf(__('Escrow Payment completed, sent %s to %s for %s', 'ProjectTheme'), $amount, $usr2->user_login, $my_pst->post_title);
            ProjectTheme_send_email($usr->user_email, $subject, $message);
            //($usr->user_email, $subject , $message);
            //-----------------------------
            //$usr = get_userdata($toid);
            $reason = sprintf(__('Escrow Payment completed, sent to <a href="%s">%s</a> for project <a href="%s">%s</a>', 'ProjectTheme'), ProjectTheme_get_user_profile_link($usr2->ID), $usr2->user_login, get_permalink($my_pst->ID), $my_pst->post_title);
            projectTheme_add_history_log('0', $reason, $amount, $uid, $toid);
            $subject = __("Money Escrow Completed", "ProjectTheme");
            //$message = sprintf(__("You have received the amount of: %s","ProjectTheme"), ProjectTheme_get_show_price($amount));
            //$message = sprintf(__('Escrow Payment received $ %s, from <a href="%s">%s</a> for project <a href="%s">%s</a>','ProjectTheme'), $amount, ProjectTheme_get_user_profile_link($usr->ID), $usr->user_login, get_permalink($my_pst->ID), $my_pst->post_title);
            $message = sprintf(__('Escrow Payment received $ %s, from %s for project %s', 'ProjectTheme'), $amount, $usr->user_login, $my_pst->post_title);
            ProjectTheme_send_email($usr2->user_email, $subject, $message);
            //($usr->user_email, $subject , $message);
            //-----------------------------
            /*
             * Update bid and project meta
             */
            $tm = current_time('timestamp', 0);
            if (!empty($bid)) {
                Bid::update_meta_by_id($bid->id, 'paid', "1");
                Bid::update_meta_by_id($bid->id, 'paid_user_date', $tm);
                Project::update_postmeta($bid->pid, 'paid_user');
            } else {
                // for old projects
                update_post_meta($pid, 'paid_user', '1');
                update_post_meta($pid, 'paid_user_date', current_time('timestamp', 0));
            }
            $s = "update " . $wpdb->prefix . "project_escrow set released='1', releasedate='{$tm}' where id='{$id}'";
            $r = $wpdb->query($s);
        }
//.........这里部分代码省略.........
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:101,代码来源:payments.php

示例7: ProjectTheme_my_account_feedbacks_area_function

function ProjectTheme_my_account_feedbacks_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
  <div id="content" class="account-main-area">
	
	 <div class="box_title"><?php 
    _e("Reviews I need to award", 'ProjectTheme');
    ?>
</div>
	 <div class="my_box3">
                <div class="box_content">    
				
              	<?php 
    global $wpdb;
    $query = "select * from " . $wpdb->prefix . "project_ratings where fromuser='{$uid}' AND awarded='0'";
    $r = $wpdb->get_results($query);
    if (count($r) > 0) {
        echo '<table class="table">';
        echo '<tr>';
        echo '<th>&nbsp;</th>';
        echo '<th><b>' . __('Project Title', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('To User', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('Aquired on', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('Price', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('Options', 'ProjectTheme') . '</b></th>';
        echo '</tr>';
        foreach ($r as $row) {
            $post = $row->pid;
            $post = get_post($post);
            $bid = projectTheme_get_winner_bid($row->pid);
            $user = get_userdata($row->touser);
            $dmt2 = get_post_meta($row->pid, 'closed_date', true);
            if (!empty($dmt2)) {
                $dmt = date_i18n('d-M-Y H:i:s', $dmt2);
            }
            echo '<tr>';
            echo '<th><img class="img_class" width="42" height="42" src="' . ProjectTheme_get_first_post_image($row->pid, 42, 42) . '" 
                                alt="' . $post->post_title . '" /></th>';
            echo '<th><a href="' . get_permalink($row->pid) . '">' . $post->post_title . '</a></th>';
            echo '<th><a href="' . ProjectTheme_get_user_profile_link($user->ID) . '">' . $user->user_login . '</a></th>';
            echo '<th>' . $dmt . '</th>';
            echo '<th>' . projectTheme_get_show_price($bid->bid) . '</th>';
            echo '<th><a href="' . get_bloginfo('siteurl') . '/?p_action=rate_user&rid=' . $row->id . '">' . __('Rate User', 'ProjectTheme') . '</a></th>';
            echo '</tr>';
        }
        echo '</table>';
    } else {
        _e("There are no reviews to be awarded.", "ProjectTheme");
    }
    ?>
                
                
           </div>
           </div>    
           
           <!-- ##### -->
           <div class="clear10"></div>
           
           
           
           <div class="box_title"><?php 
    _e("Reviews I am waiting ", 'ProjectTheme');
    ?>
</div>
           
           <div class="my_box3"> 
                <div class="box_content">    
				
              	<?php 
    global $wpdb;
    $query = "select * from " . $wpdb->prefix . "project_ratings where touser='{$uid}' AND awarded='0'";
    $r = $wpdb->get_results($query);
    if (count($r) > 0) {
        echo '<table class="table">';
        echo '<tr>';
        echo '<th>&nbsp;</th>';
        echo '<th><b>' . __('Project Title', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('From User', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('Aquired on', 'ProjectTheme') . '</b></th>';
        echo '<th><b>' . __('Price', 'ProjectTheme') . '</b></th>';
        //echo '<th><b>'.__('Options','ProjectTheme').'</b></th>';
        echo '</tr>';
        foreach ($r as $row) {
            $post = $row->pid;
            $post = get_post($post);
            $bid = projectTheme_get_winner_bid($row->pid);
            $user = get_userdata($row->fromuser);
            $dmt2 = get_post_meta($row->pid, 'closed_date', true);
            if (!empty($dmt2)) {
                $dmt = date_i18n('d-M-Y H:i:s', $dmt2);
            }
            echo '<tr>';
            echo '<th><img class="img_class" width="42" height="42"  src="' . ProjectTheme_get_first_post_image($row->pid, 42, 42) . '" 
                                alt="' . $post->post_title . '" /></th>';
            echo '<th><a href="' . get_permalink($row->pid) . '">' . $post->post_title . '</a></th>';
            echo '<th><a href="' . ProjectTheme_get_user_profile_link($user->ID) . '">' . $user->user_login . '</a></th>';
            echo '<th>' . $dmt . '</th>';
//.........这里部分代码省略.........
开发者ID:simplix-fr,项目名称:o-g,代码行数:101,代码来源:feedbacks.php

示例8: ProjectTheme_my_account_pay4project_area_function

function ProjectTheme_my_account_pay4project_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    $pid = $wp_query->query_vars['pid'];
    $post = get_post($pid);
    ?>
    	<div id="content">
        	
            <div class="my_box3 ">
            	<div class="padd10">
            
            	<div class="box_title"><?php 
    echo sprintf(__("Pay for project - %s", "ProjectTheme"), $post->post_title);
    ?>
</div>
                <div class="box_content"> 
            	
                

                
                <div class="post no_border_btm" id="post-<?php 
    the_ID();
    ?>
">
                <div class="padd10">
                <div class="image_holder">
                <a href="<?php 
    echo get_permalink($pid);
    ?>
"><img width="45" height="35" class="image_class" 
                src="<?php 
    echo ProjectTheme_get_first_post_image($pid, 45, 35);
    ?>
" /></a>
                </div>
                <div  class="title_holder" > 
                     <h2><a href="<?php 
    the_permalink();
    ?>
" rel="bookmark" title="Permanent Link to <?php 
    echo $post->post_title;
    ?>
">
                        <?php 
    echo $post->post_title;
    ?>
</a></h2>
      			</div>
                
                <div class="details_holder">
             <?php 
    $bid = projectTheme_get_winner_bid($pid);
    echo __('You are about to pay for this project. Use the accepted methods below to pay for it.', 'ProjectTheme');
    ?>
                <b><?php 
    echo sprintf(__('The price for the project is: %s', 'ProjectTheme'), projectTheme_get_show_price($bid->bid));
    ?>
</b>
                <br/><br/>
                
                <a href="<?php 
    bloginfo('siteurl');
    ?>
/?p_action=pay_for_project_paypal&pid=<?php 
    echo $pid;
    ?>
"><img 
                src="<?php 
    echo get_bloginfo('template_url');
    ?>
/images/paypal.jpg" border="0" /></a><br/><br/>
                
                <?php 
    do_action('ProjectTheme_pay_for_actual_project_payment_options', $pid);
    ?>
                
                <?php 
    $show_cr = true;
    $show_cr = apply_filters('ProjectTheme_show_cr_filter', $show_cr);
    if ($show_cr == true) {
        ?>
                <a class="post_bid_btn" href="<?php 
        echo ProjectTheme_get_pay_with_credits_page_url($pid);
        ?>
"><?php 
        echo __('Pay by credits', 'ProjectTheme');
        ?>
</a>
                <?php 
    }
    ?>
                </div>
                
                </div>
                </div>
      

                
//.........这里部分代码省略.........
开发者ID:juliosd,项目名称:legacy-master,代码行数:101,代码来源:pay_for_project.php

示例9: projectTheme_get_post_awaiting_compl_function_old


//.........这里部分代码省略.........
								<h3><?php 
    echo __("Budget", 'ProjectTheme');
    ?>
:</h3>

								<p><?php 
    $sel = get_post_meta(get_the_ID(), 'budgets', true);
    echo ProjectTheme_get_budget_name_string_fromID($sel);
    ?>

                                

                                </p>

							</li>

                            

                            

                            <li>

								<img src="<?php 
    echo get_bloginfo('template_url');
    ?>
/images/price.png" width="15" height="15" /> 

								<h3><?php 
    echo __("Winning Bid", 'ProjectTheme');
    ?>
:</h3>

								<p><?php 
    $bid = projectTheme_get_winner_bid(get_the_ID());
    echo ProjectTheme_get_show_price($bid->bid);
    ?>

                                

                                </p>

							</li>

					

             				

                            <li>

								<img src="<?php 
    echo get_bloginfo('template_url');
    ?>
/images/location.png" width="15" height="15" /> 

								<h3><?php 
    echo __("Winner", 'ProjectTheme');
    ?>
:</h3>

								<p><?php 
    $winner = get_post_meta(get_the_ID(), 'winner', true);
    $winner = get_userdata($winner);
    echo '<a href="' . ProjectTheme_get_user_profile_link($winner->ID) . '">' . $winner->user_login . '</a>';
    ?>
</p>
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:66,代码来源:deleted-code.php

示例10: ProjectTheme_my_account_pay_with_credits_area_function

function ProjectTheme_my_account_pay_with_credits_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    $pid = $_GET['pid'];
    $post_ar = get_post($pid);
    ?>
    	
        
        <div id="content" class="account-main-area">      
        
        	<div class="my_box3 border_bottom_0">
            	
            
            	<div class="box_title"><?php 
    _e("Pay with virtual currency", 'ProjectTheme');
    ?>
</div>
                <div class="box_content">    
				
                
           
           <div class="post no_border_btm" id="post-<?php 
    the_ID();
    ?>
">
                
                <div class="image_holder">
                <a href="<?php 
    echo get_permalink($pid);
    ?>
"><img width="45" height="45" class="image_class" 
                src="<?php 
    echo ProjectTheme_get_first_post_image($pid, 45, 45);
    ?>
" /></a>
                </div>
                <div  class="title_holder" > 
                     <h2><a href="<?php 
    echo get_permalink($pid);
    ?>
" rel="bookmark" title="Permanent Link to <?php 
    echo $post_ar->post_title;
    ?>
">
                        <?php 
    echo $post_ar->post_title;
    ?>
</a></h2>
      			</div>
                <?php 
    if (isset($_GET['pay'])) {
        echo '<div class="details_holder sk_sk_class">';
        $post_ar = get_post($pid);
        $cr = projectTheme_get_credits($uid);
        $bid = projectTheme_get_winner_bid($pid);
        $amount = $bid->bid;
        if ($cr < $amount) {
            echo '<div class="error2">';
            echo __('You do not have enough credits to pay for this project.', 'ProjectTheme');
            echo '</div><div class="clear10 flt_lft"></div>';
            ?>
                            
							<div class="tripp">
							<a class="post_bid_btn" href="<?php 
            echo ProjectTheme_get_payments_page_url('deposit');
            ?>
"><?php 
            echo __('Add More Credits', 'ProjectTheme');
            ?>
</a>
							</div>
                    
							<?php 
        } else {
            projectTheme_send_email_to_project_payer($pid, $uid, $bid->uid, $amount, '1');
            echo __('Your payment has been sent.', 'ProjectTheme');
        }
        echo '</div>';
        ?>
           
                
                <?php 
    } else {
        ?>
                <div class="details_holder sk_sk_class mm11">  
           
                <b>
                 <?php 
        echo __('The price for the project is', 'ProjectTheme');
        ?>
: <?php 
        $bid = projectTheme_get_winner_bid($pid);
        echo projectTheme_get_show_price($bid->bid);
        ?>
</b>
                <br/><br/>
                
               <?php 
//.........这里部分代码省略.........
开发者ID:simplix-fr,项目名称:o-g,代码行数:101,代码来源:pay_with_credits.php

示例11: add_filter

    exit;
}
//-----------
add_filter('sitemile_before_footer', 'projectTheme_my_account_before_footer');
function projectTheme_my_account_before_footer()
{
    echo '<div class="clear10"></div>';
}
//----------
global $wpdb, $wp_rewrite, $wp_query, $current_user;
$pid = $wp_query->query_vars['pid'];
get_currentuserinfo();
$uid = $current_user->ID;
$post_pr = get_post($pid);
//---------------------------
$winner_bd = projectTheme_get_winner_bid($pid, $single = false);
foreach ($winner_bd as $key => $bidd) {
    if ($bidd->uid == $uid) {
        // get current bid
        $bol = true;
        $bid = $bidd;
        break;
    } else {
        $bol = false;
    }
}
if (!$bol) {
    wp_redirect(get_bloginfo('siteurl'));
    exit;
}
//if($uid != $winner_bd->uid) { wp_redirect(get_bloginfo('siteurl')); exit; }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:31,代码来源:mark_delivered.php

示例12: add_filter

}
//-----------
add_filter('sitemile_before_footer', 'projectTheme_my_account_before_footer');
function projectTheme_my_account_before_footer()
{
    echo '<div class="clear10"></div>';
}
//----------
global $wpdb, $wp_rewrite, $wp_query, $current_user;
$pid = $wp_query->query_vars['pid'];
get_currentuserinfo();
$uid = $current_user->ID;
$post_pr = get_post($pid);
//---------------------------
$ar = 1;
$winner_bd = projectTheme_get_winner_bid($pid, $ar);
foreach ($winner_bd as $key => $bidd) {
    if ($bidd->uid == $uid) {
        $bol = true;
        break;
    } else {
        $bol = false;
    }
}
if (!$bol) {
    wp_redirect(get_bloginfo('siteurl'));
    exit;
}
//if($uid != $winner_bd->uid) { wp_redirect(get_bloginfo('siteurl')); exit; }
//---------------------------
if (isset($_POST['yes'])) {
开发者ID:vicpril,项目名称:wp_bidqa,代码行数:31,代码来源:mark_delivered.php

示例13: ProjectTheme_my_account_disputes_area_function

function ProjectTheme_my_account_disputes_area_function()
{
    $no_comment_admin = 0;
    $no_comment = 0;
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    if ($_POST) {
        if ($_POST['disp_id']) {
            $disp_id = $_POST['disp_id'];
            $closedon = current_time('timestamp', 0);
            $admin_comment = trim($_POST['admin_comment']);
            if (!$admin_comment) {
                $no_comment_admin = 1;
            } else {
                $no_comment_admin = 0;
                $winner = $_POST['winner'];
                if (!$winner) {
                    $s = "update " . $wpdb->prefix . "project_disputes SET `solution`=1, `closedon`={$closedon}, `admin_comment`='{$admin_comment}' WHERE `id`={$disp_id}";
                    $wpdb->query($s);
                } else {
                    $s = "update " . $wpdb->prefix . "project_disputes SET `solution`=1, `winner`={$winner}, `closedon`={$closedon}, `admin_comment`='{$admin_comment}' WHERE `id`={$disp_id}";
                    $wpdb->query($s);
                }
            }
        } else {
            $initiator = $_POST['initiator'];
            $datemade = current_time('timestamp', 0);
            $comment = trim($_POST['comment']);
            $pid_defendant = explode('/', $_POST['defendant']);
            $pid = $pid_defendant[0];
            $defendant = $pid_defendant[1];
            if ($comment) {
                $no_comment = 0;
                $s = "insert into " . $wpdb->prefix . "project_disputes (initiator,pid,datemade,solution,winner,closedon,comment,defendant,admin_comment)\n                    values('{$initiator}','{$pid}','{$datemade}',0,0,0,'{$comment}','{$defendant}','')";
                if ($wpdb->query($s)) {
                    $created_success = 1;
                } else {
                    $created_success = 0;
                }
            } else {
                $no_comment = 1;
            }
        }
    }
    ?>
<div id="content" class="account-main-area">
            <?php 
    if ($created_success) {
        echo '<div class="saved_thing">Dispute created.</div>';
    }
    ?>
            <?php 
    if ($no_comment) {
        echo '<div class="errrs">You cannot leave the dispute comment blank!</div>';
    }
    ?>
            
            <?php 
    if ($no_comment_admin) {
        echo '<div class="errrs">You cannot leave the Comment for closing dispute blank!</div>';
    }
    ?>

            
            
        <div class="my_box3">
            <div class="padd10">
        
            <div class="box_title"><?php 
    _e("Create Dispute", "ProjectTheme");
    ?>
</div>
            <div class="box_content"> 
            <?php 
    if (ProjectTheme_is_user_business($uid)) {
        //                    $querystr = "
        //                                    SELECT distinct wposts.*
        //                                    FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
        //                                    WHERE wposts.post_author='$uid'
        //                                    AND  wposts.ID = wpostmeta.post_id
        //                                    AND wpostmeta.meta_key = 'closed'
        //                                    AND wpostmeta.meta_value = '0'
        //                                    AND wposts.post_status = 'publish'
        //                                    AND wposts.post_type = 'project'
        //                                    ORDER BY wposts.post_date DESC";
        $querystr = "\n                                    SELECT distinct wposts.* \n                                    FROM {$wpdb->posts} wposts, {$wpdb->postmeta} wpostmeta \n                                    WHERE wposts.post_author='{$uid}' \n                                    AND  wposts.ID = wpostmeta.post_id \n                                    AND wposts.post_status = 'publish' \n                                    AND wposts.post_type = 'project'\n                                    ORDER BY wposts.post_date DESC";
        $r = $wpdb->get_results($querystr);
        foreach ($r as $row) {
            $pid = $row->ID;
            $ar = 1;
            $bids = projectTheme_get_winner_bid($pid, $ar);
            foreach ($bids as $key => $bid) {
                $user = get_userdata($bid->uid);
                $Defendants[$pid][$bid->uid]['user_name'] = $user->user_login;
                $Defendants[$pid][$bid->uid]['post_title'] = get_the_title($pid);
            }
        }
    } elseif (ProjectTheme_is_user_provider($uid)) {
        $querystr = "\n                                   SELECT * \n                                   FROM " . $wpdb->prefix . "project_bids\n                                   WHERE `uid`='{$uid}' \n                                   AND  `winner` = '1'\n                                   ORDER BY `date_made` DESC";
//.........这里部分代码省略.........
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:101,代码来源:disputes.php

示例14: ProjectTheme_payfast_main_payment_submit_payment

function ProjectTheme_payfast_main_payment_submit_payment()
{
    global $wp_query, $wpdb, $current_user;
    $pid = $wp_query->query_vars['pid'];
    get_currentuserinfo();
    $uid = $current_user->ID;
    $post = get_post($pid);
    $business = get_option('ProjectTheme_payfast_id');
    if (empty($business)) {
        die('ERROR. Please input your PayFast ID.');
    }
    //-------------------------------------------------------------------------
    $bid = projectTheme_get_winner_bid($pid);
    $my_total = $bid->bid;
    //----------------------------------------------
    $additional_payfast = 0;
    $additional_payfast = apply_filters('ProjectTheme_filter_paypal_listing_additional', $additional_paypal, $pid);
    $total = $my_total + $additional_payfast;
    $title_post = $post->post_title;
    $title_post = apply_filters('ProjectTheme_filter_paypal_listing_title', $title_post, $pid);
    //---------------------------------
    $tm = current_time('timestamp', 0);
    $cancel_url = get_bloginfo("siteurl") . '/?p_action=payfast_project_response&pid=' . $pid;
    $response_url = get_bloginfo('siteurl') . '/?p_action=payfast_project_response';
    $ccnt_url = get_permalink(get_option('ProjectTheme_my_account_page_id'));
    //get_bloginfo('siteurl').'/?p_action=edit_project&paid=ok&pid=' . $pid;
    $currency = get_option('ProjectTheme_currency');
    //https://www.payfast.co.za/eng/process
    ?>


<html>
<head><title>Processing PayFast Payment...</title></head>
<body onLoad="document.frmPay.submit();">
<center><h3><?php 
    _e('Please wait, your order is being processed...', 'pt_gateways');
    ?>
</h3></center>

	
    <form action="https://www.payfast.co.za/eng/process" method="post" name="frmPay" id="frmPay">

        <!-- Receiver Details -->
        <input type="hidden" name="merchant_id" value="<?php 
    echo get_option('ProjectTheme_payfast_id');
    ?>
">
        <input type="hidden" name="merchant_key" value="<?php 
    echo get_option('ProjectTheme_payfast_key');
    ?>
">
        <input type="hidden" name="return_url" value="<?php 
    echo $ccnt_url;
    ?>
">
        <input type="hidden" name="cancel_url" value="<?php 
    echo $cancel_url;
    ?>
">
        <input type="hidden" name="notify_url" value="<?php 
    echo $response_url;
    ?>
">
        

        <!-- Transaction Details -->
        <input type="hidden" name="m_payment_id" value="<?php 
    echo $pid . '_' . $tm;
    ?>
">
        <input type="hidden" name="custom_str1" value="<?php 
    echo $pid . '|' . $tm;
    ?>
">
        
        
        
        <input type="hidden" name="amount" value="<?php 
    echo $total;
    ?>
">
        <input type="hidden" name="item_name" value="Project:">
        <input type="hidden" name="item_description" value="<?php 
    echo $title_post;
    ?>
">
 
        
        </form>
    
 

</body>
</html>

<?php 
}
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:97,代码来源:payfast_project.php


注:本文中的projectTheme_get_winner_bid函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。