コード例 #1
0
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>
      

                
                </div>
                </div>
                </div>
                </div>   
<?php 
    ProjectTheme_get_users_links();
}
コード例 #2
0
ファイル: pay_with_credits.php プロジェクト: simplix-fr/o-g
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 
        _e("Your credits amount", 'ProjectTheme');
        ?>
: <?php 
        echo projectTheme_get_credits($uid);
        ?>
 <?php 
        echo projectTheme_currency();
        ?>
 <br/><br/>
               <a class="post_bid_btn" href="<?php 
        echo ProjectTheme_get_pay_with_credits_page_url($pid, '&pay=yes');
        ?>
"><?php 
        echo __('Pay Now', 'ProjectTheme');
        ?>
</a> 
               
               <a class="post_bid_btn" href="<?php 
        echo ProjectTheme_get_payments_page_url('deposit');
        ?>
"><?php 
        echo __('Add More Credits', 'ProjectTheme');
        ?>
</a>
                </div><?php 
    }
    ?>
                
               
           </div></div>
           </div>    
        
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}