Example #1
0
function um_confirm_withdraw_email_user($id)
{
    if (!$id) {
        return;
    }
    global $wpdb;
    $table_name = $wpdb->prefix . 'um_withdraw';
    $check = $wpdb->get_row("SELECT * FROM {$table_name} WHERE id='" . $id . "'");
    if ($check) {
        $uid = $check->user_id;
        $num = $check->money;
        $balance = $check->balance;
        $balance_before = $num + $balance;
        $time = $check->time;
        $status = $check->status == 1 ? '已支付' : '处理中';
        $blogname = get_bloginfo('name');
        $bloghome = get_bloginfo('url');
        $admin_email = get_bloginfo('admin_email');
        $user_email = get_userdata($uid)->user_email;
        $user_name = get_userdata($uid)->display_name;
        $alipay_account = get_userdata($uid)->um_alipay_email;
        $user_ucenter_url = um_get_user_url('affiliate', $uid);
        $title = '推广提现请求处理通知';
        $wp_email = 'no-reply@' . preg_replace('#^www\\.#', '', strtolower($_SERVER['SERVER_NAME']));
        $fr = "From: \"" . $blogname . "\" <{$wp_email}>";
        $headers = "{$fr}\nContent-Type: text/html; charset=" . get_option('blog_charset') . "\n";
        $content = '<p><strong>亲爱的会员' . $user_name . ' 您好:</strong></p><p>您于' . $time . '在' . $blogname . '( <a target="_blank" href="' . $bloghome . '">' . $bloghome . '</a>)发起一笔推广提现请求,现在管理员已确认处理,以下是您的请求信息,您可进入个人中心-“<a target="_blank" href="' . $user_ucenter_url . '">我的推广</a>”页面查看详细内容,同时留意在本站提供的支付账号等的余额变动,如有任何疑问,请及时联系我们(Email:<a href="mailto:' . $admin_email . '" target="_blank">' . $admin_email . '</a>)。</p>';
        $content .= '<div style="background-color:#fefcc9; padding:10px 15px; border:1px solid #f7dfa4; font-size: 12px;line-height:160%;">申请人:<a href="' . $user_ucenter_url . '" title="用户个人中心" target="_blank">' . $user_name . '</a><br>支付宝账号:' . $alipay_account . '元<br>推广余额:' . $balance_before . '元<br>申请提现:' . $num . '元<br>提现后余额:' . $balance . '<br>发起时间:' . $time . '<br>请求状态:' . $status . '</div>';
        $html = store_email_template_wrap('', $content);
        wp_mail($user_email, $title, $html, $headers);
    }
    return;
}
Example #2
0
function um_comment_url_to_author_homepage($content)
{
    global $comment;
    $comment_ID = $comment->comment_ID;
    $user_id = (int) $comment->user_id;
    $url = get_comment_author_url($comment_ID);
    $author = get_comment_author($comment_ID);
    if ($user_id > 0) {
        $author_home = um_get_user_url('post', $user_id);
        $return = "<a href='" . $author_home . "' rel='external nofollow' class='url author_home' title='访问" . $author . "的个人主页'>{$author}</a>";
    } else {
        $return = $author;
    }
    return $return;
}
Example #3
0
        echo get_bloginfo('url') . '/?aff=' . $current_user->ID;
        ?>
" disabled="disabled"></p>
<?php 
        $sum_rewards = get_um_aff_sum_money($curauth->ID);
        $withdrawed = um_get_withdraw_sum($curauth->ID, 'withdrawed');
        $withdrawing = um_get_withdraw_sum($curauth->ID, 'withdrawing');
        $left = $sum_rewards - $withdrawed - $withdrawing;
        if ($currency == 'cash') {
            $type = '现金';
            $otype = '积分';
            $link = um_get_user_url('affiliate', $curauth->ID) . '&currency=credit';
        } else {
            $type = '积分';
            $otype = '现金';
            $link = um_get_user_url('affiliate', $curauth->ID) . '&currency=cash';
        }
        $item_html = '<li class="contextual" style="background:#ceface;color:#44a042;">' . sprintf(__('全站共有 %1$s 条%2$s推广用户记录,点击查看<a href="%3$s">%4$s</a>推广用户记录。', 'um'), $aall, $type, $link, $otype) . '</li>';
        $item_html .= '<div class="site-orders">
			<table width="100%" border="0" cellspacing="0" class="table table-bordered orders-table">
				<thead>
					<tr>
						<th scope="col" style="width:20%;">' . __('用户ID', 'um') . '</th>
						<th scope="col">' . __('注册时间', 'um') . '</th>
						<th scope="col">' . __('消费金额', 'um') . '</th>
						<th scope="col">' . __('推广提成', 'um') . '</th>
					</tr>
				</thead>
				<tbody class="the-list">';
        if ($aLog) {
            $total_value = 0;
Example #4
0
        echo '(' . $unread . ')';
    }
    ?>
</a></span>
					<span><i class="fa fa-cny"></i>&nbsp;<a href="<?php 
    echo um_get_user_url('credit');
    ?>
" title="<?php 
    _e('我的积分', 'um');
    ?>
"><?php 
    _e('积分查询', 'um');
    ?>
</a></span>
					<span><i class="fa fa-cog"></i>&nbsp;<a href="<?php 
    echo um_get_user_url('profile');
    ?>
" title="<?php 
    _e('编辑资料', 'um');
    ?>
"><?php 
    _e('编辑资料', 'um');
    ?>
</a></span>
					<span><i class="fa fa-sign-out"></i>&nbsp;<a href="<?php 
    if (is_singular()) {
        echo wp_logout_url(get_permalink());
    } else {
        echo wp_logout_url(get_bloginfo('url'));
    }
    ?>
Example #5
0
                    echo '<em>¥</em>' . sprintf('%0.2f', $discount_arr[1]) . '<em>(元)</em>';
                } else {
                    echo '<em><i class="fa fa-gift"></i></em>' . sprintf('%0.2f', $discount_arr[1]) . '<em>(积分)</em>';
                }
                ?>
</strong></li><?php 
            } else {
                if (is_user_logged_in()) {
                    echo '<strong>';
                    if ($currency == 1) {
                        echo '<em>¥</em>' . sprintf('%0.2f', $discount_arr[6]) . '<em>(元)</em>';
                    } else {
                        echo '<em><i class="fa fa-gift"></i></em>' . sprintf('%0.2f', $discount_arr[6]) . '<em>(积分)</em>';
                    }
                    echo '</strong>';
                    echo sprintf(__('非<a href="%1$s" target="_blank" title="开通会员">会员</a>不能享受该优惠', 'um'), um_get_user_url('membership'));
                } else {
                    _e('<a href="javascript:" class="user-login">登录</a> 查看优惠', 'um');
                }
            }
        }
        ?>
							<?php 
    }
    ?>
							<li class="summary-amount"><span class="dt"><?php 
    _e('商品数量', 'um');
    ?>
</span><span class="dt-num"><?php 
    $amount = get_post_meta($post->ID, 'product_amount', true) ? (int) get_post_meta($post->ID, 'product_amount', true) : 0;
    echo $amount;
Example #6
0
function um_follow_list($uid, $limits, $type = 'follower')
{
    if ($type == 'following') {
        $results = um_following($uid, $limits);
        $field = 'user_id';
    } else {
        $results = um_follower($uid, $limits);
        $field = 'follow_user_id';
    }
    $html = '';
    if ($results) {
        foreach ($results as $result) {
            $user = get_userdata($result->{$field});
            $username = $user->display_name;
            $html .= '<li class="flow" title="' . $username . '"><a href="' . um_get_user_url('post', $user->ID) . '" target="_blank">' . um_get_avatar($result->{$field}, '40', um_get_avatar_type($result->{$field})) . '</a><span class="name">' . $username . '</span></li>';
        }
    }
    return $html;
}