Esempio n. 1
0
 public static function have_reward()
 {
     if (file_exists(DIR . DIRECTORY_SEPARATOR . THEMES_LOC . DIRECTORY_SEPARATOR . \query\main::get_option('theme') . DIRECTORY_SEPARATOR . 'functions.php')) {
         @(require_once DIR . DIRECTORY_SEPARATOR . THEMES_LOC . DIRECTORY_SEPARATOR . \query\main::get_option('theme') . DIRECTORY_SEPARATOR . 'functions.php');
         if (function_exists('theme_has_rewards') && theme_has_rewards()) {
             return true;
         }
     }
     return false;
 }
Esempio n. 2
0
<?php 
    echo edit_profile_form();
    ?>

<div class="title" style="margin-top: 15px;">Change Your Password</div>

<?php 
    echo change_password_form();
    ?>

</div>

<div class="right pointsinfo">

<?php 
    if (theme_has_rewards()) {
        ?>

<div class="points">
Your balance is: <span><?php 
        echo $me->Points;
        ?>
</span> points
</div>

<div class="link">
<a href="<?php 
        echo tlink('user/rewards');
        ?>
" class="btn">Claim Now</a>
<a href="<?php 
Esempio n. 3
0
<?php

if (($me = me()) && theme_has_rewards()) {
    ?>

<div class="gtitle">Claims History</div>

<div style="text-align: right; margin-bottom: 10px;">
  <a href="<?php 
    echo tlink('user/rewards');
    ?>
" class="btn">Rewards</a>
</div>

<?php 
    if (($pagination = have_claim_reqs(array('per_page' => 10, 'user' => $me->ID))) && $pagination['results'] > 0) {
        echo '<ul class="rewalist">';
        echo '<li>
<span>Reward</span>
<span>Points</span>
<span>Status</span>
<span>Date</span>
</li>';
        foreach (claim_reqs(array('per_page' => 10, 'user' => $me->ID, 'orderby' => 'date DESC')) as $item) {
            echo '<li>
<span>' . $item->name . '</span>
<span>' . $item->points . '</span>
<span>' . ($item->claimed ? 'completed' : 'pending') . '</span>
<span>' . date('d F Y', strtotime($item->date)) . '</span>
</li>';
        }