示例#1
0
function PricerrTheme_user_reviews_scr()
{
    $id_icon = 'icon-options-general-rev';
    $ttl_of_stuff = 'PricerrTheme - ' . __('User Reviews', 'PricerrTheme');
    global $wpdb;
    //------------------------------------------------------
    echo '<div class="wrap">';
    echo '<div class="icon32" id="' . $id_icon . '"><br/></div>';
    echo '<h2 class="my_title_class_sitemile">' . $ttl_of_stuff . '</h2>';
    ?>

	    <div id="usual2" class="usual"> 
          <ul> 
            <li><a href="#tabs1"><?php 
    _e('All User Reviews', 'PricerrTheme');
    ?>
</a></li> 
            <li><a href="#tabs2"><?php 
    _e('Search User', 'PricerrTheme');
    ?>
</a></li> 
           <!--  <li><a href="#tabs3"><?php 
    _e('Search Job', 'PricerrTheme');
    ?>
</a></li>  -->
          </ul> 
          <div id="tabs1">	
          
          <?php 
    $s = "select * from " . $wpdb->prefix . "job_ratings where awarded>0 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('User', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Job', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Price', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Rating Type', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Description', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Awarded On', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Options', 'PricerrTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $s_ql = "select * from " . $wpdb->prefix . "job_orders where id='" . $row->orderid . "'";
            $r_ql = $wpdb->get_results($s_ql);
            $post = get_post($r_ql[0]->pid);
            $userdata = get_userdata($post->post_author);
            $pid = $r_ql[0]->pid;
            echo '<tr>';
            echo '<th>' . $userdata->user_login . '</th>';
            echo '<th>' . pricerrtheme_get_show_price(get_post_meta($r_ql[0]->pid, 'price', true)) . '</th>';
            echo '<th><a href="' . get_permalink($pid) . '">' . PricerrTheme_wrap_the_title($post->post_title, $pid) . '</a></th>';
            echo '<th>' . PricerrTheme_show_stars_our_of_number($row->grade) . '</th>';
            echo '<th>' . $row->reason . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>#</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no user feedback.', 'PricerrTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          </div>
          
          <div id="tabs2">
           
          <form method="get" action="<?php 
    bloginfo('siteurl');
    ?>
/wp-admin/admin.php">
            <input type="hidden" value="usrrev" name="page" />
            <input type="hidden" value="tabs2" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'PricerrTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user'];
    ?>
" name="search_user" size="20" /> <input type="submit" name="PricerrTheme_save2" value="<?php 
    _e('Search', 'PricerrTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
          	
            <?php 
    $user = trim($_GET['search_user']);
    $user = get_userdatabylogin($user);
    $uid = $user->ID;
    $s = "select ratings.orderid, ratings.datemade, ratings.reason, ratings.grade \r\n\t\t    from " . $wpdb->prefix . "job_ratings ratings, " . $wpdb->prefix . "job_orders orders, " . $wpdb->prefix . "posts posts where orders.pid=posts.ID AND posts.post_author='{$uid}' AND\r\n\t\t\t orders.id=ratings.orderid AND ratings.awarded>0 order by ratings.id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
          
           <table class="widefat post fixed" cellspacing="0">
            <thead>
            <tr>
            <th><?php 
        _e('User', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Job', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Price', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Rating Type', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Description', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Awarded On', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Options', 'PricerrTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $s_ql = "select * from " . $wpdb->prefix . "job_orders where id='" . $row->orderid . "'";
            $r_ql = $wpdb->get_results($s_ql);
            $post = get_post($r_ql[0]->pid);
            $userdata = get_userdata($post->post_author);
            $pid = $r_ql[0]->pid;
            echo '<tr>';
            echo '<th>' . $userdata->user_login . '</th>';
            echo '<th>' . pricerrtheme_get_show_price(get_post_meta($r_ql[0]->pid, 'price', true)) . '</th>';
            echo '<th><a href="' . get_permalink($pid) . '">' . PricerrTheme_wrap_the_title($post->post_title, $pid) . '</a></th>';
            echo '<th>' . PricerrTheme_show_stars_our_of_number($row->grade) . '</th>';
            echo '<th>' . $row->reason . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>#</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no user feedback.', 'PricerrTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
            
            
          </div>
          
          <div id="tabs3">		
          </div>  

<?php 
    echo '</div>';
}
示例#2
0
function PricerrTheme_get_post_thumbs_fnc()
{
    $pic_id = PricerrTheme_get_first_post_image_ID(get_the_ID());
    if ($pic_id != false) {
        $img = pricerrtheme_generate_thumb3($pic_id, 'thumb_picture_size');
    } else {
        $img = get_bloginfo('template_url') . '/images/nopic.jpg';
    }
    //--------------------------------
    global $post;
    $prc = pricerrtheme_get_show_price(get_post_meta(get_the_ID(), 'price', true));
    $usr = get_userdata($post->post_author);
    $flag = strtoupper(PricerrTheme_get_user_country($post->post_author)) . " " . PricerrTheme_get_user_flag($post->post_author);
    $userdata = get_userdata($post->post_author);
    $featured = get_post_meta(get_the_ID(), 'featured', true);
    ?>
	
	
    <div class="post_thumb">
    	
        <?php 
    if ($featured == "1") {
        ?>
    	<div class="feats1"></div>
    	<?php 
    }
    ?>
        
        <?php 
    $instant = get_post_meta(get_the_ID(), 'instant', true);
    $max_days = get_post_meta(get_the_ID(), 'max_days', true);
    if ($instant == "1") {
        ?>
        <div class="instant1"></div>
        <?php 
    } elseif ($max_days == 1) {
        ?>
        
        <div class="express1"></div>
        
        <?php 
    }
    ?>
        
        
    	<div class="thumbnail_image">
        	<a href="<?php 
    the_permalink();
    ?>
"><img class="my_image" src="<?php 
    echo $img;
    ?>
" width="155" height="115" alt="<?php 
    the_title();
    ?>
" /></a>
        </div>
        
        <div class="user_ratings"><div class="padd10_m">
        	<?php 
    echo pricerrtheme_show_rating_star_user($post->post_author);
    ?>
        </div></div>
        
        <div class="gridview_title">
        	<div class="padd10_m">
    		<?php 
    $string_title = ucfirst(substr(get_the_title(), 0, 80));
    echo '<a class="grid_view_url_thing" href="' . get_permalink() . '">';
    echo sprintf(__('%s', 'PricerrTheme'), $string_title);
    echo '</a>';
    ?>
        	</div>
        </div>
        
        
        <div class="user_and_flag">
        	<div class="padd10_m">
        		
                <?php 
    $link_user = PricerrTheme_get_user_profile_link($userdata->user_login);
    echo sprintf(__('by <a href="%s" class="grid_view_url_thing1">%s</a>', 'PricerrTheme'), $link_user, $userdata->user_login);
    ?>
 
               &nbsp; &nbsp;  <?php 
    echo $flag;
    ?>
                
            </div>
        </div>
        
        
        
        
    
    </div>
    
    
    <?php 
}
function PricerrTheme_affiliates_admin()
{
    $id_icon = 'icon-options-general-withdr';
    $ttl_of_stuff = 'PricerrTheme - ' . __('Affiliates', 'PricerrTheme');
    global $wpdb;
    //------------------------------------------------------
    echo '<div class="wrap">';
    echo '<div class="icon32" id="' . $id_icon . '"><br/></div>';
    echo '<h2 class="my_title_class_sitemile">' . $ttl_of_stuff . '</h2>';
    //----------------------------------------
    if (isset($_GET['tid'])) {
        $tm = current_time('timestamp', 0);
        //();
        $ids = $_GET['tid'];
        echo '<div class="saved_thing"><div class="padd10">' . __('Payment accepted!', 'PricerrTheme') . '</div></div>';
        $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set paid='1', datepaid='{$tm}' where id='{$ids}'";
        $wpdb->query($ss);
    }
    if (isset($_GET['hide_id'])) {
        $tm = time();
        $ids = $_GET['hide_id'];
        echo '<div class="saved_thing"><div class="padd10">' . __('Payment hidden!', 'PricerrTheme') . '</div></div>';
        $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set showme='0' where id='{$ids}'";
        $wpdb->query($ss);
    }
    if (isset($_GET['show_id'])) {
        $tm = time();
        $ids = $_GET['show_id'];
        echo '<div class="saved_thing"><div class="padd10">' . __('Payment shown!', 'PricerrTheme') . '</div></div>';
        $ss = "update " . $wpdb->prefix . "job_affiliate_commissions set showme='1' where id='{$ids}'";
        $wpdb->query($ss);
    }
    //---------------------------------------
    ?>

	    <div id="usual2" class="usual"> 
          <ul> 
            <li><a href="#tabs1"><?php 
    _e('Unpaid Commissions', 'PricerrTheme');
    ?>
</a></li> 
            <li><a href="#tabs2"><?php 
    _e('Paid Commissions', 'PricerrTheme');
    ?>
</a></li> 
          <!--  <li><a href="#tabs3"><?php 
    _e('Search Unpaid', 'PricerrTheme');
    ?>
</a></li> 
            <li><a href="#tabs4"><?php 
    _e('Search Paid', 'PricerrTheme');
    ?>
</a></li> -->

          </ul> 
          <div id="tabs1">
          <?php 
    $s = "select * from " . $wpdb->prefix . "job_affiliate_commissions 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', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Related Job', 'PricerrTheme');
        ?>
</th>
            <th width="20%"><?php 
        _e('Amount', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Date', 'PricerrTheme');
        ?>
</th>
            <th width="25%"><?php 
        _e('Options', 'PricerrTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            $post_au = get_post($row->pid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th><a href="' . get_permalink($row->pid) . '">' . $post_au->post_title . '</a></th>';
            echo '<th>' . pricerrtheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Paid', 'PricerrTheme') . '</a>' . ' | ' . ($row->showme == 1 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&hide_id=' . $row->id . '" class="awesome">' . __('Hide Request', 'PricerrTheme') . '</a>' : '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&show_id=' . $row->id . '" class="awesome">' . __('Show Request', 'PricerrTheme') . '</a>') . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no unpaid commissions.', 'PricerrTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          	
          </div>
          
          <div id="tabs2">	
          
                   <?php 
    $s = "select * from " . $wpdb->prefix . "job_affiliate_commissions 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 width="12%" ><?php 
        _e('Username', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Related Job', 'PricerrTheme');
        ?>
</th>
            <th width="20%"><?php 
        _e('Amount', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Date', 'PricerrTheme');
        ?>
</th>
            <th><?php 
        _e('Date Paid', 'PricerrTheme');
        ?>
</th>
            <th width="25%"><?php 
        _e('Options', 'PricerrTheme');
        ?>
</th>
            </tr>
            </thead>
            
            
            
            <tbody>
            <?php 
        foreach ($r as $row) {
            $user = get_userdata($row->uid);
            $post_au = get_post($row->pid);
            echo '<tr>';
            echo '<th>' . $user->user_login . '</th>';
            echo '<th><a href="' . get_permalink($row->pid) . '">' . $post_au->post_title . '</a></th>';
            echo '<th>' . pricerrtheme_get_show_price($row->amount) . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datemade) . '</th>';
            echo '<th>' . date('d-M-Y H:i:s', $row->datepaid) . '</th>';
            echo '<th>' . ($row->showme == 1 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&hide_id=' . $row->id . '" class="awesome">' . __('Hide Request', 'PricerrTheme') . '</a>' : '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=aff-aff&show_id=' . $row->id . '" class="awesome">' . __('Show Request', 'PricerrTheme') . '</a>') . '</th>';
            echo '</tr>';
        }
        ?>
            </tbody>
            
            
            </table>
            <?php 
    } else {
        ?>
            
            <div class="padd101">
            <?php 
        _e('There are no paid commissions.', 'PricerrTheme');
        ?>
            </div>
            
            <?php 
    }
    ?>
          
          
          </div>
          
  
  
          
          
          <div id="tabs3" style="display:none">
          
          <form method="get" action="<?php 
    bloginfo('siteurl');
    ?>
/wp-admin/admin.php">
            <input type="hidden" value="withdraw-req" name="page" />
            <input type="hidden" value="tabs3" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'PricerrTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user'];
    ?>
" name="search_user" size="20" /> <input type="submit" name="PricerrTheme_save3" value="<?php 
    _e('Search', 'PricerrTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
            
            <?php 
    if (isset($_GET['PricerrTheme_save3'])) {
        $search_user = trim($_GET['search_user']);
        $user = get_userdatabylogin($search_user);
        $uid = $user->ID;
        $s = "select * from " . $wpdb->prefix . "job_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', 'PricerrTheme');
            ?>
</th>
            <th><?php 
            _e('Method', 'PricerrTheme');
            ?>
</th>
            <th width="20%"><?php 
            _e('Details', 'PricerrTheme');
            ?>
</th>
            <th><?php 
            _e('Date Requested', 'PricerrTheme');
            ?>
</th>
            <th ><?php 
            _e('Amount', 'PricerrTheme');
            ?>
</th>
            <th width="25%"><?php 
            _e('Options', 'PricerrTheme');
            ?>
</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>' . PricerrTheme_get_show_price($row->amount) . '</th>';
                echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'PricerrTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'PricerrTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'PricerrTheme') : __("Rejected", 'PricerrTheme'))) . '</th>';
                echo '</tr>';
            }
            ?>
            </tbody>
            
            
            </table>
            <?php 
        } else {
            ?>
            
            <div class="padd101">
            <?php 
            _e('There are no results for your search.', 'PricerrTheme');
            ?>
            </div>
            
            <?php 
        }
    }
    ?>
            
          		
          </div> 
          
          <div id="tabs4" style="display:none">	
          
          <form method="get" action="<?php 
    bloginfo('siteurl');
    ?>
/wp-admin/admin.php">
            <input type="hidden" value="withdraw-req" name="page" />
            <input type="hidden" value="tabs4" name="active_tab" />
            <table width="100%" class="sitemile-table">
            	<tr>
                <td><?php 
    _e('Search User', 'PricerrTheme');
    ?>
</td>
                <td><input type="text" value="<?php 
    echo $_GET['search_user4'];
    ?>
" name="search_user4" size="20" /> <input type="submit" name="PricerrTheme_save4" value="<?php 
    _e('Search', 'PricerrTheme');
    ?>
"/></td>
                </tr>
     
            
            </table>
            </form> 
          	
             
            <?php 
    if (isset($_GET['PricerrTheme_save4'])) {
        $search_user = trim($_GET['search_user4']);
        $user = get_userdatabylogin($search_user);
        $uid = $user->ID;
        $s = "select * from " . $wpdb->prefix . "job_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', 'PricerrTheme');
            ?>
</th>
            <th><?php 
            _e('Method', 'PricerrTheme');
            ?>
</th>
            <th width="20%"><?php 
            _e('Details', 'PricerrTheme');
            ?>
</th>
            <th><?php 
            _e('Date Requested', 'PricerrTheme');
            ?>
</th>
            <th ><?php 
            _e('Amount', 'PricerrTheme');
            ?>
</th>
            <th width="25%"><?php 
            _e('Options', 'PricerrTheme');
            ?>
</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>' . PricerrTheme_get_show_price($row->amount) . '</th>';
                echo '<th>' . ($row->done == 0 ? '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&active_tab=tabs1&tid=' . $row->id . '" class="awesome">' . __('Make Complete', 'PricerrTheme') . '</a>' . ' | ' . '<a href="' . get_bloginfo('siteurl') . '/wp-admin/admin.php?page=withdraw-req&den_id=' . $row->id . '" class="awesome">' . __('Deny Request', 'PricerrTheme') . '</a>' : ($row->done == 1 ? __("Completed", 'PricerrTheme') : __("Rejected", 'PricerrTheme'))) . '</th>';
                echo '</tr>';
            }
            ?>
            </tbody>
            
            
            </table>
            <?php 
        } else {
            ?>
            
            <div class="padd101">
            <?php 
            _e('There are no results for your search.', 'PricerrTheme');
            ?>
            </div>
            
            <?php 
        }
    }
    ?>
            
            </div>
          
     
     
          
          

<?php 
    echo '</div>';
}
示例#4
0
function PricerrTheme_my_account_affiliates_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content">
        	
            <div class="my_box3">
            	<div class="padd10">
            
            	<div class="box_title"><?php 
    _e("Affiliates Panel", "PricerrTheme");
    ?>
</div>
                <div class="box_content"> 
            	
                    <div class="aff_id_thing">
                    <?php 
    $aff_url = get_bloginfo('siteurl') . "/?ref_id_usr="******"aff_id_thing2">
                    	<?php 
    _e('Share this link with all your friends, when they join to the website through your link you get a percent (%) of all their money spent on our website. 
						Additionally you can share your affiliate link through social networks like facebook and twitter.', 'PricerrTheme');
    ?>
                    </div>
                
                
                </div>
                </div>
                </div>
                
                <div class="clear10"></div>
                
                
                <div class="my_box3"> 
            	<div class="padd10"> 
            
            	<div class="box_title"><?php 
    _e("Your Affiliate Users", "PricerrTheme");
    ?>
</div>
                <div class="box_content">  
            	
                <?php 
    global $wpdb;
    $s = "select * from " . $wpdb->prefix . "job_affiliate_users where owner_id='{$uid}' order by id desc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
                        
                        <table width="100%">
                        <tr>
                        <td><strong><?php 
        _e('Username', 'PricerrTheme');
        ?>
</strong></td>
                        <td><strong><?php 
        _e('Joined On', 'PricerrTheme');
        ?>
</strong></td>
                        </tr>
                        
                        
                        
                        <?php 
        foreach ($r as $row) {
            $usr = get_userdata($row->affiliate_id);
            echo '<tr>';
            echo '<td><a href="' . get_bloginfo('siteurl') . '/?p_action=user_profile&post_author=' . $usr->ID . '">' . $usr->user_login . '</a></td>';
            echo '<td>' . date_i18n('d-m-Y H:i:s', $row->datemade) . '</td>';
            echo '</tr>';
        }
        ?>
 </table> <?php 
    } else {
        _e('Sorry you do not have any affiliate users right now.', 'PricerrTheme');
    }
    ?>
                
                 
                
                </div> 
                </div>
                </div>
                
                
                 <div class="clear10"></div>
                
                
                
                <div class="my_box3"> 
            	<div class="padd10"> 
            
            	<div class="box_title"><?php 
    _e("Affiliate Earnings", "PricerrTheme");
    ?>
</div>
                <div class="box_content">  
            	
                <?php 
    global $wpdb;
    $s = "select * from " . $wpdb->prefix . "job_affiliate_commissions where uid='{$uid}' order by id desc, paid asc";
    $r = $wpdb->get_results($s);
    if (count($r) > 0) {
        ?>
                        
                        <table width="100%">
                        <tr>
                        <td><strong><?php 
        _e('Job', 'PricerrTheme');
        ?>
</strong></td>
                        <td><strong><?php 
        _e('Date', 'PricerrTheme');
        ?>
</strong></td>
                        <td><strong><?php 
        _e('Amount', 'PricerrTheme');
        ?>
</strong></td>
                        <td><strong><?php 
        _e('Paid?', 'PricerrTheme');
        ?>
</strong></td>
                        </tr>
                        
                        
                        
                        <?php 
        foreach ($r as $row) {
            $post_au = get_post($row->pid);
            echo '<tr>';
            echo '<td><a href="' . get_permalink($row->pid) . '">' . $post_au->post_title . '</a></td>';
            echo '<td>' . date_i18n('d-m-Y H:i:s', $row->datemade) . '</td>';
            echo '<td>' . pricerrtheme_get_show_price($row->amount) . '</td>';
            echo '<td>' . ($row->paid == 0 ? __('No', 'PricerrTheme') : __('Yes', 'PricerrTheme')) . '</td>';
            echo '</tr>';
        }
        ?>
 </table> <?php 
    } else {
        _e('Sorry you do not have any commissions right now.', 'PricerrTheme');
    }
    ?>
                
                 
                
                </div> 
                </div>
                </div>
                
                
                
                </div>   
<?php 
    PricerrTheme_get_users_links();
}