コード例 #1
0
ファイル: admin_menu.php プロジェクト: simplix-fr/o-g
function projectTheme_theme_withdrawals()
{
    global $menu_admin_project_theme_bull, $wpdb;
    echo '<div class="wrap">';
    echo '<div class="icon32" id="icon-options-general-withdr"><br/></div>';
    echo '<h2 class="my_title_class_sitemile">ProjectTheme Withdrawals</h2>';
    if (isset($_GET['den_id'])) {
        $den_id = $_GET['den_id'];
        $s = "update " . $wpdb->prefix . "project_withdraw set rejected='1' where id='{$den_id}'";
        $row = $wpdb->get_results($s);
        echo '<div class="saved_thing">Request denied!</div>';
        $s = "select * from " . $wpdb->prefix . "project_withdraw where id='{$den_id}' ";
        $r = $wpdb->get_results($s);
        if (count($r) == 1) {
            $row = $r[0];
            $amount = $row->amount;
            $uid = $row->uid;
            $cr = projectTheme_get_credits($uid);
            projectTheme_update_credits($uid, $cr + $amount);
        }
    }
    if (isset($_GET['tid'])) {
        $tm = current_time('timestamp', 0);
        $ids = $_GET['tid'];
        $s = "select * from " . $wpdb->prefix . "project_withdraw where id='{$ids}'";
        $row = $wpdb->get_results($s);
        $row = $row[0];
        if ($row->done == 0) {
            echo '<div class="saved_thing">Payment completed!</div>';
            $ss = "update " . $wpdb->prefix . "project_withdraw set done='1', datedone='{$tm}' where id='{$ids}'";
            $wpdb->query($ss);
            // or die(mysql_error());
            $usr = get_userdata($row->uid);
            $site_name = get_bloginfo('name');
            $email = get_bloginfo('admin_email');
            $subject = sprintf(__("Your withdrawal has been completed: %s", 'ProjectTheme'), projectTheme_get_show_price($row->amount));
            $message = sprintf(__("Your withdrawal has been completed: %s", 'ProjectTheme'), projectTheme_get_show_price($row->amount));
            //sitemile_send_email($usr->user_email, $subject , $message);
            $reason = sprintf(__('Withdraw to PayPal to email: %s', 'ProjectTheme'), $row->payeremail);
            projectTheme_add_history_log('0', $reason, $row->amount, $usr->ID);
        }
    }
    ?>
    
        <div id="usual2" class="usual"> 
  <ul> 
    <ul> 
            <li><a href="#tabs1"><?php 
    _e('Unresolved Requests', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs2"><?php 
    _e('Resolved Requests', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs_rejected"><?php 
    _e('Rejected Requests', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs3"><?php 
    _e('Search Unresolved', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs4"><?php 
    _e('Search Solved', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs_search_rejected"><?php 
    _e('Search Rejected', 'ProjectTheme');
    ?>
</a></li> 
          </ul> 
  </ul> 
  <div id="tabs1">
          <?php 
    $s = "select * from " . $wpdb->prefix . "project_withdraw where done='0' and rejected!='1' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th width="12%" ><?php 
        _e('Username', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Method', 'ProjectTheme');
        ?>
</th>
            <th width="20%"><?php 
        _e('Details', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Requested', 'ProjectTheme');
        ?>
</th>
            <th ><?php 
        _e('Amount', 'ProjectTheme');
        ?>
</th>
            <th width="25%"><?php 
        _e('Options', 'ProjectTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th>' . $row->methods . '</th>';
            echo '<th>' . $row->payeremail . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . ($row->done == 0 ? '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no unresolved withdrawal requests.', 'ProjectTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          	
          </div>
          
          <div id="tabs2">	
          
          
          <?php 
    $s = "select * from " . $wpdb->prefix . "project_withdraw where done='1' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th ><?php 
        _e('Username', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Method', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Details', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Requested', 'ProjectTheme');
        ?>
</th>
            <th ><?php 
        _e('Amount', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Released', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Options', 'ProjectTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th>' . $user->methods . '</th>';
            echo '<th>' . $row->payeremail . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . ($row->datedone == 0 ? "Not yet" : date('d-M-Y H:i:s', $row->datedone)) . '</th>';
            echo '<th>' . ($row->done == 0 ? '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no resolved withdrawal requests.', 'ProjectTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          
          </div>
          
          <div id="tabs_rejected">	
          
          
          <?php 
    $s = "select * from " . $wpdb->prefix . "project_withdraw where rejected='1' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th ><?php 
        _e('Username', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Details', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Requested', 'ProjectTheme');
        ?>
</th>
            <th ><?php 
        _e('Amount', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Released', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Options', 'ProjectTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th>' . $row->payeremail . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . __('Rejected', 'ProjectTheme') . '</th>';
            echo '<th>#</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no rejected withdrawal requests.', 'ProjectTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          
          </div>
          
          
          <div id="tabs3">
          
          <form method="get" action="<?php 
    echo get_admin_url();
    ?>
admin.php">
            <input type="hidden" value="Withdrawals" name="page" />
            <input type="hidden" value="tabs3" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'ProjectTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user'];
    ?>
" name="search_user" size="20" /> <input type="submit"  class="button button-primary button-large" name="ProjectTheme_save3" value="<?php 
    _e('Search', 'ProjectTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
            
            <?php 
    if (isset($_GET['ProjectTheme_save3'])) {
        $search_user = trim($_GET['search_user']);
        $user = get_userdatabylogin($search_user);
        $uid = $user->ID;
        $s = "select * from " . $wpdb->prefix . "project_withdraw where done='0' AND uid='{$uid}' order by id desc";
        $r = $wpdb->get_results($s);
        if (count($r) > 0) {
            ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th width="12%" ><?php 
            _e('Username', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Method', 'ProjectTheme');
            ?>
</th>
            <th width="20%"><?php 
            _e('Details', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Date Requested', 'ProjectTheme');
            ?>
</th>
            <th ><?php 
            _e('Amount', 'ProjectTheme');
            ?>
</th>
            <th width="25%"><?php 
            _e('Options', 'ProjectTheme');
            ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
            foreach ($r as $row) {
                $user = get_userdata($row->uid);
                echo '<tr>';
                echo '<th>' . $user->user_login . '</th>';
                echo '<th>' . $row->methods . '</th>';
                echo '<th>' . $row->payeremail . '</th>';
                echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
                echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
                echo '<th>' . ($row->done == 0 ? '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
                echo '</tr>';
            }
            ?>
            </tbody>
            
            
            </table>
            <?php 
        } else {
            ?>
            
            <div class="padd101">
            <?php 
            _e('There are no results for your search.', 'ProjectTheme');
            ?>
            </div>
            
            <?php 
        }
    }
    ?>
            
          		
          </div> 
          
          <div id="tabs4">	
          
          <form method="get" action="<?php 
    echo get_admin_url();
    ?>
admin.php">
            <input type="hidden" value="Withdrawals" name="page" />
            <input type="hidden" value="tabs4" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'ProjectTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user4'];
    ?>
" name="search_user4" size="20" /> <input type="submit"  class="button button-primary button-large" name="ProjectTheme_save4" value="<?php 
    _e('Search', 'ProjectTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
          	
             
            <?php 
    if (isset($_GET['ProjectTheme_save4'])) {
        $search_user = trim($_GET['search_user4']);
        $user = get_userdatabylogin($search_user);
        $uid = $user->ID;
        $s = "select * from " . $wpdb->prefix . "project_withdraw where done='1' AND uid='{$uid}' order by id desc";
        $r = $wpdb->get_results($s);
        if (count($r) > 0) {
            ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th width="12%" ><?php 
            _e('Username', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Method', 'ProjectTheme');
            ?>
</th>
            <th width="20%"><?php 
            _e('Details', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Date Requested', 'ProjectTheme');
            ?>
</th>
            <th ><?php 
            _e('Amount', 'ProjectTheme');
            ?>
</th>
            <th width="25%"><?php 
            _e('Options', 'ProjectTheme');
            ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
            foreach ($r as $row) {
                $user = get_userdata($row->uid);
                echo '<tr>';
                echo '<th>' . $user->user_login . '</th>';
                echo '<th>' . $row->methods . '</th>';
                echo '<th>' . $row->payeremail . '</th>';
                echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
                echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
                echo '<th>' . ($row->done == 0 ? '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_admin_url() . 'admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
                echo '</tr>';
            }
            ?>
            </tbody>
            
            
            </table>
            <?php 
        } else {
            ?>
            
            <div class="padd101">
            <?php 
            _e('There are no results for your search.', 'ProjectTheme');
            ?>
            </div>
            
            <?php 
        }
    }
    ?>
            
            </div>
          
          
          <div id="tabs_search_rejected">	
          
          <form method="get" action="<?php 
    echo get_admin_url();
    ?>
admin.php">
            <input type="hidden" value="Withdrawals" name="page" />
            <input type="hidden" value="tabs_search_rejected" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'ProjectTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user5'];
    ?>
" name="search_user5" size="20" /> <input type="submit"  class="button button-primary button-large" name="ProjectTheme_save5" value="<?php 
    _e('Search', 'ProjectTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
          	
            
             <?php 
    if (isset($_GET['ProjectTheme_save5'])) {
        $search_user = trim($_GET['search_user5']);
        $user = get_userdatabylogin($search_user);
        $uid = $user->ID;
        $s = "select * from " . $wpdb->prefix . "project_withdraw where rejected='1' AND uid='{$uid}' order by id desc";
        $r = $wpdb->get_results($s);
        if (count($r) > 0) {
            ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th width="12%" ><?php 
            _e('Username', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Method', 'ProjectTheme');
            ?>
</th>
            <th width="20%"><?php 
            _e('Details', 'ProjectTheme');
            ?>
</th>
            <th><?php 
            _e('Date Requested', 'ProjectTheme');
            ?>
</th>
            <th ><?php 
            _e('Amount', 'ProjectTheme');
            ?>
</th>
            <th width="25%"><?php 
            _e('Options', 'ProjectTheme');
            ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
            foreach ($r as $row) {
                $user = get_userdata($row->uid);
                echo '<tr>';
                echo '<th>' . $user->user_login . '</th>';
                echo '<th>' . $row->methods . '</th>';
                echo '<th>' . $row->payeremail . '</th>';
                echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
                echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
                echo '<th>#</th>';
                echo '</tr>';
            }
            ?>
            </tbody>
            
            
            </table>
            <?php 
        } else {
            ?>
            
            <div class="padd101">
            <?php 
            _e('There are no results for your search.', 'ProjectTheme');
            ?>
            </div>
            
            <?php 
        }
    }
    ?>
            
          </div> 
          
          
          

<?php 
    echo '</div>';
}
コード例 #2
0
ファイル: user-profile.php プロジェクト: simplix-fr/o-g
     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>';
     }
     echo '</table>';
 } else {
     _e("There are no reviews to be awarded.", "ProjectTheme");
 }
 ?>
             
             
コード例 #3
0
ファイル: feedbacks.php プロジェクト: simplix-fr/o-g
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='******' 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='******' 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>';
            echo '<th>' . projectTheme_get_show_price($bid->bid) . '</th>';
            //echo '<th><a href="#">Rate User</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 was awarded ", 'ProjectTheme');
    ?>
</div>
           <div class="my_box3"> 
                <div class="box_content">    
				
              	<?php 
    global $wpdb;
    $query = "select * from " . $wpdb->prefix . "project_ratings where touser='******' AND awarded='1'";
    $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>' . __('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);
            $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 width="42" height="42" class="img_class" 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>' . 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>';
        }
        echo '</table>';
    } else {
        _e("There are no reviews to be awarded.", "ProjectTheme");
    }
    ?>
                
              
           </div>
           </div>    
	
	
	
	
	
		</div>
        
<?php 
    ProjectTheme_get_users_links();
}
コード例 #4
0
ファイル: edit_project.php プロジェクト: roberto95117/auction
 } else {
     echo '<div class="stuff-not-paid"><div class="padd10">';
     echo __('You have added extra options to your project. In order to publish your project you need to pay for the options.', 'ProjectTheme');
     echo '<br/><br/><table width="100%">';
     $ttl = 0;
     foreach ($payment_arr as $payment_item) {
         $feature_cost = $payment_item['amount'];
         $feature_description = $payment_item['description'];
         echo '<tr>';
         echo '<td width="320">' . $feature_description . '</td>';
         echo '<td>' . projectTheme_get_show_price($feature_cost, 2) . '</td>';
         echo '</tr>';
     }
     echo '<tr>';
     echo '<td width="320"><b>' . __('Total', 'ProjectTheme') . '</b></td>';
     echo '<td>' . projectTheme_get_show_price($my_total, 2) . '</td>';
     echo '</tr>';
     echo '<tr>';
     echo '<td><strong>' . __('Your Total Credits', 'ProjectTheme') . '</strong></td>';
     echo '<td><strong>' . ProjectTheme_get_show_price(ProjectTheme_get_credits($uid), 2) . '</strong></td>';
     echo '</tr>';
     echo '</table><br/><br/>';
     $ProjectTheme_enable_credits_wallet = get_option('ProjectTheme_enable_credits_wallet');
     if ($ProjectTheme_enable_credits_wallet != 'no') {
         echo '<a href="' . get_bloginfo('siteurl') . '/?p_action=credits_listing&pid=' . $pid . '" class="edit_project_pay_cls">' . __('Pay by Credits', 'ProjectTheme') . '</a>';
     }
     global $project_ID;
     $project_ID = $pid;
     //-------------------
     $ProjectTheme_paypal_enable = get_option('ProjectTheme_paypal_enable');
     $ProjectTheme_alertpay_enable = get_option('ProjectTheme_alertpay_enable');
コード例 #5
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();
}
コード例 #6
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();
}
コード例 #7
0
function projectTheme_theme_Affiliates()
{
    global $menu_admin_project_theme_bull, $wpdb;
    echo '<div class="wrap">';
    echo '<div class="icon32" id="icon-options-general-withdr"><br/></div>';
    echo '<h2 class="my_title_class_sitemile">ProjectTheme Affiliates</h2>';
    if (isset($_GET['tid'])) {
        $tm = current_time('timestamp', 0);
        $ids = $_GET['tid'];
        $s = "select * from " . $wpdb->prefix . "project_withdraw where id='{$ids}'";
        $row = $wpdb->get_results($s);
        $row = $row[0];
        if ($row->done == 0) {
            echo '<div class="saved_thing">Payment completed!</div>';
            $ss = "update " . $wpdb->prefix . "project_withdraw set done='1', datedone='{$tm}' where id='{$ids}'";
            $wpdb->query($ss);
            // or die(mysql_error());
            $usr = get_userdata($row->uid);
            $site_name = get_bloginfo('name');
            $email = get_bloginfo('admin_email');
            $subject = sprintf(__("Your withdrawal has been completed: %s", 'ProjectTheme'), projectTheme_get_show_price($row->amount));
            $message = sprintf(__("Your withdrawal has been completed: %s", 'ProjectTheme'), projectTheme_get_show_price($row->amount));
            //sitemile_send_email($usr->user_email, $subject , $message);
            $reason = sprintf(__('Withdraw to PayPal to email: %s', 'ProjectTheme'), $row->payeremail);
            projectTheme_add_history_log('0', $reason, $row->amount, $usr->ID);
        }
    }
    ?>
    
        <div id="usual2" class="usual"> 
  <ul> 
    <ul> 
            <li><a href="#tabs1"><?php 
    _e('Affiliate Activity (not paid)', 'ProjectTheme');
    ?>
</a></li> 
            <li><a href="#tabs2"><?php 
    _e('Affiliate Activity (paid)', 'ProjectTheme');
    ?>
</a></li> 
          </ul> 
  </ul> 
  <div id="tabs1">
          <?php 
    $s = "select * from " . $wpdb->prefix . "project_affiliate_payouts where paid='0' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th width="12%" ><?php 
        _e('Username', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Project', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Made', 'ProjectTheme');
        ?>
</th>
            <th ><?php 
        _e('Amount', 'ProjectTheme');
        ?>
</th>
            <th width="25%"><?php 
        _e('Options', 'ProjectTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            $user = get_userdata($row->uid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th>' . $row->methods . '</th>';
            echo '<th>' . $row->payeremail . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There is no unpaid affiliate activity.', 'ProjectTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          	
          </div>
          
          <div id="tabs2">	
          
          
          <?php 
    $s = "select * from " . $wpdb->prefix . "project_affiliate_payouts where paid='1' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th ><?php 
        _e('Username', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Project', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Made', 'ProjectTheme');
        ?>
</th>
            <th ><?php 
        _e('Amount', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Date Paid', 'ProjectTheme');
        ?>
</th>
            <th><?php 
        _e('Options', 'ProjectTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th>' . $row->payeremail . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . ProjectTheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . ($row->datedone == 0 ? "Not yet" : date('d-M-Y H:i:s', $row->datedone)) . '</th>';
            echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=Withdrawals&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'ProjectTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=Withdrawals&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'ProjectTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'ProjectTheme') : __("Rejected", 'ProjectTheme'))) . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There is no paid affiliate activity.', 'ProjectTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          
          </div>
          
        
        
          
          

<?php 
    echo '</div>';
}