<?php global $xt_user; $xt_user = wp_get_current_user(); xt_update_user_account_counts($xt_user->ID); $fanxian = xt_user_total_fanxian($xt_user->ID); $jifen = xt_user_total_jifen($xt_user->ID); //$jifenOrder = xt_user_total_jifen_order($xt_user->ID); $tixians = xt_total_tixian_cash($xt_user->ID); $tixians_jifen = xt_total_tixian_jifen($xt_user->ID); ?> <div id="X_Account-Info" class="xt-account-info"> <div class="row-fluid"> <div class="span12" style="margin:0;"> <p style="font-size:14px;"><b style="font-size:14px;"><?php xt_the_user_title(); ?> ,</b> 欢迎您! <span style="_position: relative;_top: -1px;font-size: 16px;color: #E5E5E5;margin: 0 10px 0 0;">|</span> 特权等级: <span>未开通</span></p> </div> </div> <div class="row-fluid"> <div class="span6" style="margin:0;"> <div class="well"> <ul class="unstyled xt-account-cashback"> <li class="xt-account-cashback-ico"><span></span><i>还可提现:</i><b><?php echo $fanxian - ($tixians[0] + $tixians[1]); ?> </b>元</li> <li><i>成功提现:</i><b><?php echo $tixians[1] - $tixians[2]; ?>
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $before_widget; global $wp_query, $xt_album, $xt_user; $xt_share_param = array('album_id' => absint($wp_query->query_vars['xt_param']), 'page' => 1, 'share_per_page' => 40, 'user_id' => $xt_user->ID); echo "<script type='text/javascript'>var XT_SHARE_PARAMS=" . json_encode($xt_share_param) . ";</script>"; $user = wp_get_current_user(); $isSelf = $user->exists() && $user->ID == $xt_album->user_id; $covers = isset($instance['covers']) ? $instance['covers'] : array(); $_covers = array(); if (!empty($covers)) { foreach ($covers as $cover) { if (!empty($cover)) { $_covers[] = $cover; } } } if (empty($_covers)) { $_covers = array(XT_CORE_IMAGES_URL . '/default_header.jpg'); } ?> <?php if ($isSelf) { ?> <div id="X_Album-Modal-Update-Box" class="modal hide"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>编辑专辑</h3> </div> <div class="modal-body"> <form class="form-horizontal"> <div class="control-group"> <label class="control-label" for="X_Album-Update-Title" style="width:100px;">名称</label> <div class="controls" style="margin-left:120px;"> <input type="text" class="input-xlarge" id="X_Album-Update-Title" value="<?php echo $xt_album->title; ?> "> <input type="hidden" id="X_Album-Update-Id" value="<?php echo $xt_album->id; ?> "> </div> </div> <div class="control-group"> <label class="control-label" for="X_Album-Update-Content" style="width:100px;">描述</label> <div class="controls" style="margin-left:120px;"> <textarea id="X_Album-Update-Content" class="input-xlarge" rows="3"><?php echo esc_html($xt_album->content); ?> </textarea> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn" data-dismiss="modal">取消</button> <button type="button" class="btn btn-primary">确定</button> </div> </div> <?php } ?> <div class="row-fluid" style="background-color:white;margin-bottom:15px;"> <div class="span5"> <div class="clearfix" style="padding:0 30px;"> <h1 style="white-space:nowrap;overflow:hidden;font-size:20px;"><?php if ($isSelf) { ?> [<a href="javascript:;" data-toggle="modal" data-target="#X_Album-Modal-Update-Box" style="text-decoration: none;">编辑</a>] <?php } echo $xt_album->title; ?> </h1> <div class="pull-left muted">宝贝数量 <b class="text-default"><?php echo $xt_album->share_count; ?> </b></div> <div class="pull-right muted" style="margin-right:60px;">喜欢指数 <b class="text-default"><?php echo $xt_album->fav_count; ?> </b></div> </div> <div class="clearfix muted" style="padding:5px 30px 0px;height:76px;font-size:12px;font-weight:normal;overflow:hidden;"> <?php echo esc_html($xt_album->content); ?> </div> <div class="clearfix" style="padding:5px 30px;"> <div class="media"> <a class="pull-left" target="_blank" href="<?php xt_the_user_url(); ?> "><img class="media-object" style="width:32px;height:32px;" src="<?php xt_the_user_pic(); ?> "></a> <div class="media-body"> <h4 class="media-heading" style="font-size:12px;line-height:12px;"><a target="_blank" href="<?php xt_the_user_url(); ?> "><?php xt_the_user_title(); ?> </a></h4> <div class="media" style="margin-top:0px;"> <small> <span>关注</span><span><?php echo xt_the_user_followcount(); ?> </span> <span>粉丝</span><span><?php echo xt_the_user_fanscount(); ?> </span> <span>宝贝</span><span><?php echo xt_get_the_user_sharecount() + xt_get_the_user_fav_sharecount(); ?> </span> <span>喜欢</span><span><?php echo xt_get_the_user_fav_sharecount() + xt_get_the_user_fav_albumcount(); ?> </span> </small> </div> </div> </div> </div> </div> <div class="span7" style="height:240px;overflow:hidden;"> <img src="<?php echo $_covers[array_rand($_covers)]; ?> " width="100%"> </div> </div> <?php get_the_share_container($xt_share_param, false, false, false); ?> <?php echo $after_widget; }
function get_the_user_template($count) { global $xt_user_follow; $_user = wp_get_current_user(); if ($_user->exists()) { if (empty($xt_user_follow)) { $xt_user_follow = get_user_meta($_user->ID, XT_USER_FOLLOW, true); } if (empty($xt_user_follow)) { $xt_user_follow = array($_user->ID); } } ?> <div class="xt-share xt-share-user media<?php echo $count % 3 == 2 ? ' xt-last' : ''; ?> "> <a class="pull-left" target="_blank" href="<?php xt_the_user_url(); ?> "> <img class="media-object" src="<?php xt_the_user_pic(); ?> "> </a> <div class="media-body"> <h4 class="media-heading"><a target="_blank" href="<?php xt_the_user_url(); ?> "><?php xt_the_user_title(); ?> </a></h4> <div class="media"> <small> <span>关注</span><span><?php echo xt_the_user_followcount(); ?> </span> <span>粉丝</span><span><?php echo xt_the_user_fanscount(); ?> </span> <span>宝贝</span><span><?php echo xt_get_the_user_sharecount() + xt_get_the_user_fav_sharecount(); ?> </span> <span>喜欢</span><span><?php echo xt_get_the_user_fav_sharecount() + xt_get_the_user_fav_albumcount(); ?> </span> </small> <?php if (!xt_is_self(xt_get_the_user_id())) { ?> <div class="xt-user-follow clearfix"> <?php if (!empty($xt_user_follow) && in_array((int) xt_get_the_user_id(), $xt_user_follow)) { ?> <a class="xt-unfollow" href="javascript:;" data-userid="<?php xt_the_user_id(); ?> ">取消关注</a> <a class="xt-sendmsg" href="javascript:;" name="<?php xt_the_user_title(); ?> ">发私信</a> <?php } else { ?> <a class="xt-follow" href="javascript:;" data-userid="<?php xt_the_user_id(); ?> ">+ 加关注</a> <a class="xt-sendmsg" href="javascript:;" name="<?php xt_the_user_title(); ?> ">发私信</a> <?php } ?> </div> <?php } ?> </div> </div> </div> <?php }
function get_the_share_template($user_id = 0, $delClass = '') { global $xt_album; $cacheObj = get_the_share_cachedata(); $_item = isset($cacheObj['item']) ? $cacheObj['item'] : array(); $_comment = isset($cacheObj['comment']) ? $cacheObj['comment'] : array(); $_title = get_the_share_title(); $_url = get_the_share_url(); $_nick = xt_get_the_user_title(get_the_share_username()); ?> <div class="span3 xt-share"> <div class="thumbnail"> <a href="<?php echo $_url; ?> " title="<?php echo $_title; ?> " target="_blank" class="xt-share-link"> <img src="<?php the_share_picurl(); ?> " title="<?php echo $_title; ?> " alt="<?php echo $_title; ?> " /> <div class="xt-img-price">¥<?php the_share_price(); ?> </div> <?php echo get_the_admin_tool_share(get_the_share_id()); ?> <?php if ($user_id) { the_delete_template(get_the_share_id(), $delClass == 'xt-delete-album-share' ? $xt_album->id : 1, $user_id, $delClass); } ?> <span class="label label-album-add" data-id="<?php the_share_id(); ?> " data-pic="<?php the_share_picurl(160); ?> ">加入专辑</span> </a> <div class="caption"> <h5><?php the_share_content(); ?> </h5> <div class="clearfix"> <a class="badge badge-fav" title="喜欢" data-id="<?php the_share_id(); ?> " data-type="1" data-uid="<?php the_share_userid(); ?> "><?php the_share_favcount(); ?> <i class="icon-heart icon-white"></i></a> <a class="badge badge-comment" title="评论" href="javascript:;" data-id="<?php the_share_id(); ?> "><?php the_share_commentcount(); ?> <i class="icon-comment icon-white"></i></a> </div> </div> <ul class="media-list clearfix"> <li class="media"> <a class="pull-left X_Nick" data-value="<?php echo get_the_share_userid(); ?> " target="_blank" href="<?php xt_the_user_url(get_the_share_userid()); ?> "><img src="<?php xt_the_user_pic(get_the_share_useravatar()); ?> " alt="<?php echo $_nick; ?> "></a> <div class="media-body"><p class="muted"><a class="X_Nick" data-value="<?php echo get_the_share_userid(); ?> " target="_blank" href="<?php xt_the_user_url(get_the_share_userid()); ?> " class="xt-rep-nick"><?php echo $_nick; ?> </a>分享了:<?php echo wp_trim_words(get_the_share_title(), 15); ?> </p></div> </li> <?php if (xt_is_displaycomment() && !empty($_comment) && isset($_comment['comments']) && !empty($_comment['comments'])) { $_comments = $_comment['comments']; foreach ($_comments as $c) { ?> <li class="media"> <a class="pull-left X_Nick" data-value="<?php echo $c['user_id']; ?> " target="_blank" href="<?php xt_the_user_url($c['user_id']); ?> "><img src="<?php xt_the_user_pic($c['pic_url']); ?> " alt="<?php xt_the_user_title($c['nick']); ?> "></a> <div class="media-body"><p class="muted"><a class="X_Nick" data-value="<?php echo $c['user_id']; ?> " target="_blank" href="<?php xt_the_user_url($c['user_id']); ?> " class="xt-rep-nick"><?php xt_the_user_title($c['nick']); ?> </a>:<?php xt_comment_excerpt(0, $c['content']); ?> </p></div> </li> <?php } if (isset($_comment['total']) && $_comment['total'] > 2) { echo '<li class="xt-rep-more"><a href="' . $_url . '" target="_blank" rel="nofollow"> 查看全部' . $_comment['total'] . '条评论...</a></li>'; } } ?> </ul> </div> </div> <?php }